Running a Mail Server

Email (internet messaging) has been around for almost as long as the internet itself. SMTP (Simple Mail Transfer Protocol) allows for designing email systems that are open, non-federated and distributed across the internet. Unfortunately, the architects of this system did not foresee how email spam, trojans, worms and computer viruses would make life miserable for the average internet citizen in the coming years. And when this did happen, SMTP was widespread enough that the remedies for these issues involved slapping band-aids on the system and enforcing rules that were not part of the protocol’s design in the first place.

Take, for example, the rude fact that running a mail server from behind a dynamic IP address is quite impossible today. Almost all mail servers receiving an email from a domain that translates to an IP address belonging to a dynamically allocated block, will either drop the mail on the floor or at the very least, classify it as spam. And, if your static IP address is on a spam blacklist, good luck trying to deliver email from your domain via any other public mail servers. Owning a static IP address is pretty expensive in the first place. You need to have atleast a business account from your ISP (e.g Comcast) to even qualify for obtaining one and then pay an exorbitant amount monthly for this “privilege”.

Granted, most folks today would not want to run a mail server from home. The configuration is complex, and there are very few good reasons for doing so. There are a number of free email providers out there that provide great service and uptimes, along with spam filtering, instant messaging and what not. So why should I run my own mail server? Personally, I am less bothered with the uproar regarding the NSA fiasco or the annoyance of seeing commercial ads based on my email content (thanks G***LE). My goal is and always has been to not have to be completely reliant on a web service being hosted elsewhere by a company that cannot represent my interests. Since I am not paying for their service, they are free to do anything they like with my data and also change the service any way they please for their own benefit. I might not migrate to my own mail server completely any time soon, but having the option to do so, in my opinion, is completely worth the effort.

My setup consists of iRedMail running on a FreeBSD VM. Configuration was quite simple, and iRedMail sets up postfix, dovecot, Clam AV and Spam Assassin automatically. It also sets up RoundCube for webmail which is pretty nice. There were no problems with incoming email but I had worse luck with outgoing emails. GMail would classify my emails as spam but Hotmail would just outright reject the emails since they were originating from a dynamic IP. I switched to using a free SMTP relay (MailJet) instead of sending out emails directly. MailJet allows upto 200 emails per day and upto 6000 a month which is more than sufficient for my domain. I did need to setup the SPF and DKIM records via my DNS provider for the domain since this strengthens the likelihood of my emails being delivered to the destination inbox. I am still relying on an external party to send out my emails but this is still way better than complete submissiveness to GMail.

Leave a Reply

Your email address will not be published. Required fields are marked *