Live data from Hacker News

How to Run Your Own Mail Server (2017)

c0ffee.net

141–150 of 339 posts

Re: How to Run Your Own Mail Server (2017)

#141
Yeah, it's learnable, it's doable, it really doesn't need to be all that hard.

And then ... after you've done every damned thing exactly by the book, and DKIM'ed the dickens out of your headers, killed the spam, policed yourself off the blacklists, etc. etc. - turns out you might as well not have bothered. The googles and the microsofts (the microsofts especially!) will one day drop your outgoing mail without the slightest notification, because the ip range, or because the full Moon, or just because they can.

I ran that show for nearly fifteen years, but threw in the towel last year, and handed over to Fastmail. With regret, although their service is first rate.

Email is not a succesful federated protocol these days. The monoliths effectively killed it off.

Re: How to Run Your Own Mail Server (2017)

#142

Earlier quoted context omitted.

I run an E-mail server with over 250,000 users. I started by following some generic "dovecot+postfix+mysql" tutorial on howtoforge and I'm still using mostly the same setup over 4 years later. >Then your email doesn't work and you could be missing out on important communications Pretty much every E-mail server will retry sending your E-mail for a long time (like 2 days is default on postfix). Once your mail server co…

Would you be able to share some stats, like how much disk space these accounts take up and such? For larger scale e-mail sending I built my own MTA ( https://github.com/zone-eu/zone-mta ), our main instance sends about 750k emails a day (mostly normal ISP traffic, maybe 25% marketing emails) and its most valuable feature is juggling with IP addresses and blacklist detection, so if some mailbox gets hacked, starts sen…

Oh, btw, the easiest way to test ZoneMTA would probably be to install the WildDuck mail server to some empty VPS. The install script, amongst other things, installs and configures ZoneMTA https://github.com/nodemailer/wildduck/tree/master/setup

Re: How to Run Your Own Mail Server (2017)

#143

I run my own mail infrastructure. To say the least I wouldn't recommend it even to my worst enemies. It's horrible. Actually it's fine until it's not. Then your email doesn't work and you could be missing out on important communications. And then you're scrambling to figure out how the spammers managed to exploit your setup this time. And you have to learn a tonne of crap in order to manage it... and the text files!…

"And then you're scrambling to figure out how the spammers managed to exploit your setup this time."

...

" ... writing a MTA with the goal of minimizing configuration and being secure and resistant to attacks by default. "

As a 20+ year UNIX sysadmin and fellow owner of my own email infrastructure for 18 of those, I am surprised to read this and am not even sure what you are talking about.

Can you explain what you mean by attacks and exploits from spammers ?

Other than accidentally running as a relay or actually having a remote exploit in your server(s), what are the attacks that you have in mind ?

"Configuration that will soon be exploited in strange ways."

Again, am genuinely interested in an explanation ... other than running as a relay, and maybe handling backscatter (but that's not really config, it's just a blacklist) what are you referring to ?

Re: How to Run Your Own Mail Server (2017)

#144

I run my own mail infrastructure. To say the least I wouldn't recommend it even to my worst enemies. It's horrible. Actually it's fine until it's not. Then your email doesn't work and you could be missing out on important communications. And then you're scrambling to figure out how the spammers managed to exploit your setup this time. And you have to learn a tonne of crap in order to manage it... and the text files!…

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)

#145

I run my own mail infrastructure. To say the least I wouldn't recommend it even to my worst enemies. It's horrible. Actually it's fine until it's not. Then your email doesn't work and you could be missing out on important communications. And then you're scrambling to figure out how the spammers managed to exploit your setup this time. And you have to learn a tonne of crap in order to manage it... and the text files!…

I have to say, I've been running my own mail server without a single problem for years. OK, the way I do it is a stretch of the definition of "running my own web server" but I have full control.

What do I do?

Get a nice VPS from a company like GoDaddy. Setup whatever domains you need. Setup as many email accounts as needed. And off you go. No problem. I don't even have to think about email.

I thought about rolling my own on one of our Linode servers but every time I compare the no-brainer of doing the above to what it would take to run this ourselves on Linodes I can't justify the pain and aggravation.

What I don't like about the Gmail approach (other than it is Gmail and I do not trust Google to not shut down all of our accounts for some stupid reason) is the cost. I can spend a few bucks a month on a VPS and have a hundred email addresses. The same on Gmail would cost significantly more and you would be under their irrational thumb.

A few years ago I looked into running Zimbra on Linode. Back then it was so resource hungry it just didn't make any sense. I wonder if it has gotten any better over time? I really like the concept.

Re: How to Run Your Own Mail Server (2017)

#146

How to run your own mail server: Don't. How to run your own mail server (for experts): Don't. I say this as someone who has run my own mail server for 20+ years. Now, if you absolutely have to get off Google, and the other available hosted options don't work for you, then this article looks like a good start. I'd add roundcube for web access and letsencrypt for SSL. One thing you'll never really get, in my experience…

> One thing you'll never really get, in my experience, is good spam handling.

Not in my experience. I'm in general very happy with the results of SpamAssassin. Occasionally sth. slips through but when I compare it to my gmail account it's not worse, maybe even better. The only thing I use in addition is postscreen [1] (pregreet test only) to stop the dumbest category of spam bots.

[1] http://www.postfix.org/POSTSCREEN_README.html

Re: How to Run Your Own Mail Server (2017)

#147
post #53

Earlier quoted context omitted.

I've been running my own mail servers since the mid-90s, and always only a single server. SMTP keeps retrying, so you can be offline. The transport layer was designed to deliver mail to servers even if those servers only dialled in to one of the "internets" once per day, so it's fine to have some downtime. It's totally up to you how you prioritise getting a server back up again, and frankly if the message can't handl…

This is actually frustrating, e.g. with a large power outage when you expect an important message. I run my mailhost (single-node) since 2005 and I thought that I need HA more than once or twice. Sadly, I haven't figured out a proper fully-redundant solution. Syncing mailboxes with e.g. Syncthing is way too fragile. Recently, I wanted to experiment with DBMail + CockroachDB cluster but haven't yet found time for that…

Redundancy requirement was one of the reasons I started building WildDuck mail server. It can be set up with no-spof components, everything can be replicated. https://github.com/nodemailer/wildduck#no-spof-architecture

Re: How to Run Your Own Mail Server (2017)

#148

Earlier quoted context omitted.

I run an E-mail server with over 250,000 users. I started by following some generic "dovecot+postfix+mysql" tutorial on howtoforge and I'm still using mostly the same setup over 4 years later. >Then your email doesn't work and you could be missing out on important communications Pretty much every E-mail server will retry sending your E-mail for a long time (like 2 days is default on postfix). Once your mail server co…

Would you be able to share some stats, like how much disk space these accounts take up and such? For larger scale e-mail sending I built my own MTA ( https://github.com/zone-eu/zone-mta ), our main instance sends about 750k emails a day (mostly normal ISP traffic, maybe 25% marketing emails) and its most valuable feature is juggling with IP addresses and blacklist detection, so if some mailbox gets hacked, starts sen…

Sure, the mail storage currently takes up 1.01TB, using dovecot's mdbox. This mail store started in January 2016, after the service got raided twice by german authorities[0] (at request of u.s. gov), otherwise it would be larger.

I'm not going to run like per-user stats but I know historically there's been about 11kb per E-mail on average, so that's about 90 million mails stored. The MTA itself sends and receives a bit over 20 million E-mails annually, so the extra from that is probably from the mailing list I run on the same server (where each message only counts as 1 for statistical purposes)

How I prevent outgoing abuse is a black box, but I do it well enough that mail from my server almost never ends up in spam. But given that it's a free service I definitely don't have the budget to warm up and dynamically scatter mail across IP space to maximize deliverability. Cool technique, though!

[0] https://archive.is/etfDM

[0] https://archive.is/etfDM

Re: How to Run Your Own Mail Server (2017)

#149

> Before we dive in, an important caveat: You will become a sysadmin of your own mail server. This for me is the deal breaker. I say this as a sysadmin. It's all well and good running a single server but if that shits the bed then you have to deal with it immediately. So to run something that doesn't require 24/7 support I now have to run a cluster of servers. I'll also need something to manage those servers like sal…

"So to run something that doesn't require 24/7 support I now have to run a cluster of servers."

My two most recent uptimes for my personal FreeBSD mail+web server were each over 1200 days.

My current months sent-mail folder stretched back for years - which is to say, my (al)pine process itself was 3+ years old.

No, you don't need a cluster of servers for your personal mail server.

Post reply on HN