So, as the topic says, I’m going to set up a self hosted email service for myself, family and friends. I know that this one is a controversial topic around here, but trust me when I say I know what I’m getting into. I’ve had a small hosting business for years and I’ve had my share of issues with microsoft and others, I know how to set things up and keep them running and so on.

However, on the business side we used both commercial solution and a dirt-cheap service with just IMAPS/SMTPS and webmail with roundcube. Commercial one (Kerio Connect, neat piece of software, check it out if you need one) is something I don’t want to pay for anymore (even if their pricing is pretty decent, it’s still money out from my pocket).

I know for sure I can rely to bog-standard postfix+dovecot+spamassassin -combo, and it will work just fine for plain email. However, I’d really like to have calendar and contacts in the mix as well and as I’ve only worked with commercial solution for the last few years I’m not up to speed on what the newest toys can offer.

I’m not that strict on anything, but the thing needs to run on linux and it must have the most basic standards supported, like messages stored on maildir-format (simplifies migration to other platform if things change), support for sieve (or other commonly supported protocol) and contacts/calendar need to work with pretty much anything (android, ios, linux, windows, mac…) without extra software on client end (*DAV excluded, those are fine in my books). And obviously the thing needs to work with imaps, smtps, dkim and other necessities, but that should be implied anyways.

I know that things like zimbra, sogo and iredmail exist, but as mentioned, it’s been a while since I’ve played with things like that, so what are your recommendations for setup like this today?

  • mrinfinity@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    7 hours ago

    For self-hosting, be mindful IP addresses have reputation scores and your IP needs to build them up positively. You need to have reverse DNS set, DKIM, SPF records etc for a more trusted reputation, domain reputation etc to not be flagged and sent to spam folders. I just got the $1/month Proton E-Mail for 10 addresses for 1 custom domain as I didn’t feel like dealing with any of this with self hosting, but props for going the self-hosting route.

    • pHr34kY@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 hours ago

      ISPs often have SMTP relay servers. If you hook into that, your mail gets instant street cred.

      • Neo@lemmy.hacktheplanet.be
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 minutes ago

        Amazon SES is good for this too. I use it in combination with postfix for the outbound mail. Granted it feels a bit like cheating on the whole self hosting part, at least for outbound. And I only started doing it in the past year of self hosting for 20 years. MS (Hotmail, Outlook, Office 365) was by far the biggest asshole in randomly denying delivery from my (well maintained reputation wise and well configured) outbound IP before switching to an SES relay. Fuck em, seriously. It’s not just about preventing spam, it’s clearly a strategy towards email dominance. Other big players are guilty of this too though.

  • tapdattl@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    9 hours ago

    I’ve been playing with Stalwart-Email as a combined SMTP/IMAP server. Its open source and written in rust, still pretty early in development and I haven’t played with it enough to give any real opinion on the pluses or minuses compared to other software, but its worth taking a look at.

  • Neo@lemmy.hacktheplanet.be
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    13 hours ago

    Great plan! We need more independently hosted email. I’ve been self hosting email for 20 years. Still running Postfix and Dovecot, but don’t have all the features you’d like though. I just wanted to chime in that I’ve moved from spamassassin to rspamd. And I’m happy about that. Given your experience in the hosting business I think you’ll like rspamd. One thing I have changed since a few months is have outgoing mail go through Amazon SES. I moved hosting from Linode to Hetzner and that turned out to be not so great for outbound delivery reputation. I didn’t want to migrate back to Linode so I bit the bullet and compromised with SES. That has been really working well, but I admit it is a bit of a step back from fully self hosting.

    • Admiral Patrick@dubvee.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      12 hours ago

      What’s the benefit of rspamd over SA? I’ve used SA since I first setup my mail stack years ago, and it’s been great. Cron jobs run nightly to train based on the contents of all the mailboxes’ .spam folders, so it’s only gotten better with time.

      Not judging, just curious.

      • Neo@lemmy.hacktheplanet.be
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        11 minutes ago

        I believe the ISPMail tutorials I was following during my rebuild recommended it as the successor to self hosted anti spam. Touting better performance, written in C vs. Perl for spamassassin iirc. The tutorials may have indicated that SA was no longer actively maintained, but that may be a figment of my imagination. Better fact check all of this. But I’ve been very happy with rspamd’s web interface to see what’s going on with the process. There’s a great history view in the dashboard that helps you better understand why a message got flagged as spam. It helped me better fine tune white and blacklists for example. Supposedly it also has a rich module system to enable more advanced filtering techniques like LLM’s and whatnot. But I haven’t looked into that yet. Granted rspamd is also used by ISPs that have massive throughput. I’m definitely not in that category :p

  • SK@hub.utsukta.org
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    13 hours ago

    I’ve been using mailcow for about a year and i am very satisfied, it checks all your boxes and is easy to configure and deploy over docker.

    • ikidd@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 hours ago

      Mailcow-dockerized is bulletproof. Never had a problem with it and has been rock solid.

    • liliumstar@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      Second this. Mailcow very easy to setup, though the docs could use improvement. This might have changed already.

      That said, I found it easier to pay for a domain and email service where they worry about reputation and random microsoft blacklists.

    • Monkey With A Shell@lemmy.socdojo.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      13 hours ago

      Just beat me to it…

      The one thing that they don’t have yet last I updated, though they’ve been working on it for a while, is a prod ready LDAP/SSO connection. I had the dev branch working with Keycloak, but never got plain LDAP to function.

  • CaptSpify@lemmy.today
    link
    fedilink
    English
    arrow-up
    5
    ·
    12 hours ago

    I have Dovecot and Postfix running on Debian on a server in my closet. Works great for my needs

    • Lucy :3
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 hours ago

      Same (but arch btw). It uses the existing Let’s Encrypt certificate from certbot --nginx. I did everything possible advised by mxtoolbox (Blocklists, DMARC, SPF, DKIM, LIGMA and whatnot). Some things are hard or impossible, but not really needed, like reverse dns or DNS SOA.

  • SwizzleStick@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    13 hours ago

    I’ve stuck with iredmail for years. Spin up a VM, grab the installer, and see how it performs for you.