Tuesday, July 19, 2011

Postfix Server

I was testing a monitoring program at work that generates a lot of email, and rather than bog down my company's email server, I wanted to set up my own. I decided to throw Postfix onto my Fedora VM. It seemed like a pretty basic install - just 'yum install postfix' and then edit the configuration file (main.cf). (I used the tutorial I found here.)

However, once I did this, I still wasn't getting any of the emails I was sending to myself through telnet. Hmm, was the domain set up correctly? Yup. I should have been getting email. (I set it up on a local domain, since I only needed to send email from one computer that was inside the network.)

After setting up Postfix and Cyrus (for POP/IMAP) on my ClearOS VM, that has a GUI for this sort of thing, I was able to compare its configuration file and figure out what I was doing wrong. It turns out that the 'mydomain' field in Postfix has nothing to do with the domains it accepts email for. Instead, you have to add the domains you want to accept email for under 'mydestination'.

That only took a day to figure out...