Open source home e-mail server

I am looking into setting up a home email server. I am trying to decloud myself as much as possible, and this is one of the last things I need to get done but have no clue on how to set one up. I do not need a lot of performance from it. It will only be me and my wife. Possibly my kid later. I am looking to use a rasberry pi for the hardware, seems to be more than enough. But, the software is an issue. If not that I may look for a super cheap old server on ebay.

The real question is software. I want to try and use all open-source stuff if possible. On the client side, we have windows, linux, and android devices that would need to talk to it. I am assuming this won’t be an issue but figured I would mention it.

As I have stated many times, I really don’t recommend running your own email sever as people will not get your emails because your IP will not be on a trusted list. If that does not deter you then the next issue is making sure you have plan to keep the mail server you choose up to date with security issues, if not you will end up with some random threat actor REALLY invading your privacy. If you have solutions for those issues running a Debian server with Postfix works well.

As Tom stated it takes a lot of trial and error to get all the pieces working together, domain hosting, SPF and domain keys, then if you don’t own the IP from your ISP it’s a cat and mouse game to keep the SMTP name used during mail exchange up to date.

I still run a home email server but no longer using just cobbling together postfix, clamav, SpamAssassin, etc. Since I had a Synoolgy the software pieces are already there for running the email server and just had to configure the DNS pieces. Been running it there for two years but I still worry that I will be added to some block list. I have been lucky but it took a lot of effort. I still run weekly mxtoolbox analsis of my domain just to make sure.

If home ISP’s would say allow you to own your IP vs. leasing it would make things much simpler and to make things worse by me running my own server I am in violation of my ISP’s policies of hosting a servrer and they could start blocking ports or discontinue my services.

Exim SMTP server configured for Maildir delivery, Dovecot IMAP server, ASSP spam filter (acts as a SMTP proxy)

Hello, as others have advised against running your own server, and all for good reasons, I am sure you have your reasons of why it is right for you. To give you a frame of reference, although I have not run any email servers on a PI, I have been running my own for decades, up until mid 2020 where I have shut them all down and moved to other services, such as protonmail and other mail only hosted solutions.

With that said, I would suggest you not try to roll your own setup, but use a project such as

https://mailinabox.email/  

What is it?
Mail-in-a-Box lets you become your own mail service provider in a few easy steps. It’s sort of like making your own gmail, but one you control from top to bottom.
Technically, Mail-in-a-Box turns a fresh cloud computer into a working mail server. But you don’t need to be a technology expert to set it up.`

Please take the time to read about the project lead and the concepts behind the project.
Joshua Tauberer (@JoshData) began this project in 2013 and is the primary maintainer.

To be sure, you may have problems with using your Home service IP as an email service endpoint, but maybe you have already taken that into consideration and can control/configure it properly.

If not, I would suggest you have a look at The Helm. I have not used the project, but, they take care of WHERE your data is stored and more importantly, Clean usable IPs.

https://www.thehelm.com/
Privacy matters,
own your data.

Protect your life online
Take back ownership of your most important data like your files, photos, emails, browsing activity and more. Helm’s suite of privacy-first services protect and secure your online life.

Good luck, I would be interested to hear what you end up doing.

Best, Paul

Thanks for the info. I will dive into and do some reading.

As for the IP issues, I was planning to use one of the DNS services I have used for other hosted servers I have run. Maybe my assumption is wrong, but I figured I could be able to forward an email domain like any other domain.

For inbound your IP does not really matter unless your ISP is blocking mail ports as some do. The challenge is getting any email sent out as your IP will not be on a trusted list.