Hacker News new | past | comments | ask | show | jobs | submit login
Mail in a Box (mailinabox.email)
172 points by mikece on Nov 25, 2019 | hide | past | favorite | 65 comments



For those considering running their own mail server (like me), perhaps a more pertinent dataset is the list of hosters that seem to work without problem (not spam blocked) and those that have proven problematic. If anyone could chime in it would be much appreciated.


I have been running my mail server on a digitalocean vps without any spam-block issues for about 2 years now.


DO does get blacklisted on occasion. I've moved my SMTP server elsewhere do to AT&T blocking my emails. They use UCEProtect which will block all DO from time to time.


DigitalOcean no longer allows SMTP, you may be grandfathered in.


At all, or by default?

In many cases, additional services (ports) are available on request. This is largely a spam-management (outbound) issue for service providers.


Apparently you need to be a customer for 60+ days of 'stable use' before they'll enable smtp.


I setup my mailinabox instance about 2 months ago without issue.


Hetzner Cloud > 1y OK.

Had to clean up IP from two or so blacklists.


I can second Hetzner. In my case with their dedicated offering, though. Been running mail servers there since at least 2013 with next to no problems.

Google sometimes put mails into the spam folder, though not in recent times. Microsoft tends to block unused IP addresses by default, there's a Wiki page on how to request an unblock: https://wiki.hetzner.de/index.php/Microsoft_Blacklist/en

I sign all my emails using DKIM and have good domain reputation.


I have experienced no ISP-related issues for self-hosted mail on Rackspace, Linode, and Vultr in U.S. DCs.

Note that I've heard Vultr in EU requires trouble ticket to open mail ports.


What about bigger hosts, such as AWS and Google Cloud?


You have to fill in a form to send email from an amazon EIP, but generally delivery from Amazon IPs is poor.


I really don't have any experience with them.


DigitalOcean worked for me once I cleared up some blacklists.

Send mail to mail-tester.com and work from there on SPF/DKIM and blacklists.


OVH works well for me. Since 2 years I guess. I took the smallest VPS.


Amazon workmail.


Amazon WorkMail is a managed email solution (like the ones included in G Suite, Office 365, and Zoho), not a generic server host or a self-hosted email solution. It's also closed source, unlike the open source Mail-in-a-Box.


Nice to see this on the front page again.

I have been using Mailinabox for years now, no problems, easy to use, even easier to maintain.

All running on a $10 Linode instance == email freedom!


I was running mine on a $2.5/m vultr vps for a year. Upgraded to a $5 instance for more storage and it has run almost maintenance free. In the rare instances I do need to do something it mails me the details.



I've used mailcow before. It's a pleasure to use and comes with a decent-ish material design mail client as well.


Yikes. Any time I hear material design and associate it with an open source project I know the UI is going to be a nightmare.


Just setup mailcow. Not bad at all to setup. It uses SOGo for the web client.



I've been on MiaB since 2014, and aside from Gmail focused Chrome extensions, I haven't had a single issue. Easily one of my favorite projects.


I too have been using MAIB running on a DO VPS for about 2-1/2 years now.

It's a bit of a learning curve to get it up and running and then deal with being blocked by some of the bigger email service providers like AOL, Hotmail & Yahoo, but once you've gone through those hoops it's really much better than outsourcing it.

I'm running my mail server on a $20 a month DO VPS and have about 25 email accounts, 30 email aliases, and around 15 domain names being handled by it.

The built-in DNS server has really been a plus for me. I use the MAIB IP address first on my home and office routers DNS configurations so I don't have to wait for new domain names or changes to DNS records to propagate to test my changes and additions.

Downtime hasn't been a issue for me. DO has been pretty great at keeping things running on their end and the MAIB users forum has been there for me when I needed help debugging an issue.

DO specifically states that running a mail server on their platform is not recommended. This is because it has been abused by spammers and that is why some email providers block IP addresses coming from DO.

My experience is that you have to contact those providers that block you and go through the process of what's needed to get cleared on each of them. That can take some time so it's not a seamless or quick and easy alternative but once you've done that it's a much better way to handle both email chores and users and DNS records for all of your domain names.


is MAIB or MIAB?


I've wanted to take complete ownership of my email for a while now, but it seems risky, given the need for 100% uptime, and the anti-spam/deliverability ecosystem of the major providers and senders (to say nothing of security concerns, given that email is de facto auth for the vast majority of services).

Has anyone done this? What were the pain points?


You do not need 100% uptime to receive mail. Because email is store and forward, other server will retry for a reasonable time.

The most complex part is setting up all the DKIM and friends to make your outgoing mail authenticated.


Was going to say much the same - other mail servers will retry failed sends for several days.

Setting up the basics is relatively straightforward, but I found it tricky to setup TLS correctly for SMTP and IMAP, and DKIM and SPF were horrible to configure and get working right!

I've been running my own mail server for 15 years or so - I really wish Mail In a Box had existed back then!



Use https://mxtoolbox.com/blacklists.aspx or something like it to verify that you have a clean VPS IP before putting any effort into setting it up as a mail host.

Use https://www.mail-tester.com/ or something like it to check how completely you're set up to maintain a good sender reputation. Having one doesn't guarantee you'll be able to deliver to places like Gmail, but not having one does guarantee that you won't, so keep fixing things until you get a 10/10 score. (The tool will tell you what it doesn't like, so this is easier than it might sound at first.)


> What were the pain points?

If Apple can't even convince Google to provide push for the native Mail client, draining the batteries of hundreds of millions of users everywhere for no good reason, all at the altar of driving downloads of the Gmail app, some pathetic self-hosted emailer isn't going to be able to get Google to accept their mails once it's marked as spam by an automated system (or a change in strategy decided by a PM in 10 minutes).


I've been running Mailinabox since late 2016 and have experienced 0 issues with downtime or my emails being flagged as spam. It did take a few weeks to train SpamAssassin to properly flag incoming email as spam but that worked very well and it. just. works. nowadays.

Recently I closed down my lingering Gmail account and used imapsync to copy over all my email and contacts to my Mailinabox.

I've also moved it to a different VPS provider once without any issues. Setup mailinabox on new server, close ports on old server, create final back-up, import back-up, switch DNS, done. 0 emails missed.


I’ve tried getting out of gmail a few times with various sync tools which all seemed to fail before completion. I’m curious if it’s a mailbox size issue, or perhaps scripts have matured since I last tried (2 years ago). Any idea how many emails you synced over?


Close to 20.000 emails, ~4.5 GB in size. Tried using Google's data takeout first, but imapsync worked way better (while slower).


Thank you, that’s about the same size as my account. I struggled with Google’s takeout also. Going to make the move and feeling pretty good about it.

Did you do anything to migrate accounts signed up using the gmail?


I've been running my own mail server for about 15 years now. Getting it set up is a fair bit of work. The hardest part is just deciding how you want things configured. It has been pretty much hands-off for ten years now. Dealing with spam has been the biggest annoyance, but even that hasn't been too horrible, and it forced me to learn how to write milters. I pay for commercial hosting so my mail comes from a "reputable" IP address. I once got blacklisted by Spamhaus because I accidentally enabled an open relay, but that was easy enough to fix and it hasn't happened since.

AMA if you decide to take this on, I'm happy to help.


When you say 'reputable' IP do you mean non-residential or is something like AWS, Linode, etc enough?

Edit: duplicate to sibling, apparently I had this tab open longer than I thought.


Yes, I meant non-residential, and also not AWS. The problem with AWS is that a lot of spammers use it, and so a lot of AWS IP addresses get tainted. If you go with a smaller ISP that charges more it's less likely that their clients will be spammers. But to be fair, I've never tried running a mail server on AWS. It's possible that you could do it and not have any problems, I don't actually know. It's probably an experiment worth doing.


... can you expand on what you mean by “commercial” hosting?


Sorry, that was a very poor choice of words. What I actually meant was "a small commercial hosting company", i.e. not Amazon. Amazon IPs can have a dicey provenance.

(Actually, the company was recently acquired so they may not be so small any more. The company is called ZeroLag and they were acquired by Total Server Solutions.)


Right that’s what I figured you were using, thanks for confirming!


I ran mailinabox for like 5 years and there were no major painpoints, some quirks while setting up which I don't even remember. And it's best to keep it up to date, updating to new releases if you're far behind can get messy. Essentially it all boils down to reading instructions and reproduce the commands in them and hope they don't fail. If they do, standard search internet-try something-cyle. Normally if you've ever touched linux or similar and/or ran a server you know the deal. Also if you don't know much about email on linux it all remains a black box which isn't necessarily a problem.

So in the end it depends on what type of work you like, I guess. Personally I don't really enjoy fiddling with things to get/keep them working anymore; I've done that more than enough in the past, building your own linux from scratch and whatnot, but in the end it's just not my cup of tea and turns out I just don't want to waste time on it, no matter how little, so I siwtched to fastmail. Honestly, no clue if that makes my mail more or less secure.


> given the need for 100% uptime

When I was a teen, I ran a personal mail server on a dynamic IP (using DynDNS) over dialup with about 25% uptime. Miraculously, mail still got delivered to my server. I was in awe of the reliability of SMTP.

The greatest problem today affecting reliablity is that mail gets dropped silently by the major providers.


Yes, SMTP was designed in the days of much less reliable internet connections (either systems that only had connectivity at intermittent times, or just basic unreliability). The protocol has a built in assumption that a receiver might not be accessible "now" and so servers are required (in order to be compliant to the standard) to hold, and retry, over several days, to deliver an email before giving up and returning it to the sender.

So it is quite feasible to run email over dialup. You just have to periodically connect, and remain connected for a reasonable period of time, and SMTP will work just fine (only with higher latency than we are accustomed to in 2019).


I consider Mailu to be one of the best alternatives if you want to use Docker or have an infrastructure with Kubernetes. I've been using it for some years.

https://mailu.io/


> Most any cloud provider will do, but not Amazon Web Services because its network is often blocked to prevent users from sending spam

From their installation guide, if like me, you were considering running this on EC2.


AWS throttles port 25 traffic but in theory you can petition to get it opened up.

https://aws.amazon.com/premiumsupport/knowledge-center/ec2-p...


I am confident I can run the service, but is there any easy monitoring framework for it? What other learning experiences from people that run their own?


It has munin support out of the box


I took a look at `Mail in a Box` a few years ago then discovered https://github.com/tomav/docker-mailserver which I have been running ever since with no issues ... I wonder how these compare today


"Mass electronic surveillance by governments revealed over the last several years has spurred a new movement to re-decentralize the web, a movement to empower individuals to be their own service providers again."

Yes. But if you're emailing to someone on say gmail how are you protected from surveillance?


You’re not. But using your own server means your flight itineraries, bank statements, utility bills, and Amazon receipts won’t be surveilled (by them, anyway), even if you occasionally send mail to GMail inboxes. If your enemy is Google, then that’s a significant win.


Exchange ActiveSync is also available as a beta feature.

Wow! Anyone tried this? How's your mileage?


This looks really cool. I couldn't find any info on the site, but anyone know what sort of backup features are available built in?

If there isn't anything built in, what are other users of mail in a box doing to backup their data?


It has a built in backup tool using duplicity that by default backs up to the local storage but you can plug in your s3/b2 details and it will back up to those. The backups are encrypted so amazon won't be reading your emails either.


For someone considering running a (mail) server, what about security? For some reason I have a feeling that guides like "my first 10 minutes on a server" aren't enough. Am I wrong to think so?


Mailinabox is a fully configured service. You need a fresh ubuntu install, you run the install script and it configures everything for you and notifies you when it needs to be updated or something is not as it should be.


So it handles firewall rules, disabling root login and all those details?


Yes. And comes with a neat status page to warn you of any issues in case things change (but they shouldn't if you use a dedicated box).


Which self-hosted contact and calendar server do you guys that also works with Google's seamlessly?


mailinabox comes with a nextcloud instance which does contacts/calendar.


> "it's easy to set up"

> 17 minute video

a 1-4 minute video above the fold would help convince people better


I've been using this for four years for my personal email. Works great.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: