Postfix @ michael-prokop.at

Set up postfix using TLS on a Debian box

Latest change: Mon Mar 10 15:31:19 CET 2008 [mika]

This document describes how to set up postfix (Debian >=etch) in VC-Graz / TU Graz using TLS authentication (see zid-webpage and tug-FAQ).

Install debian packages (answer questions as suggested):
aptitude install postfix libsasl2-modules
Edit postfix config:
# vim /etc/postfix/main.cf
[...]
# use mailrelay.tugraz.at as relayhost for TUG
# use mail.vc-graz.ac.at  as relayhost for VCG
relayhost = mail.vc-graz.ac.at
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
Add authentication information to config file:
# cat /etc/postfix/smtp_auth
mail.vc-graz.ac.at  your_account_number:your_secret_password
# or
# mailrelay.tugraz.at your_account_info:your_secret_password
Add user/password information to postfix and restart postfix:
# cd /etc/postfix
# postmap smtp_auth
# /etc/init.d/postfix restart
That's it. Now test your postfix setup:
# echo "postfix works" | mail your_account@sbox.tugraz.at

Important: it might happen that the mail server accepts your mail without delivering it or sending a bounce mesage. If that seems to happen to you make sure you use the same hostname in postfix's main.cf (myhostname) that is configured in TUGonline for you host if you are sending via mailrelay.tugraz.at. If you are sending in VCG instead make sure to use a FQDN in /etc/mailname.

Problems? Debug it via:
# mailq
# postfix check
# postconf | grep sasl
Adjust debug level:
# vim /etc/postfix/master.cf
[...]
smtp      unix  -       -       -       -       -       smtp -v
... and if it still does not work read 'Spam-Filter an der TU Graz'.

Postfix-Addons

pflogsumm: pflogsumm.pl is designed to provide an over-view of postfix activity, with just enough detail to give the administrator a "heads up" for potential trouble spots. (german version of pflogsumm)

queuegraph: Queuegraph is a very simple mail statistics RRDtool frontend for Postfix that produces daily, weekly, monthly and yearly graphs of Postfix's active, deferred, incoming and bounce queues.

Postfix-Ressources

Please report feedback, suggestions and bugfixes to Michael Prokop.