Chasquid – SMTP server focused on simplicity

131 points by mvolfik 1 year ago | 54 comments
  • julienmarie 1 year ago
    I keep on hearing that hosting your own server is a pain. Email costs were always an issue for me. I manage a few e-commerce website. Initially when they were small I used MailChimp. Then moved to AWS SES. Now I moved to my own self hosted postalserver. My mailing lists are not huge ( 100k recipients) and I send daily and I don't have much of a deliverability issue. Depending on the audience my open rates are between 35 and 55%. What I learned is: - Make sure your configuration is perfect. From reverse dns to DKIM. Everything should be aligned. - Have a clean email list. Validate emails ( MX, etc ), double optin, remove hard bounces, respect unsubscribes to the t ( people don't always unsubscribe using the link, but often just send an email to customer service, provide the option fornthe customer service team to unsubscribe people from marketing). - Use a email warming service like mailreach. It seems weird but it makes a world of difference. It really works. I spend less than $50/month all in all with a beefy instance on Hetzner Cloud. For the volume I send it would cost 6x this on SES.
    • tsimionescu 1 year ago
      What you're describing is exactly what most people would call "a pain". It is very doable if it is your job, but it's definitely much much more work than having a Gmail or Proton Mail account or whatever other provider if it's about your own personal email.

      There are many who would like to not be beholden to anyone else for their own email, but when they try it, they quickly find it's far too much work to actually ensure that when they send an email to, say, apply for a job, it will certainly arrive.

      • KronisLV 1 year ago
        > There are many who would like to not be beholden to anyone else for their own email, but when they try it, they quickly find it's far too much work to actually ensure that when they send an email to, say, apply for a job, it will certainly arrive.

        I think not knowing is a big problem. For example, I just use docker-mailserver on a VPS with decent IP reputation and SPF set up (but not DKIM/DMARC) and haven't really had any issues with the big providers.

        However, if there were issues, I wouldn't know about those myself, unless I had some code that sends emails to those providers and then checks whether they've been received periodically.

        On one hand, it would be nice to have confirmation for when a mail has been handled successfully (delivered and sitting in their inbox folder, not tossed aside and not filtered as spam, regardless of whether they'll actually read it), but then again some software will also block remote content (like tracking pixels) over justified privacy concerns and bad actors would also benefit from said functionality.

      • 77pt77 1 year ago
        > $50/month all in all with a beefy instance on Hetzner Cloud

        That's really small amount per month but for 100K a day you can use almost any extremely low-end VPS

        • OccamsMirror 1 year ago
          Where do you host your mailserver?
          • lelandbatey 1 year ago
            They stated that they host it on a dedicated server rented from the provider Hetzner.
            • sam345 1 year ago
              Actual a "beefy instance" on Hetzner not clear it's dedicated
        • intsunny 1 year ago
          I'm amazed at how email server software is innovating and evolving like never before. We have new implementations of SMTP, IMAP, etc. We even have new protocols like JMAP thanks to the Fastmail guys.

          But it also feels like fewer and fewer people are running their own mail servers. Everyone seems to just outsource it to Google or Microsoft. I'm also surprised at how many engineers barely understand how email works. (IE: I have to show them what email headers are and the useful info that can ne found there.)

          • keyle 1 year ago
            That's because email delivery is such a weird dance. It's getting harder every year to have your mail delivered without being part of those few services since the protocol is abused so much.
            • Nextgrid 1 year ago
              To be fair, you can relay through those services to work around the delivery problem. It's still better than nothing since they now only see your outbound mail, but inbound mail processing & storage is still local & self-hosted.
              • t0astbread 1 year ago
                How does that work exactly? Do you set up your server as higher priority MX and the external provider as backup and then configure your server to relay outbound mail through that other service? And all your server has to have is a valid certificate while DKIM/RDNS/SPF get handled by the external service?

                Is there anything to watch out for (e.g. w.r.t. bounce mail) in this setup?

                Edit: Maybe you don't even have to set up an MX record for the external provider (unless you want to use it as a fallback for incoming mail).

            • afavour 1 year ago
              Email is in its own category in this regard, IMO.

              I love to throw out a library and implement something myself so I gain a better understanding of what’s going on and maybe even improve on what was there before. But I can’t do that with email. Other servers are going to accept or reject my mail solely based on what my IP is, irrespective of how good my implementation is or is not. I’ve just never found it worth the time to dig into.

              • HHC-Hunter 1 year ago
                Quite frankly, it's just not worth the time or maintenance.
                • Grimblewald 1 year ago
                  You'll eat your words once your only option is corpomail.
              • denysvitali 1 year ago
                I'm a huge fan of Chasquid. The HAProxy protocol support makes it easy to integrate in Kubernetes.

                I uses to use this solution until a few months ago when I decided that self hosting my mail server was too much work. To be fair, it's not Chasquid's fault as operations there are basically 0, but more of a spam / email reputation thing.

                • 77pt77 1 year ago
                  Self-hosting email has been essentially dead for almost a decade.

                  Even if you don't ever SPAM and send like one email a day on average, you won't be able to get them delivered to the recipient's inbox.

                  You can use SPF, DKIM, DMARC all you want, google won't care.

                  • dspillett 1 year ago
                    Still running my own mail server, for myself and friends. No problems with deliverability thus far (including to Google) with SPF and DKIM set correctly.

                    The killer problem is often source address, and source address range, reputation. Mail sent from a normal residential ISP will have trouble. Addresses allocated by many VPS providers (and some dedicated server providers) will have spotty reputation. Mail from cheap VPS providers simply won't get through (many block SMTP outgoing and state so on sign-up because they don't want the support burden of people complaining about this). Sending mail from cloud providers can be an issue too (I've had mixed results with VMs in Azure sending out alerts).

                    If you are stuck with such a source reputation issue then you can use a service like MXRoute (several others are available, this one I've not used but it seems popular on a couple of hosting forums I frequent) as a relay. Obviously that is not free, but it is cheaper than moving to a much more expensive VPS provider or changing your home ISP.

                    Another reputation issue many have when setting up a new project is that many mail servers explicitly distrust new domains. In this case SPF, DKIM, and a good reputation source address won't make much difference. The definition of “new” varies from place to place but where it is an issue you need a domain registered at least some months ago. This can be mitigated somewhat by users explicitly marking messages from new domains as not spam, but that is not something you can rely upon as said users need to see the message to be able to mark it that way.

                    • geek_at 1 year ago
                      can't confirm. I'm hosting a online registration software for parent-teacher conferences and hosting all my mailservers on my business internet line.

                      If you have DKIM,DMARC,SPF and the reverse DNS of the mailserver is set to the correct domain you have no problem. Well.. except for GMX and yahoo which frequently block me for a few hours when multiple parents register at the same time

                      • rfmoz 1 year ago
                        The security solutions on the mail system make a line that you need to cross, but it doesn’t guarantee a success.

                        It’s a hard way to guess how good is the implementation on the receiver, like GMX, Libero or other big country providers with “historical” service that don’t care about them too much.

                        • slowbdotro 1 year ago
                          I agree. Self hosted my email for over a decade and as long as you do the recommended SPF, DKIM and DMARC you have basically no problems.

                          Occasionally I turn up in spam when I email someone I haven't before, but that's usually due to the .ro in my domain and the forced text mode rather than html.

                          I've found problems only start occuring when you send transactional email. User signups, notifications, etc. Anything really automated.

                          I think people like to joke on self hosting email because there are a lot of moving parts and it was hard to diagnose why something went wrong. Until the last decade and early 2010s there were no all in one self hosted solutions that made it easy & available for most to do it.

                          • 1 year ago
                            • jamespo 1 year ago
                              Wait until you get on MS blocklist with no recourse
                            • rfmoz 1 year ago
                              Looking for help with Postfix configuration usually put you in forums threads with almost +10 years.
                        • jsn 1 year ago
                          Apparently there's no support for smarthost / relayhost (or I can't find any traces of it in the documentation). Running your own low traffic mail exchanger without it is often not a pleasant experience.
                          • MitPitt 1 year ago
                            Does anyone know of an SMTP server which is easily usable with Caddy? I find tinkering with certificates quite bothersome, and I won't give up Caddy as I already host a bunch of apps with it.
                            • tardisx 1 year ago
                              You can just copy the caddy-generated certificates to the place the mail server expects them, if you're referring to the TLS side? This is what I do.
                            • julienmarie 1 year ago
                              Postalserver uses caddy for it's web and API interface.
                            • 8organicbits 1 year ago
                              The hook functionality[1] looks easy to extend. I was looking for something that could trigger workflows for inbound email, anyone have (alternative) tool recommendations or experience?

                              [1] https://blitiri.com.ar/p/chasquid/hooks/

                              • e12e 1 year ago
                                Most delivery agents allow for piping incomming mail to a program - for filtrering or "delivery".
                                • mlhpdx 1 year ago
                                  My approach to inbound-email triggered workflow using SES, which is working great for my needs:

                                  https://github.com/mlhpdx/email-delivery

                                  It’s industrial strength in some respects, but not for those wanting an e-mail UX.

                                • zilti 1 year ago
                                  Why though? We already have OpenSMTP. It can't get any simpler.