Self hosting email, FLOSS, Python ...
from Jerry_Steiner@lemmy.sdf.org to selfhosted@lemmy.world on 25 May 05:10
https://lemmy.sdf.org/post/35283952

Hi,

I would like to host my own email server.

I know the pros and cons of doing so, please do not post about the advantage or disadvantage, there is others open topics for it.

I would like my setup fit those "requirements"

 

If you know a matrix comparison between email servers I’m all ears.

If you have any feedback with a solution this is most welcome too.

I plan to update this post to create a matrix/spreadsheet of all the solutions that I’ll gather.

Thanks.

#selfhosted

threaded - newest

Shimitar@downonthestreet.eu on 25 May 05:20 next collapse

See my personal notes. I do selfhost mail server, but on a vps to have a good IP

Being doing so for 20+ years and recently rebuilt the entire stack.

See wiki.gardiol.org/doku.php?id=email%3Astart

In short, I use postfix+dovecot, with opendmark and opendkim. Setup proper DNS email specific records and a few more steps.

Overall it runs fast and perfect on 4gb ram very old dual core atom CPU.

hddsx@lemmy.ca on 25 May 09:05 collapse

Too lazy to read wiki link, but I too postfix/dovecot

tfowinder@lemmy.ml on 25 May 05:22 next collapse

I have heard people have successfully utilised Mailcow without any issues for many years.

Personally gave it a try once but setting up ports, firewalls, virus scans, anti spams, dns felt too much effort for what I was going to use it for

nixx@lemmy.ca on 25 May 07:52 next collapse

I second Mailcow. I use it on a residential IP and have a smarthost for relaying in/out since my isp blocks port 25.

For relay, I use mxroute.com, I have a lifetime account and Mailcow has a fetchmail option.

ikidd@lemmy.world on 25 May 11:42 collapse

Using Mailcow for years now, love it, but I don’t think it checks the custom scripts box of OP. Since it’s all containers, you’d have to do some custom bind mounts to hook the underlying containers and keep the scripts, which might have some unintentional consequences depending on the upgrade.

aksdb@lemmy.world on 25 May 05:35 next collapse

Use Stalwart as mailserver. Besides coming with sane defaults, it allows to put hooks into almost every mail stage. Those hooks can be sieve scripts, local binaries or http calls.

2xsaiko@discuss.tchncs.de on 25 May 08:23 collapse

From its web page it sounds like it is both a MTA and MDA, has a built-in spam filter, plus has calendar, contacts and file storage. Do you know how it compares to my current setup of Postfix, Dovecot, and rspamd (and Nextcloud for the others)?

aksdb@lemmy.world on 25 May 08:37 collapse

Well exactly as you say: it’s a single service instead of having to combine multiple. In my case dovecot was a lot faster for my mailboxes, but postfix was a piece of shit and I was happy to get rid of it and the many components (rspamd, dkimproxy, etc.) it required. It has far too many footguns, and I shot myself multiple times with them over the years. So the most important part (SMTP) is significantly simpler and IMO better with stalwart. And the mailbox part hopefully evolves as well (it already has JMAP, so that is already an advantage over dovecot as well).

2xsaiko@discuss.tchncs.de on 25 May 09:46 collapse

Tbh I haven’t had too many problems with Postfix – however it is certainly a footgun and it would be nice to have fewer parts to connect together, and better defaults. I might try it out, it looks interesting.

A_norny_mousse@feddit.org on 25 May 06:19 next collapse

All your requirements are a given, except for wanting to do things in Python.

Theoriginalthon@lemmy.world on 25 May 06:44 next collapse

Postfix and write a milter (mail filter), you can get them to interact a various points in the mail delivery.

I think most things can be accomplished within postfix

[deleted] on 25 May 11:02 next collapse

.

quelsh@programming.dev on 25 May 15:56 next collapse

Modoboa is made with Django iirc, so that might be a good starting point

InverseParallax@lemmy.world on 25 May 16:45 next collapse

Ran the stack manually for decades, but spam makes it harder.

Run mailinabox now, it takes care of everything pretty well.

Lyricism6055@lemmy.world on 25 May 17:39 collapse

I definitely don’t suggest self hosting email unless you don’t care about losing messages occasionally