Thinking of setting up a mail server.
I really want to avoid ending up blacklisted, does anyone have any advice about running their own mail server?
please boost.
Thinking of setting up a mail server.
I really want to avoid ending up blacklisted, does anyone have any advice about running their own mail server?
please boost.
@dirtycommo definitely doable. Highly recommend Stalwart. Itโs easy, fast, and so far rock-solid (and this is coming from someone who hosted their own Postfix/dovecot instance for the last 15 years).
Make sure you find a VPS that will work with you on opening ports 25 et.al and also watch spammers on their network to keep their IP blocks from being blacklisted.
In the US Iโm very happy with Linode. Thatโs where Iโve run a half-dozen email domains for all this time. Support is great too (real people respond!)
@dirtycommo Depending on where you host, the challenge is finding a clean IP. Creating custom delivery rules by recipient or using a third party for delivery if your hosting provider is blacklisted are useful workarounds.
Two great resources for tuning SPF, DKIM and DMARC:
https://seanthegeek.net/459/demystifying-dmarc/
https://www.learndmarc.com/
OpenDKIM is great.
@dirtycommo the major thing is having outgoing email coming from a trusted ip-address range. I have had many problems running on a random vps, because of other tenants sending spam. Sending to Gmail, outlook.com etc has been a big problem.
Now I have finally been able to send email via an ip address originating at my employer, and those issues have gone away.
You will also need to implement every anti spam feature out there, like dmarc, SPF and dkim. That part is fairly easy though, and you can definitely do it.
@dirtycommo I use postfix and dovecot on my mail server. Been running my own mail server for decades now.
As regards blacklisting, if you mean Google etc, make sure you have DMARC and SPF setup, I found OpenDKIM to be a bit of a mare, but that too. Not having it hasn't affected my mail.
If you're forwarding to Gmail (like with status updates) be aware that you might get temp blacklisted cos they do that with new servers with high frequency.
A pain, but if you have DMARC, SPF etc that shouldn't happen or will lapse after a short while. There are ways to tell Google they have made a mistake but dunno if it really speeds anything up.
Keep an eye on anyone else using it for spam, and also you'll want to use various blacklists yourself, RBL etc - there are lists out there of the big ones to plug into Postfix. Also of course put in the usual protocols and security checks for clients, TLS etc. But be aware some clients are terribly coded and it might block some genuine people or mail, so test and monitor.
@dirtycommo There can be a lot of parts to it and get a single one wrong can cause problems. But most things are not that hard to get right and once you set them up once, maintenance is generally easy.
I can very much recommend the Mailcow suite as an easy in to hosting your own mail server. That's what I've been using for years and it's worked very well for all this time.
For testing of your setup I can very much recommend this site: https://www.mail-tester.com
If you get a 10/10 there, you're all set, if it's less: Needs fixing.
Otherwise: IP and domain reputation is important. Newly bought domains will have problems sending mail, they need to be somewhat older. And IP-wise only datacenter IPs work and blocklists block entire prefixes, so something like a cheaper VPS is more likely to be in a prefix with spammers and get blocked.
I run mine on a dedicated server and ever since moving it there, I didn't have a single blocklist issue.
Otherwise: I can only encourage you to give it a shot. Self-hosting my mail remains one of my favorite things.
So I've been using Mailcow: dockerized for quite a while now, and it works well for me.
It's about as simple as it gets, just make sure you follow their guide about PRT, SPF, DKIM, and DMARK records, tho you need to do that with all mail servers, this is how you don't get blacklisted.
The software handles pretty much everything: webui for admin, (optional) webmail, Spam filtering, full text search, IMAP, postfix for SMTP, it even has an optional Malware Scanner using ClamAV tho I have that one disabled as it's just using RAM and compute.