Email server hosting

3 years ago by brenno to c/selfhosted

I'm exploring some options to see if it's viable to self host my email account. Currently I have:

  • A home server that I can host the entire email stack but I cannot open the SMTP port there
  • An AWS account where I can create a VM with SMTP ports open to the internet and reverse DNS support, also I have a domain and AWS SES configured and approved to send emails

Ideally I would want to send and receive from my home server, but that is not possible, so I'm exploring some alternatives:

For receiving emails:

  • Cheap VM with postfix and my home server with dovecot, essentially forwarding all emails to my home server where I want them to be. I don't know if this setup works tho.

  • Keep everything in a VM, with the downside that I'll need to do extra work there as it will have all my data. If possible I don't want to go that route.

For sending emails:

  • Sending from the same VM receiving emails, and have everything managed

  • Use AWS SES to send emails in my behalf

Any input or opinion is appreciated. I'm currently exploring options, I haven't made any decisions, so if you have a better alternative feel fee to share.

Thanks!

load all comments
sirdavidxvi 14 points 3 years ago

Just passing along what I've read many times: that self hosting email can be difficult. Particularly sending, because the large providers tend to treat email from less known sources with more skepticism (such as by marking as spam), even with properly configured SPF and DKIM.

And if your server is down, you may miss any incoming mail for the duration. I don't know if other providers would try resending after a period of time if the receiver is unreachable, but I doubt it (just an educated guess).

I love self hosting services but email is something I've decided not to touch with a ten foot pole.

path: 0 2286601, hotness: undefined, score: 14, children: 3
Chobbes 2 points 3 years ago

It’s harder than a beginner would expect, but also not as bad as everybody says. It’s doable and we shouldn’t discourage everybody from trying it (but don’t use it for anything important until you’re sure it works). Just make sure you set up SPF / DKIM / DMARC and rDNS properly and you’ll most likely be fine. If you’re scared or frustrated you can use a relay for send. Receiving is easy.

path: 0 2286601 2292138, hotness: undefined, score: 2, children: 0
sirdavidxvi 1 point 3 years ago

Just a quick add: even for my self hosted services, I configure Postfix with Mailgun for SMTP relay for alerts and whatnot just to ensure delivery to my external mail provider.

Edit: a few words for clarity

path: 0 2286601 2286680, hotness: undefined, score: 1, children: 0
subtext 1 point 3 years ago

To be fair, the SMTP RFC (5321) says that senders MUST retry sending upon a failure (source), but it only specifies that they SHOULD have a retry of 30 minutes, and an even weaker recommendation to continue to try for 4-5 days before giving up.

path: 0 2286601 2291071, hotness: undefined, score: 1, children: 0
selfhosted
selfhosted

@lemmy.world

login for more options
63080
6830
6313

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

go to feed...