Configuring postfix

From Finninday
Jump to: navigation, search

Tuesday, January 24th, 2006

One of the biggest hurdles to getting a new server in production is getting a proper configuration of postfix in place. I’m trying to emulate the current configuration (which was pretty painful to construct) using postfix, TLS, smtp auth, and sasl. My procedure to build the old server didn’t work on the new Debian server, so I started casting about for a recipe that was more Debian-specific. And a bit more modern. I think my old server was running sasl instead of sasl2 which probably accounts for the difficulty in using my old recipe.

I found this: http://www.howtoforge.com/howto_postfix_smtp_auth_tls_howto

And this: http://www.howtoforge.com/virtual_postfix_mysql_quota_courier

I opted for the wacky mysql version but modified it a bit to leave out the quota stuff.

I still had a bit of trouble with it due to the fact that the postfix package I had installed from Ubuntu was chrooted. That somehow kept my saslauthd from starting up. After making sure there was only one /var/run/saslauthd directory and that it was visible from the chrooted /var/spool/postfix, I was able to run this test successfully:

testsaslauthd -u user -p password
0: OK "Success."

And /etc/init.d/saslauthd start and /etc/init.d/saslauthd stop worked without complaint.