Simple mail server
from Humorless4483@lemmy.world to selfhosted@lemmy.world on 11 Jun 06:43
https://lemmy.world/post/16406774

Hello,

I want to deploy a simple mail server so that it can be used for users to register themselves or reset passwords, etc.

Is there an easy one to deploy (in docker if possible) ?

#selfhosted

threaded - newest

smokinliver@sopuli.xyz on 11 Jun 06:55 next collapse

There is Mailcow. But simple is relative I guess cause you still gotta configure a lot around it to not end up on every spamlist out there

Norgur@fedia.io on 11 Jun 08:32 collapse

Dmarc/dkim/SPF/certs. Fun times!

I got a mall server running, yet it's almost more as an inbox.

bmck@lemmy.bmck.au on 11 Jun 06:55 next collapse

Check out stalw.art

nx2@feddit.de on 11 Jun 07:03 next collapse

I wrote a blog some time ago why selfhosting email sucks

nx2.site/email-selfhosting

If you just want the email server for only you and your friends, or for internal messages, selfhosting email can be fun, but your main email should probably not be selfhosted.

derbolle@lemmy.world on 11 Jun 07:16 next collapse

you could try mailu. that should be simple and Provide you with everything You need

Shimitar@feddit.it on 11 Jun 07:20 next collapse

I I agree with everybody else saying that the email server should not be self-hosted. But I have a specific exception to this rule, which I was keen to try, but I never did this or take this with a pinch of salt.

I do self-host on my services, but at the moment I keep myself hosted email on a public server, not on my home server.

Since I am using a tunnel to access my services from outside, my home server is actually using my public server ip. moving my email self-hosting to my home server would not actually change the front facing IP address of that email server, and no harm would be done to my mail server.

But is it really worth it? Probably not. Since I would still need some kind of backup email server out on the internet for the rare situations where my home server is cut from the internet due to power outage or ISP being down.

You want full reliability for your email server. So your home connection without UPS or backup connection isn’t going to cut the cheese fully.

So, I would suggest you don’t self-host your email on your home server. You can still self-host your email, but on a public server. Be aware, though, that is a difficult task which will require lots of effort and many months to get it done right and accepted everywhere.

pHr34kY@lemmy.world on 11 Jun 07:28 collapse

I host my own mail. When it’s down, the mail just gets delivered after I get online again. Almost all mail servers are configured to retry over a period of several days before giving up.

Once my health insurer sent me mail by post to tell me that my mail server was down. That was kinda funny.

Shimitar@feddit.it on 11 Jun 13:11 collapse

What if your home network goes down while you are away for a week and you cannot get it back online?

Not a risk I am willing to take, so a backup server would be required.

pHr34kY@lemmy.world on 11 Jun 21:43 collapse

The longest outage I’ve had in a decade is when my primary SSD died a 2 months ago and I had to reinstall using config backups. It was down for around a day.

I’ve thrown a UPS on it and flown overseas for a week or two. It’s basically just email for me and the kids.

I’ve had longer outages on hosted services, TBH.

mojoaar@lemmy.world on 11 Jun 07:36 next collapse

I would not go down the route of doing it myself. Take a look at something like: migadu if it is simple mail hosting you are looking for.

smileyhead@discuss.tchncs.de on 11 Jun 13:56 collapse

Migadu is great but they state in their policy that automated (non-human) outgoing email like for password resets are not allowed.

mojoaar@lemmy.world on 11 Jun 14:12 collapse

Yeah, you a right. Didn’t read that requirement carefully enough.

shrugal@lemm.ee on 11 Jun 08:04 next collapse

I agree with everyone here that self-hosting email is never easy, but if you still decide to go down this route then here are two tips that I personally found very helpful, especially when you decide to host it at home:

The first is to get an SMTP relay server. That’s just another mail server that yours can log into to actually send its mail, just like an email client would. That way you don’t have to worry about your IP’s sending reputation, because everyone will only see the relay’s reputable IP.

Second is to configure a Backup MX. That’s an additional MX DNS entry with lower priority than the primary, and it points to a special mail server that accepts any mail for you and tries to deliver it to the primary server forever (or something like an entire week). So when your primary server is unreachable other sending servers will deliver mail to the backup, and it delivers the mail to the primary as soon as that’s back online.

You can get these as separate services, but some DNS providers (like Strato for example) offer both with the base domain package. It makes self-hosting an email server much simpler and more reliable in my experience.

Decronym@lemmy.decronym.xyz on 11 Jun 08:15 next collapse

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
IP Internet Protocol
SMTP Simple Mail Transfer Protocol
SSD Solid State Drive mass storage

4 acronyms in this thread; the most compressed thread commented on today has 5 acronyms.

[Thread #798 for this sub, first seen 11th Jun 2024, 08:15] [FAQ] [Full list] [Contact] [Source code]

kamenlady@lemmy.world on 11 Jun 09:17 next collapse

I once came to the conclusion that there is no easy mail server

Tetsuo@jlai.lu on 11 Jun 09:33 next collapse

If you do self host I suggest reading carefully the Gmail guidelines for mails. They are the leaders in the field and they dictate the level of security required.

DNS forward and reverse, DKIM, SPF, DMARC, ARC, DANE, bounce signature etc. Email is indeed a very complicated thing to host. I work on emails system all day and and I wouldn’t host my own mail.

Even worse I’m hoping email disappear and another technology takes it place. Emails are unreliable and outdated, they need to go.

rutrum@lm.paradisus.day on 11 Jun 10:25 next collapse

I used nixos-mailserver with success, and very little configuration. Most of it was dns, and thr guide walked me through it. You would have to a nixos box somewhere though. I spun one up on my vps for it.

pcouy@lemmy.pierre-couy.fr on 11 Jun 10:29 next collapse

Things have been going well for me, using docker-mailserver.

I followed the setup guide, did everything in the DKIM, DMARC and SPF documentation page. The initial setup required more involvement from me than your standard docker-compose self-hosting deployment, but I got no issues at all (for now, fingers crossed) after the initial setup : I never missed any inbound e-mails, and my outbound e-mails have not been rejected by any spam filter yet.

However, I agree with everyone else that you should not self-host an important contact address without proper redundancy/recovery mechanism in case anything goes wrong.

You should also understand that self-hosting an email address means you should never let your domain expire to prevent someone from receiving emails sent to you by registering your expired domain. This means you should probably not use a self-hosted e-mail to register any account on services that may outlive your self-hosted setup because e-mail is frequently used to send password reset links.

retro@infosec.pub on 11 Jun 12:08 next collapse

If you need to throw in the towel on email self-hosting, don’t be ashamed. Mail servers are one of the more difficult projects to run. If you do end up outsourcing this, I recommend SendGrid, it’s reliable and free.

darklamer@lemmy.dbzer0.com on 11 Jun 12:18 next collapse

As already mentioned several times, selfhosting a mail server is not recommended unless you’re particularly interested in hosting a mail server, but with that said, you might find this project interesting:

maddy.email

Toes@ani.social on 11 Jun 12:29 next collapse

I found this docker option.

hub.docker.com/r/apache/james#!

Although it’s pretty cheap to have someone else host it.

www.ovhcloud.com/en/emails/mail-hosting/

mypasswordis1234@lemmy.world on 11 Jun 13:15 next collapse

Please, just don’t. It’s pain in ass

just_another_person@lemmy.world on 11 Jun 14:15 next collapse

You are asking for a world of pain here.

merthyr1831@lemmy.world on 11 Jun 15:43 next collapse

don’t.

hperrin@lemmy.world on 11 Jun 17:35 next collapse

This is a can of worms, but you’re probably looking for something like Postfix. Running your own mail server is complicated. You need to set up SPF, DKIM, DMARC, and make sure outbound traffic on port 25 isn’t blocked. You need to check if your IP is on any block lists. You can do that here:

mxtoolbox.com/blacklists.aspx

deafboy@lemmy.world on 11 Jun 18:29 next collapse

mailcow.email

vext01@lemmy.sdf.org on 12 Jun 08:05 next collapse

I self host my email. It was hard work to set up. 0/10. Would not come again.

roofuskit@lemmy.world on 12 Jun 11:31 next collapse

I second this comment. It’s been a long time since I set one up and it was a pain. And from what I can tell it’s only gotten harder.

ErwinLottemann@feddit.de on 12 Jun 12:42 collapse

i self host my mails for almost 20 years now, it was hard work in the beginning, now it’s just a few updates a year. no problem with blacklists or anything, a good hoster is probably beneficial, 10/10 would recommend, even just to learn how all of this works

vext01@lemmy.sdf.org on 12 Jun 13:24 collapse

That’s true. I did learn a lot, but the idea of setting it all up again gives me anxiety.

palarith@aussie.zone on 12 Jun 11:16 next collapse

You don’t need a mail server to send emails

Use an smtp smart host like smtp2go

ozzyrockin@lemmy.world on 17 Jun 20:45 collapse

+1 to this worked for me, only issue was they block common free emails (like gmails etc) from making accounts but porkbun made it super easy to make a email forward that worked!

bastion@feddit.nl on 12 Jun 20:35 next collapse

Interesting how you use “simple” and “mail server” in the same sentence.

iarigby@lemmy.world on 12 Jun 22:22 next collapse

This tool is for your use case. It comes with bonus privacy features like unique address for each service so they can’t cross track you

simplelogin.io

smileyhead@discuss.tchncs.de on 13 Jun 12:09 collapse

SimpleLogin is for mail aliasing, not transactional mail.

MHanak@lemmy.world on 13 Jun 13:59 collapse

I’d advice against it, aside from spam filters, and it being a general PITA, there is a chance your ISP will block any outgoing mail traffic (in my case orange blocks it)

Humorless4483@lemmy.world on 13 Jun 16:16 collapse

Which orange ? I’m with orange Belgium.

cvf@lemmy.world on 13 Jun 22:16 collapse

All you need is a local smtp server that relays to another, “real” smtp server. I have a postfix that is configured to use the Proton smtp servers (before that it was Googles). No issues on Telenet.