I tried maybe 15 years ago and it went about as well as you’d expect for back then. But I’m starting to get the itch again.

Have any of you tried relatively recently? How impossible is it to get reliable deliverability to gmail and whatnot these days?

  • Brkdncr@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    ·
    7 months ago

    No. I do that for my job and wouldn’t do it for personal use. HA/redundancy/security is too expensive.

  • perishthethought@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 months ago

    I am not OP but I love the idea of selhosting email. This is stopping me though:

    … set it up correctly with a healthy IP address and domain (not blacklisted)

    Any tips on how to accomplish this?

    • IsoKiero@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      4
      ·
      7 months ago

      It’s quite likely that any given IP, unless you get one from shady VPS provider or something, is “clean”. And if it’s not it’s usually not that big of a deal to get it cleared from major blacklists (spamhaus, google and microsoft covers quite a lot). You just need to dig up proper forms to tell them that you’re a new owner of said IP and promise to play nice.

      Same goes with domain names, but if you get a new one that’s a non-issue. Just set up SPF-records properly (and preferably DKIM/DMARC, but those aren’t strictly necessary and need a bit more than a single TXT-record) and you’re good to go.

      And then you of course need to stay away from those lists. If you configure your SMTP to act as a open proxy you’ll be on every shitlist on the planet pretty quickly. So, reasonable measures against compromised account (passwords, firewalls, rate limits…) and against other threats (misconfigured/unsafe web service used for spam and stuff like that). Any of those alone are not too difficult to accomplish, but there’s quite a few things you need to get right.

  • CarbonatedPastaSauce@lemmy.world
    link
    fedilink
    English
    arrow-up
    18
    ·
    7 months ago

    I’ve been hosting my own email servers for 20 years without issue. But email systems were a huge part of my IT career so it was easy.

    It works great if you have static IPs and know what you’re doing in terms of following best practices. If you’re missing those two things you’re going to have a bad time.

    If you have the statics and want to learn, I’d recommend purchasing a test domain and getting the kinks worked out before you move a domain you care about to your own system.

    • 4am@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      My hosting company has an outgoing mail server that I can use and as long as they’re doing the external DNS of the domain in question it works perfectly well.

      Mostly though, from my own domain I am only sending automated messages from applications I host like NextCloud or Grafana from a “no-reply” address. There would almost certainly be privacy implications if I were to use it for personal mail.

      So, if yoy are looking for a simple way to get email notifications from automated processes, this ain’t a bad way to go about it. If you want more, I would consider who can ready your outgoing mail and if you are ok with that.

        • markstos@lemmy.world
          link
          fedilink
          English
          arrow-up
          11
          ·
          7 months ago

          Lol. After professionally hosting email for 15 years I’m happy to let someone else handle it now.

          About 90% of incoming mail will be spam and it will be your job to make sure you are doing good job of classifying it so you don’t get junk in your inbox and don’t lose real mail in the spam folder.

          Then for outgoing mail you need to make sure SPF, DKIM and DMARC are all in order.

          Then there is all the usual stuff of security updates, backups, monitoring, alerting, logging and having a plan for internet outages.

          Yes, it’s all doable but I won’t expect it be “set and forget”. I expect there will be quite a bit of tuning with some possible spam and delivery problems while you get kinks worked out.

    • Hamartiogonic@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 months ago

      I really like the idea of having my own server, where I could have a bunch of cool stuff like email, VPN, Nextcloud, and so much more. The primary reason why I don’t have a server like that, is because I can’t trust myself to follow the best practices. For a while now, I’ve been thinking that I should hire a proper professional to take care of all that.

  • Neo@lemmy.world
    link
    fedilink
    English
    arrow-up
    21
    ·
    7 months ago

    I’ve been self hosting email successfully for 20 years. My goto article for this question:

    https://poolp.org/posts/2019-08-30/you-should-not-run-your-mail-server-because-mail-is-hard/

    TLDR;

    • Mail is not hard: people keep repeating that because they read it, not because they tried it
    • Big Mailer Corps are quite happy with that myth, it keeps their userbase growing
    • Big Mailer Corps control a large percentage of the e-mail address space which is good for none of us
    • It’s ok that people have their e-mails hosted at Big Mailer Corps as long as there’s enough people outside too
    • Frezik@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      7 months ago

      OK SPAM is not the issue but my mails will not reach my users at Big Mailer Corps

      The article’s answer to this one is handwavey “there are rules that spammers can’t meet, but you can do it just fine”. This is not the whole story by far. This is a more comprehensive overview of why it doesn’t work:

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

      On a dynamic IP connection, you can very easily have had the address flagged already. If the one you have now isn’t flagged, the one you get later might be. Debugging intermittent problems is not fun.

      They also like it when your domain has shown good behavior already. I can do that because my domain has existed for over 20 years and I’ve hosted email on it in one form or another for that whole time. A person starting out on their own is not going to be able to do that.

      This doesn’t necessarily mean that the big providers are the only option. There are smaller providers, like Fastmail.

      Lastly, any server config where they claim it’s easy because “the configuration reads almost as plain english” is a big red flag for me. Plain language config or programming does not work as well as anyone thinks.

  • thenorthernmist@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    7 months ago

    Yes! I started like a year ago and am very happy. I strongly recommend mox. It’s lightweight and the configuration makes it very clear how to set it up properly. I had some weird issue with sending mail to Apple accounts but (believe it or not) I reached out to Apple and they seemed to fix it.

    • Mose13@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      I’m not an apple hater, but that’s kinda insane considering how hostile they are towards developers.

  • thunder@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    8
    ·
    7 months ago

    If I had to make one suggestion, I would use a trusted third party to relay outbound e-mail such as AWS SES, mxroute, sendgrid, mailgun, etc. When I was looking for a job a few years ago, I found many potential employers’ systems would flag my e-mails as junk or simply delete them, and I had to revert to gmail. My second suggestion is to properly set up TLS/SSL for security, and SPF, DKIM, and DMARC for maximum deliverability. I’m currently using a deprecated application, but I’ve been testing mailcow which seems alright.

    • Scrollone@feddit.it
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      Beware that Mailgun doesn’t differentiate between transactional and marketing emails, this could hurt your deliverability.

  • JRaccoon@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    I recently set up the whole stack (Postfix, Dovecot, OpenDKIM) on a VPS. I wanted to do it from home, but my ISP won’t provide a static IP or open ports 25/465/587 for consumer customers, no exceptions.

    It took me about two days to get everything working, but most of that was because I went in with very little knowledge of how email even actually works. If you’re looking for a learning experience, I’d say go for it. If you just want a working email setup quickly, I wouldn’t recommend it.

    I haven’t noticed any deliverability issues so far. Just make sure you have SPF, DKIM, DMARC, and PTR records all set correctly from the start.

  • tal@olio.cafe
    link
    fedilink
    English
    arrow-up
    3
    ·
    7 months ago

    I have not done so in the traditional sense in quite some years. My experience was that it was an increasing headache due to crashing into a wide variety of anti-spam efforts. Get email past one and crash into another.

    Depending upon your use case – using the “forward to a smarthost” feature in some mail server packages to forward to a mailserver run by a SMTP service provider with whom you have an account might work for you. Then it still looks to local software like you have a local mailserver.

    If I were going to do a conventional, no-smarthost mailserver today, I think that I would probably start out by setting up a bunch of spam-filtering stuff — SpamAssassin, I dunno what-all gets used these days on a “regular” account — and then emailing stuff from my server and seeing what throws up red flags. That’d let me actually see the scoring and stuff that’s killing email. Once I had it as clean as I could get it, I’d get a variety of people I know on different mail servers and ask them to respond back to a test email, and see what made it out.

  • Da Oeuf@slrpnk.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 months ago

    I use YUNOhost on a VPS and it came with email out of the box. Which is just as well because I had no previous experience self-hosting!

    I think I had a couple of emails get marked as spam in the beginning but everything has been totally fine for the last 2/3 years.

  • communism@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 months ago

    Been self hosting email for a good while now and it’s been largely painless. My emails are not getting marked spam either. Although my only outgoing mails are to FOSS mailing lists and occasionally to individuals, not for anything business related.

    I would say that if self hosting email sounds like something you’d be interested in, then it probably is worthwhile for you. I like being able to configure my mail server exactly the way I want it, and I have some server side scripts I wrote for server side mail processing, which is useful as I have several different mail clients so it makes sense to do processing on the server rather than trying to configure it on my many clients. It definitely falls into the “poweruser” category of activities but I’ve had fun and I enjoy my digital sovereignty.

  • Fell@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 months ago

    I tried the all-in-one server Mox two years ago and it just worked. In fact, I’m still productively using it to this day.

    The spam filter could be a little better, but it does a good enough job IMO.

  • ShortN0te@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    I host my mail with mailcow and it is almost set and forget. I only had a couple issues with some mail providers, but a small email exchange with the admins cleared that up.

    Have a handful of users, that have not complained about anything not working or spam or whatever 🤷‍♂️

  • Goddard Guryon@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    4
    ·
    7 months ago

    As someone who tried to self-host it like a month ago (and seemingly still hasn’t got it fully working), I’ll just write out the overview of what I’ve done and let you (and others) comment on how correct and feasible it is.

    Since my ISP doesn’t allow me to get a static IP address, I rented a VPS connection and made a wireguard tunnel from the VPS to my computer. This tunnel forwards traffic at all the necessary ports between the two machines. I really wasn’t familiar with all the necessary components for an entire mail server, so I chose mailcow since it packages everything into one single software (well, more like a bunch of docker containers). Another reason I went with mailcow was that I could easily find a github tutorial for how to set up mailcow with wireguard tunneling (it’s a bit outdated IMO, but the changes are minor). Mailcow also gives a nice portal interface listing out all the DNS entries you need to put in place to get it working perfectly.

    In the end, I still see a few incoming emails getting dropped and reception time being an hour or so, and I’m not sure if it’s a problem with my tunnel or DNS or something else. But overall, I’d say it was much easier than setting up all the individual services myself.