News for hackers. Stuff that matters.
Re:How to Run Your Own Mail Server (2017) by inferiorhuman on Friday January 26, 2018 @11:51AM (#16240645)
My experience was quite the opposite (granted I'm an ops guy these days anyhow). I've been self-hosting mail for ages with a postfix + dovecot + cyrus + spamassassin + opendkim + dkimproxy + lets encrypt stack. Everything just works, although I'm going to move it into a jail sooner than later so I can rebuild it more easily.

The biggest pain is no longer having a static IP or reverse DNS (thanks Sonic!). Having reverse DNS setup and an IP address that doesn't map to a pool of dynamic IPs are the big things that will keep you off of spam lists.

Coming from sendmail I think postfix and dovecot have been a breath of fresh air. The defaults generally just work. Getting inbound (so spamassassin can check) and outbound dkim to work were the trickiest part. Aside from regular OS updates it's largely hands off.

Re:How to Run Your Own Mail Server (2017) by toomim on Friday January 26, 2018 @05:54PM (#16243558)
> I've been self-hosting mail for ages with a postfix + dovecot + cyrus + spamassassin + opendkim + dkimproxy + lets encrypt stack.

So you call it easy to configure together 7 different systems just to get a working mail server?

Re:How to Run Your Own Mail Server (2017) by inferiorhuman on Friday January 26, 2018 @07:00PM (#16243925)
> So you call it easy to configure together 7 different systems just to get a working mail server?

Yes, with the qualification that I brain farted on cyrus (not using that for mail) and you can just as easily skip the two dkim packages (which were a bit tedious to figure out).

Postfix works out of the box. Diffing the stock main.cf with mine the differences are: new additions that never made it into my main.cf, a few lines to enforce stronger TLS ciphers (optional), a manual blacklist (optional), virtual domain stuff (also optional), milter lines for dkim and spf (optional), a line to deliver to procmail instead of directly to a mailbox (optional), and a line to enable mail relay access to authenticated users (also optional). You could install postfix and have a good experience out of the box.

Dovecot: a line to enable verbose process names (optional), a stanza to enable the SASL backend (optional), a line to specify which keys to use for TLS (mandatory), a few lines to up per-user limits (optional). Setting up SSL is going to be the hardest part, and even that shouldn't be too bad.

Procmail: A couple lines to pipe everything to spamassassin and deliver to a mailbox or a spam folder. This may be considered tricky by some but procmail is ancient and, in my experience, examples abound.

Spamassassin: No changes. In fact I think I've ripped out most of my custom config except for some whitelist stuff.

Four packages and you'll have a working SMTP and IMAP server. No, I don't think that's difficult. Wrangling an OpenLDAP install, sure that's difficult. This? No. Scaling it out to hundreds or thousands of users is trickier, but not something the typical home user would need to bother with.

For everything above there's actually quite good documentation. What's difficult is figuring out which packages to install in the first place and deviating from the stock configurations for the little extras you may want, but even then the big challenge is in taking the time to read the documentation and figuring out which features you want. Maintenance is trivial, although I probably should update my postfix config to get it in line with the current config syntax.

Re:How to Run Your Own Mail Server (2017) by icelancer on Friday January 26, 2018 @06:53PM (#16243887)
iRedMail will do this for you in one shot. I've done it. I still don't recommend it, but it's pretty easy.
Re:How to Run Your Own Mail Server (2017) by aaron_m04 on Saturday January 27, 2018 @01:53AM (#16245165)
Why don't you recommend it?
Re:How to Run Your Own Mail Server (2017) by icelancer on Saturday January 27, 2018 @06:11PM (#16248646)
For the same reason(s) everyone else in this thread is crapping on running your own mail server. There's really no need to.
Re:How to Run Your Own Mail Server (2017) by nmjenkins on Friday January 26, 2018 @04:55PM (#16243212)
Do you really use both Dovecot and Cyrus? Which one do you use for what?
Re:How to Run Your Own Mail Server (2017) by inferiorhuman on Friday January 26, 2018 @05:29PM (#16243434)
Not Cyrus IMAP, but their SASL library. Actually, I just looked. Cyrus-sasl was pulled in as a dependency for mutt. I'm using Dovecot for postfix's SASL backend these days. This allows relaying mail for authenticated users only.

Dovecot uses PAM for authentication, and so any user with an account can log in and access their own mailbox and send mail out. The biggest downside is that because I'm deviating from the default FreeBSD configuration for postfix I'm on my own in terms of updates.

I should also clarify the above statement about moving it all into a jail -- I mean a jail managed by (in this case) ansible. Yes, if you just slap something together it will be brittle no matter what stack you choose. Ansible + Jenkins + Jails make it much easier to manage changes.

Edit: Oh yeah, and I've thrown procmail in there for good measure.

Re:How to Run Your Own Mail Server (2017) by okket on Friday January 26, 2018 @05:28PM (#16243429)
'since ages' with Let's Encrypt?
Re:How to Run Your Own Mail Server (2017) by inferiorhuman on Friday January 26, 2018 @05:29PM (#16243436)
No. Let's Encrypt was a fairly new addition. Previously I was using self-signed certs that I'd install manually in the client.

But I've been self-hosting mail services for over a decade at this point. It's seen a variety of permutations including some with Sendmail, some with postgres backed lookup tables for virtual hosting, and so-on.