Hi team, all this post is about personal use,<\/p>\n
Since few months, or even years, having all my mails on google servers is bothering me. So I am seriously thinking about creating a standalone mail server here in my home. The aim is not either to create huge security braches in my private network and my personal datas. So I imagined a solution like this:<\/p>\n
Buying a RaspberryPi, installing proxmox on it, making a virtual debian server (so i can install a small kali vm besides for personal purposes). I would host a mail server with apache on the debian VM, with a certbot to create a selfmade certificate for a domain i would buy. Then I think I have to open some ports on my ISP router, and maybe do NAT/PAT. I might have to open some firewall ports (567 or smth). Then I would take a NAS to backup my mail every 3 or 4 days or every day i’m still not sure.<\/p>\n
Considering this I have some questions:<\/p>\n
Does the general plan looks good?<\/p>\n
Would a standalone mail server work correctly on 2Gb of RAM?<\/p>\n
Do you have some recommandations for mailserver packages?<\/p>\n
Is it mandatory in a security approach to force connection on the mail server via VPN? Like with an OpenVPN server? Even if this would increase performance needs.<\/p>\n
Thanks<\/p>","upvoteCount":31,"answerCount":30,"datePublished":"2022-12-01T18:07:45.000Z","author":{"@type":"Person","name":"greyotter","url":"https://community.spiceworks.com/u/greyotter"},"acceptedAnswer":{"@type":"Answer","text":"
Firstly, I’m pretty much aware of all the concepts around mail and firewalling, etc… Since I’m an admin of linux servers for my company don’t worry about managing UTMs, firewall even the infrastructure.<\/p>\n
Considering what everyone mentioned, I clearly heard hosting such a system at home could reveal to be really hard in terms of external factors (mainly due to ISP). So I am now considering hiring a cloud VPS to host my system. It would be perfect if I could install a Proxmox or maybe ESXI on e cloud VPS to create a local network with the mail server, a firewall, an UTM. And yes I’m aware this would be a lot of work but I don’t care, I won’t move my main mail address to such a system if I am not sure everything is working and reliable in terms of security and features, and is persistent and not so hard to manage. So all this would be in a “test environnment”. As @jadrien<\/a> said, I’m not aware of cloud providers terms of services providers, but this could be a stopping point for my project. I have to read them.<\/p>\n Even if I have just a UNIX/Linux OS on a cloud VPS, I’m sure such an environnment can be doable with LVM or something similar.<\/p>\n I feel like I already said this 3 times, but, If you purpose any solutions from a GAFAM to replace GMAIL, this is not relevant for me. I think you havn’t understand my point of view if you say this. However @chivo243<\/a> has what looks like good solutions. If I have to use a cloud VPS solutions to host my emails, to be coherant, I will have to encrypt the more datas I can and maybe export all I can on my home network. So my cloud VPS will more be considered like a “mail relay”.<\/p>\n Thus, I repeat myself again but this project is born in a private scope. Nothing related with business stuff. Of course my personal emails sometimes are related to business stuff for my career or some stuff, but this project is not for a company use. Also, I do this because its fun and I have some times to spend on private projects and this looks like a cool project to realize even if I never reach what I want, it wont ever be a lost of time. Anyway, the real aim is to escape GAFAM.<\/p>\n Thanks for almost everyone comments, much interesting things and approach in there for sure.<\/p>\n @dreniarb<\/a> @rsmedley87<\/a><\/p>","upvoteCount":1,"datePublished":"2022-12-05T09:38:46.000Z","url":"https://community.spiceworks.com/t/standalone-private-mail-server/941516/26","author":{"@type":"Person","name":"greyotter","url":"https://community.spiceworks.com/u/greyotter"}},"suggestedAnswer":[{"@type":"Answer","text":" Hi team, all this post is about personal use,<\/p>\n Since few months, or even years, having all my mails on google servers is bothering me. So I am seriously thinking about creating a standalone mail server here in my home. The aim is not either to create huge security braches in my private network and my personal datas. So I imagined a solution like this:<\/p>\n Buying a RaspberryPi, installing proxmox on it, making a virtual debian server (so i can install a small kali vm besides for personal purposes). I would host a mail server with apache on the debian VM, with a certbot to create a selfmade certificate for a domain i would buy. Then I think I have to open some ports on my ISP router, and maybe do NAT/PAT. I might have to open some firewall ports (567 or smth). Then I would take a NAS to backup my mail every 3 or 4 days or every day i’m still not sure.<\/p>\n Considering this I have some questions:<\/p>\n Does the general plan looks good?<\/p>\n Would a standalone mail server work correctly on 2Gb of RAM?<\/p>\n Do you have some recommandations for mailserver packages?<\/p>\n Is it mandatory in a security approach to force connection on the mail server via VPN? Like with an OpenVPN server? Even if this would increase performance needs.<\/p>\n Thanks<\/p>","upvoteCount":31,"datePublished":"2022-12-01T18:07:46.000Z","url":"https://community.spiceworks.com/t/standalone-private-mail-server/941516/1","author":{"@type":"Person","name":"greyotter","url":"https://community.spiceworks.com/u/greyotter"}},{"@type":"Answer","text":" Unfortunately, Google has made running email yourself very hard. Without being on the authorized list as a valid SMTP server, most of your emails will always go to spam or never get delivered at all. What you could do is use an SMTP service in order to send emails. Receiving email is always doable, it is sending that is hard. You will 100% have to have SPF/DKIM/DMARC configured to not be flagged and even then if you get one blacklist it’s a cascading event that gets your server blacklisted real quick.<\/p>","upvoteCount":6,"datePublished":"2022-12-01T19:11:44.000Z","url":"https://community.spiceworks.com/t/standalone-private-mail-server/941516/2","author":{"@type":"Person","name":"rsmedley87","url":"https://community.spiceworks.com/u/rsmedley87"}},{"@type":"Answer","text":" Hosting your own email used to be super simple. Little small application to listen for smtp and pop3 requests. Forward some ports on the router. MX record in your DNS. Start sending and receiving email!<\/p>\n But now - wow it has become quite complex. I still self host my company’s email and my personal email but if I was starting out fresh today I’m not sure I’d want to self host.<\/p>\n Unless you plan to use an smtp relay service for outgoing mail you’re going to need a static ip address at home. Dynamic won’t work. And you’ll probably want two in case your main one gets blacklisted. SPF is certainly important. DKIM/DMARC are good to have. The mail server will need a valid certificate for both smtp and pop3 use. And your ISP will need to allow traffic on port 25 which might require a business account.<\/p>\n i have no suggestions on mail server options for linux. But I’ve used both Mail Enable and hmailserver on Windows. There are pros and cons to each. But i think mail enable is the superior offering particularly since their free version has a lot of good features.<\/p>\n Good luck! Have no doubt that it is/will be a fun project to work on.<\/p>","upvoteCount":2,"datePublished":"2022-12-01T19:31:57.000Z","url":"https://community.spiceworks.com/t/standalone-private-mail-server/941516/3","author":{"@type":"Person","name":"dreniarb","url":"https://community.spiceworks.com/u/dreniarb"}},{"@type":"Answer","text":" You would likely need several things to run an email server<\/p>\n I would rather look at how to backup your Gmail & options to migrate to another platform if required rather than create your email server.<\/p>","upvoteCount":1,"datePublished":"2022-12-02T03:22:10.000Z","url":"https://community.spiceworks.com/t/standalone-private-mail-server/941516/4","author":{"@type":"Person","name":"adrian_ych","url":"https://community.spiceworks.com/u/adrian_ych"}},{"@type":"Answer","text":"\n