24 votes

How many of you host your own email server? Do you recommend hosting one?

I was thinking of setting up my own email server, just for learning and privacy stuff.

Which VPS provider would you recommend?
What are the major challenges one might face while hosting own email?

19 comments

  1. [4]
    Silbern
    Link
    Never tried it myself, but I've heard one very common problem of self hosting is getting blocked preemptively by other email providers as a spam prevention measure.

    Never tried it myself, but I've heard one very common problem of self hosting is getting blocked preemptively by other email providers as a spam prevention measure.

    24 votes
    1. [3]
      clone1
      Link Parent
      To avoid this, you need need a server on a business class connection, dkim and sdf signing, and a proper DNS setup. If you check all of those boxes, you should be ok.

      To avoid this, you need need a server on a business class connection, dkim and sdf signing, and a proper DNS setup. If you check all of those boxes, you should be ok.

      14 votes
      1. [2]
        bme
        Link Parent
        dkim and sdf are the real key. They are a little annoying to get going with but it's very set and forget.

        dkim and sdf are the real key. They are a little annoying to get going with but it's very set and forget.

        2 votes
        1. clone1
          Link Parent
          Eh, I didn't have much trouble. My spam filter doubles as a dkim signer, and then you just have to put two lines in your dns control panel.

          Eh, I didn't have much trouble. My spam filter doubles as a dkim signer, and then you just have to put two lines in your dns control panel.

          1 vote
  2. [3]
    clone1
    Link
    I host my own email server, I set it up mostly to learn. I use Debian, postfix, dovecot, and rspamd. I just use textfiles for maps, no database. It was relatively easy to setup.

    I host my own email server, I set it up mostly to learn. I use Debian, postfix, dovecot, and rspamd. I just use textfiles for maps, no database. It was relatively easy to setup.

    9 votes
    1. [2]
      confusedninja
      Link Parent
      Thanks for the reply. Can you answer some more question? Where are you hosting it? How much does it cost you? Is there any spam problem. Like your emails marked as spam for Gmail users?

      Thanks for the reply.
      Can you answer some more question?
      Where are you hosting it? How much does it cost you?
      Is there any spam problem. Like your emails marked as spam for Gmail users?

      6 votes
      1. clone1
        Link Parent
        I host it on a free Amazon AWS server. It costs me literally nothing because I use the free AWS ec2 server(powerful enough for email), a free let's encrypt certificate, and a free namecheap domain...

        I host it on a free Amazon AWS server. It costs me literally nothing because I use the free AWS ec2 server(powerful enough for email), a free let's encrypt certificate, and a free namecheap domain I got from being a student.

        Like i said in another comment, if your server is on a business class connection (any professionally hosted one will be), you set up sdf and dkim signing, it's encrypted (with the let's encrypt certificate), and DNS is properly setup (in my case I had to contact Amazon to setup the reverse DNS), you'll be fine. I've never been marked as spam since I finished.

        3 votes
  3. [3]
    Lynx
    Link
    I run one on my raspberry pi at home. Postfix, roundcube, dovecot and postgres as the database. The Arch wiki page was quite helpful during installation. It mostly works, every now and then it...

    I run one on my raspberry pi at home. Postfix, roundcube, dovecot and postgres as the database. The Arch wiki page was quite helpful during installation. It mostly works, every now and then it breaks and I have to dive into postfix configs again. Oh well, that's what I get from running a janky as hell "homelab".

    Haven't tested it in a while, but outgoing mail should be accepted by gmail etc, I have SPF and DKIM set up.

    6 votes
    1. [2]
      clone1
      Link Parent
      Does your ISP not block port 25? Most do, and that's why I had to cloud host mine (plus consumer ips are usually blacklisted).

      Does your ISP not block port 25? Most do, and that's why I had to cloud host mine (plus consumer ips are usually blacklisted).

      1 vote
      1. Illithid_Syphilis
        Link Parent
        Most ISPs will open up port 25 if you ask them. They usually block it to prevent PCs with viruses from being able to run SMTP and send out spam.

        Most ISPs will open up port 25 if you ask them. They usually block it to prevent PCs with viruses from being able to run SMTP and send out spam.

  4. Happy_Shredder
    Link
    I run one out of my house. I use and recommend opensmtpd --- it's a breeze to setup and easy to link up with IMAP/antispam/webmail if you want. The only problems I've had are outages otherwise...

    I run one out of my house. I use and recommend opensmtpd --- it's a breeze to setup and easy to link up with IMAP/antispam/webmail if you want. The only problems I've had are outages otherwise it's no worries.

    5 votes
  5. Eva
    Link
    I run a few, yeah. With a VPS provider, it really depends on what you want in it. For most people, a Scaleway VPS to host their email will probably be the best solution, because it's cheapest and...

    I run a few, yeah.

    With a VPS provider, it really depends on what you want in it. For most people, a Scaleway VPS to host their email will probably be the best solution, because it's cheapest and even if it goes down for say, ten minutes a month max (the few I have running haven't had downtime since the beginning of the year, but YMMV), most email servers and every major email service provider tries to retry sending any given message for a few days if it fails to deliver.

    Linode is pretty good if you really need 100% uptime for whatever reason, though. The biggest problem is that they force-disable some settings and run custom kernels by default, which is...really annoying, to say the least, and can make some packages not work at all.

    DigitalOcean is iffy, mainly because they kick you off if you use the advertised speeds for too long.

    4 votes
  6. [3]
    mjb
    (edited )
    Link
    I ran a postfix email server for my personal domains for several years but eventually tired of the spam whack-a-mole game. Despite installing numerous anti-spam tools and configuring various...

    I ran a postfix email server for my personal domains for several years but eventually tired of the spam whack-a-mole game. Despite installing numerous anti-spam tools and configuring various countermeasures, such as relay blocking lists, bayesian filters, and authentication protocols including DKIM, SPF, etc., I concluded that I would never have a large enough corpus necessary to reduce spam to acceptable levels. I migrated my domains to Google back when what's now called GSuite (I think) was free; if I were to have to pay for the service today, I'd choose another provider, especially for privacy reasons.

    If you do choose to run your own server, though, I do highly recommend postfix and dovecot.

    ETA: As for hosting, I'm currently running my personal domains on Debian VPS hosted at Linode but I've also worked with DigitalOcean, which I'd highly recommend.

    4 votes
    1. [2]
      clone1
      Link Parent
      You should check out rspamd. It's the hip new solution and I haven't got any spam while using it.

      You should check out rspamd. It's the hip new solution and I haven't got any spam while using it.

      1. mjb
        Link Parent
        Good to know. However, after years of futzing with it, I'm happier having someone else manage my email infrastructure.

        Good to know. However, after years of futzing with it, I'm happier having someone else manage my email infrastructure.

  7. [3]
    fifthecho
    Link
    I run MailCow on Vultr and have had few to no issues with it. I keep looking at SaaS services for mail hosting because if you're hosting for multiple people, they'll be pissed when it goes down,...

    I run MailCow on Vultr and have had few to no issues with it.

    I keep looking at SaaS services for mail hosting because if you're hosting for multiple people, they'll be pissed when it goes down, but hosting for all of the domain names I own gets prohibitively expensive given that many of the domains I own are vanity/joke domains.

    2 votes
    1. [2]
      confusedninja
      Link Parent
      Do you have any problem with gmail like email getting marked as spam?

      Do you have any problem with gmail like email getting marked as spam?

      1 vote
  8. biox
    Link
    I initially setup my mailserver using the 'NSA proof your email in two hours' guide, eventually resigning to use sovereign (a set of ansible scripts). Currently regretting it, self-hosted mail is...

    I initially setup my mailserver using the 'NSA proof your email in two hours' guide, eventually resigning to use sovereign (a set of ansible scripts). Currently regretting it, self-hosted mail is just too much of a pain to be feasible. SPF/DKIM do not stop Google from blacklisting your domain arbitrarily, making you unsure if any mail is ever delivered. That, and the only way to win the spam game is to not play.

    1 vote