Live data from Hacker News

How to Run Your Own Mail Server (2017)

c0ffee.net

241–250 of 339 posts

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

#241
post #201

Earlier quoted context omitted.

You can have a backup server that holds your e-mail until your main server goes back up. You configure priority in DNS zone file.

Backup MX is usually not necessary, especially for home setups. Anything RFC-compliant will retry sending its email to you for days after being rejected.

It's also generally not a wise idea unless you also have your anti-spam/anti-virus setup running on it as well, since things like graylisting can only be done BEFORE the MTA accepts the message.

Spammers WILL know how to search your mx records for things like mailbagging servers and try to exploit them to bypass your security, just don't do it - the sending party will retry.

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

#242
post #82
post #59

Earlier quoted context omitted.

« The great thing is that I can dish out unique email address » That's the number one reason I would like to run my own server. (And, no, the Gmail trick of adding "+foo" to the username doesn't satisfy me because spammers know this trick and can strip it.)

Couldn't you just setup a domain with an email hosting provider and then turn on catch-all for that domain? For me I can just use any email @my-domain and it will be forwarded to my actual email address.

Then you start getting an amazing number of emails to alice@yourdomain.com, bob@yourdomain.com, chris@yourdomain.com, dan@yourdomain.com, ceo@yourdomain.com, sales@yourdomain.com, etc.

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

#243
post #119
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…

caveat: keep your DNS up always - so have a backup if this is running DNS - many mailing list programs and other things will drop a mail immediately if the destination cant be resolved..

People running their own mail probably would be less nervous about hiring someone for DNS?

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

#245

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 rever…

Do you really use both Dovecot and Cyrus? Which one do you use for what?

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

#246

I use iRedMail and set up my own mail server for my small business. I am beginning to wish I hadn't, even though I've had literally 0 problems outside of a single reboot to fix an issue. https://www.linuxbabe.com/mail-server/ubuntu-16-04-iredmail-... I dunno. I feel like I'm sitting on a timebomb. It's hosted on DigitalOcean and while it works great with RoundCube and gmail... eh. I dunno why I even did it in the fir…

I use iRedMail and have been for 3 years now and I love it. It's really just a collection of scripts and updates are just updates to the underlying packages. Everything is transparent if you want to know what's going on. It takes awhile to get used to all the moving pieces (if you care to even know them as it isn't necessary) but I've found their setup to work very smoothly and be very stable.

I'm also a developer, btw. This mail server is only for me so it's not a big deal but if I had to I'd probably be comfortable setting it up for a small business. I wouldn't recommend it for that still, though, since you are the support in that case.

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

#247
post #75

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 use case is different, as I'm a Windows guy, but this is what I've got: 1. Custom MTA that handles incoming SMTP. 2. SpamAssassin that is called by the above MTA which flags email as spam/not-spam. 3. Custom MTA forwards not-spam to the users inbox. 4. Custom MTA forwards SPAM to postmaster (this bit needs significant re-working) 5. Main Mailserver is Microsoft Exchange run On-Premises. 6. All Mail clients are Out…

Your custom MTA is impressive, but if you want to reduce the amount of custom code you need to maintain (and don't mind one third party service in the mix), you could use something like SpamHero. It's reasonably effective and fairly cheap. Postini was even better, before Google bought them and bastardized the product.

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

#248
Been running mine for almost 8 years.

Exim MTA, Courier IMAPD on Debian.

Pretty easy setup; nothing complicated.

For remote access I use two things: RoundCube webmail, and K-9 Mail on Android. For sending mail from K-9, I connect home, via authenticated SMTP which is on port 587, rather than 25.

I have developed a little web app called Tamarind for generating throw-away mail aliases.

http://www.kylheku.com/cgit/tamarind/tree/

I run some mailing lists which use GNU Mailman. For archiving them, I don't use that horrible pipermail, but rather a hacked version of Lurker. I patched Lurker to pass through HTML so that HTML mails end up rendered as HTML in the archive. The HTML has to be scrubbed, so I wrote a little scrubber for that:

http://www.kylheku.com/cgit/hc/tree/

Lurker patches:

http://www.kylheku.com/cgit/lurker/

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

#249

Earlier quoted context omitted.

Oh yes it is, we have around 200k users and fighting with old leaked passwords is like a full time job. Very easy to abuse as well, the attackers can make low frequency requests from scattered IPs and thus are almost impoasible to prevent

I made a very specific claim which I can back up with actual data if necessary. I will make that claim even more specific: Less than 5% of the email:password combinations in the linkedin dump work today as email logins. “most” suggests a far higher success rate.

[deleted]

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

#250

> 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…

> if that shits the bed then you have to deal with it immediately

If it's just for your own use, no you don't. If a mail server is down, other mail servers trying to send mail to it will re-try for some time.

Just this week I was remotely logged in and screwed the iptables making the machine catatonic to the outside world. Came home in the evening and didn't even bother fixing it until after dinner and various other activities. Like, "oh yeah, before I sleep, I should fix that mail server ...".

Post reply on HN