Lurker News
Recently I decided that I wanted to run my own MTA. Downloaded qmail, applied a couple of patches and it was done. The problem is making sure my mail is not marked as spam by the major MTAs out there, gmail and hotmail both mark my mails as spam. So far I've:

- made sure I'm not running an open relay (obviously)
- made sure a reverse lookup to my IP matches my host
- made sure my IP wasn't already in any spam IP blacklist
- added SPF
- added DKIM
- run a lot of tests at glockapps.com
It's still not enough. I don't know what else to do, is it possible to run your own MTA, for personal use in 2016? Who, here, is doing it successfully?

Comments (299) 108 threads

Show all comments

Showing thread 1 of 108

Nux13 replies#
It's absolutely possible to run an email server in 2016 and I encourage anyone capable to do so!

Email is one of the bastions of the decentralised Internet and we should hang on to it.
Every day more and more people are moving to Gmail/Hotmail/Outlook and while I do understand the reasons, it also puts more and more power into the hands of these providers and the little guy (us) gets more screwed (like marked as junk by default by them :< )
Having said that, here's my check list for successfully delivering email:
- make sure your IP (IPv6) is clean and not listed in any RBL, use e.g. http://multirbl.valli.org/ to check
- make sure you have a correct reverse dns (ptr) entry for said IP and that ptr/hostname's A record is also valid
- make sure your MTA does not append to the message headers your client's IP (ie x-originating-ip), messages can be blocked based only on "dodgy" x-originating-ip (see eg https://major.io/2013/04/14/remove-sensitive-information-fro... )
- set up SSL properly in your MTA, there are so many providers giving away free certs nowadays
- SPF, DKIM, DMARC - set them up, properly, this site can come in handy for checking yourself https://www.mail-tester.com/
- do not share the IP of your email server with a web server running any sort of scripting engine - if it gets exploited in any way usually sending spam is what the abusers will do
- last but not least - and while I loved qmail and vpopmail - use Postfix or Exim, they are both more fit for 2016, more configurable and with much, much larger user bases and as such bigger community and documentation.
HTH

colejohnson661 reply#
Burn how do you ensure your mails aren't tossed in the spam box of the big ones?
rasjani#
Each of the points mentioned in the post you replied to contribute to the decision if big players mark your mails as spam or not.
darkhorn#
Plus make sure that your whois is not registered behind proxy registrars. In other words use your real name and real email address.
madez1 reply#
I disagree with you. I consider email legacy technology because of its reliance upon DNS and static IP addresses. These two requirements make hosting email unnecessarily costly.
a3n1 reply#
What replaces email?
quickben3 replies#
For most of the people I interact with, and most of the usecases: Viber

Continue this thread — 3 replies

noinsight2 replies#
I would suggest running OpenSMTPD over any of the alternatives, it's much easier to configure and should be/remain secure as it comes from the OpenBSD people (the audit from Qualys attests to that).
X86BSD1 reply#
Yeah I'll have to disagree here. I beat my head against this horribly documented MTA just trying to get virtual users to work with a relay host. I gave up after three days of slitting my wrists trying to get it to work. It's horribly documented, getting help out of the obsd folks is like getting blood from a turnip, but if it works for you great! But I would never agree it's easier to configure or has better documentation than postfix.
MustardTiger2 replies#
I'm genuinely curious here since opensmtpd has been by far the easiest to configure MTA I've ever seen. What problem(s) did you have? Virtual users through a relay host is literally one simple line:

    accept for domain "example.com" virtual  relay via relay.example.com
I don't see how anyone could conclude that is more difficult than postfix.

Continue this thread — 2 replies

noinsight1 reply#
Yeah those issues were found in the Qualys audit. They have been fixed so the codebase should only be stronger now.

I just wish we had something that wasn't written in C.

Continue this thread — 1 reply

thomasjames1 reply#
I recently ran into issues with the PTR on a mail server and did the lazy/unsustainable move of just disabling IPv6. Wish I had found this post before!
mgbmtl#
If you can't control your PTR on IPv6, in postfix I recommend using: "smtp_address_preference = ipv4", instead of fully disabling IPv6.

This way you can still receive email from IPv6 servers.
I run an smtp server from home with a static IPv4 address (for which the ISP lets me configure the PTR), but their IPv6 is "beta" and they don't yet support delegation, which is rather frustrating, but different topic.

merb3 replies#
SPF, DKIM, DMARC could be dropped if you actually use aws ses to send your mails, you can actually forward the mails there. So it's pretty impossible that your messages will be in spam. The only thing you need to manage is incoming mail now and not being a open relay.
cddotdotslash#
And if you still want them, AWS supports enabling these for your outgoing emails.
loup-vaillant#
Hence defeating one of the main purposes of running your own mail server in the first place: decentralization.
matthewking1 reply#
Unfortunately SES servers seem to be regularly blacklisted. A quick google confirms. I've been using SES for 3-4 months now and had a few hard bounces with specific mention to the IP being banned.
voltagex_1 reply#
The last spam that got through GMail's filter was from amazonses.com. It wasn't clear how to report it back to Amazon.

Continue this thread — 1 reply

jwr5 replies#
> Email is one of the bastions of the decentralised Internet and we should hang on to it.

This.
I hope someone will eventually create an "E-mail server in a box" package for Ubuntu LTS, so that more people can run their own E-mail. I'm not saying it has to be super-easy for everyone, just that it should avoid unnecessary chore work (like configuring postfix to always use TLS, or plugging postgrey into postfix).

nickpsecurity2 replies#
That attempt at the problem looks pretty nice. Thanks for sharing it.

Continue this thread — 2 replies

malbs#
a recommendation for mailinabox, I've been using it for about 6 months, very nice
tqwhite3 replies#
I've been using it for a year. Works great. One of the most thoughtfully designed and complete bits of software I've ever run into.

I'm especially delighted with it's self monitoring and the status change email messages it sends me.
That it includes webmail and gives me a nicely featured DNS server only makes it a touch more awesome.
I run it at Digital Ocean for ten bucks a month. I support family and friends. My email does not pass through google or microsoft servers and that makes me very happy.

Continue this thread — 3 replies

Continue this thread — 14 replies

Continue this thread — 3 more replies

Continue this thread — 6 more replies