I know the adage that self-hosting email is hard. I use a third party smtp server to send emails for my Lemmy instance in order to guarantee delivery, for example.

However, other than potential uptime, what are the disadvantages to setting up self-hosted incoming email?

Incoming email is like 99% of my email usage. I’m happy to use a third party mail provider for outgoing email, but don’t see why I shouldn’t simply host incoming email myself.

Thank you <3

  • avalanche@kbin.social
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 years ago

    Worth it for me. I have the freedom of hosting as many domains, accounts, and aliases but no extra charges. If you only have yourself, simple needs, and care less about holding your own data, maybe it is not worth it. It all depends.
    I also would not say it is “easy”. It is if you already know what to do, but you can say that about a lot of things. And mailcow makes it all “easier”, but when something breaks, it is often not at the best time to figure things out.
    I get less spam on this setup then I did with Google. I owe much of that to greylisting, which is very effective, but not everyone’s cup of tea.
    My biggest problem over the years is delivery failure due to various written and unwritten rules. Some people here will say you just have to have a clean IP, but it is NOT that simple when dealing with Google and MS. In the end, I use Sendgrid for my outgoing. We send so little mail, we will always be in their free tier. I’d rather not use them, but it is better than giving up on selfhosting for me.
    And finally, if you are not going to bake in backup and recovery into your plans, don’t bother. Make that aspect of your buildout equally important.

  • bfg9k@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    I have tried for years to self host my email, but finding an upstream SMTP server that will accept your custom domain is pretty much impossible these days. Plus a lot of mainstream servers (Gmail, Hotmail etc.) block pretty much everything except mail sent from another mainstream account.

    Every time I have tried, I get back SMTP responses that my domain isn’t trusted, my IP is not trusted enough or they just blackhole my traffic.

    This article sums it up well:
    https://cfenollosa.com/blog/after-self-hosting-my-email-for-twenty-three-years-i-have-thrown-in-the-towel-the-oligopoly-has-won.html

  • TheOneCurly@lemmy.theonecurly.page
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    2 years ago

    Most people complain about spam. I think you’ll be surprised just how much incoming spam you get and how hard it is to sort though it. Not to say it’s not worth doing, but that’ll be the hard part.

    • james@lemmy.jamesj999.co.uk
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 years ago

      Agreed. Sensible to only do the incoming too, I had an outgoing one and it got hijacked because SMTP security seems to default to ‘least secure’. For example if there is a single character out of place in the config file, I found it basically opened everything up rather than reporting an issue :)

  • LyingPenguin@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    I don’t see anything wrong with self-hosting the receiving part. Especially with something like mailcow it shouldn’t be any more difficult than hosting anything else, provided you have backups in place and will be able to get the server up and running again within 24 hours to not lose any emails. Yes, spam may be an issue, but mailcow has useful defaults configured and it works okay-ish for me.

    Btw, they also allow for configuring outbound relays quite easily. This allows for simpler configuration on the client-side. I have it set up so that all emails sent through mailcow will be forwarded to mailgun, for example.

    • Wander@yiffit.netOP
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      Do you know if 24h is the typical timeout for re-trying to send an email. How about I put a traditional email provider as second priority in MX records in case my server goes down? That should work, right?

      • outcide@kbin.social
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        2 years ago

        The standard is to retry for 5 days before bouncing emails as undeliverable (and send a warning message that the email hasn’t yet been delivered after 4 hours). However, every server can configure it to be whatever they want, so there’s no guarantee.

        You can’t just use any old provider as a secondary mx, you need a server which is configured to accept mail for your domain but not try and deliver it locally. It’s pretty simple to set up. The biggest issue is that you need the same spam protections on the secondary as on the primary, as spammers will send directly to the secondary to try and bypass spam protections.

        • Wander@yiffit.netOP
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          Thank you, that makes sense. I think I might give it a try first with some non-critical domain to get a feeling for it.

  • Moonrise2473@feddit.it
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    The main drawback is having your ip address bound to your domain, which with a whois can equal to your name and address

    Maybe i’m just paranoid, spoiled by cloudflare protection

  • Lichtblitz@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    Self hosting email is not difficult. This has been true in the past but with modern standards and tools it’s much easier now. It just takes a few hours/days and some dedication to get right. There are free services that test your mail server and can receive your emails and tell you exactly what’s amiss. I completely changed my mail server and software and got perfect scores in around two to three evenings tinkering around. Granted, I had some experience from the last time around ten years ago. This will likely hold up again for the next ten years as long as I update my software somewhat regularly. And my emails were never bounced/rejected apart from the very beginning of my journey.

  • binwiederhier@discuss.ntfy.sh
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 years ago

    I hosted my incoming mail for years with a minimal postfix config that would just relay to Gmail. That got me individual email addresses per service (e.g. grubhub@mydomain.com, …) that I could turn off when a service got annoying.

    It worked wonderfully without issues for years. And by years i mean 8-10 years!

    Recently, 11 months ago, i noticed that some mails were not relayed anymore, and i ultimately switched to Cloudflare for that feature. You can read more about that here: https://www.reddit.com/r/selfhosted/comments/vqk4j9/mail_relay_as_a_service_moving_away_from/

    That said, if you only want to store the incoming mail, I don’t think you’ll have issues beyond spam, a lot of spam.

    Good luck.