Setting up postfix, dovecot, and postfixadmin on a VPS. A week lost to port 25 blocking.
permalink nebrivOriginally published on blog.benvirgilio.com
I have finally setup a working mail server, something that I have struggled to do numerous times in the past. As part of my migration away from Dreamhost, who not only hosts websites but also hosts email servers (who knew!?), I needed to set up my own mail server to handle my personal emails, along with those of other domains I host. This means I have two requirements, I have to setup an interface that allows those who host websites with me to create mailboxes and alias for their domain, and the second, it all has to work and work well!
After scanning numerous tutorials I figured out how to fulfill my requirements using postfix, dovecot, and postfixadmin; I also found a very comprehensive tutorial here: http://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/
With a snapshot (luckily a feature available with DigitalOcean) made, just in case I really screwed up and needed to undo my changes, I began following the lengthy tutorial. Eventually after making and editing numerous configurations I thought it was working. I tried telneting to port 25 from my home computer only to find out that I was not getting any response. I was stumped. I followed the tutorial to the T and made sure the ports were allowed through my firewall and were actually listening. They were. Eventually all hope was lost and I reverted to my snapshot. I went through this process about 3 times over the course of the week and eventually came to the conclusion that I was doing everything right. I then figured that perhaps my ISP (Champlain College) was blocking outbound connections on port 25…it would make sense, preventing spam and students from setting up rogue mail servers…I was right.
and the emails finally are coming through…
Quite annoyed that I wasted a week, I continued with setting up and securing everything (GMail, in order to pull from POP3 requires a valid AND SIGNED SSL certificate), but very relieved that I managed to get everything setup and working! So now that I have migrated all of my main services away from Dreamhost to my VPS nodes I can begin finish moving my domains, and close up shop at Dreamhost.