College Logo

Finishing off Postfix

MailScanner uses postfix to accept mail from the outside and then leaves it in a folder for MailScanner. MailScanner checks the mail (in a wide variety of ways) and then passes it back to postfix which then delivers the email.

Setup a chroot jail in /var/spool/postfix - details of how to do this are at http://www.muine.org/~hoang/postrouter.html (together with an explanation of what it means!)

Now stop postfix to make the following changes - type

postfix stop

edit /usr/local/etc/postfix/main.cf and add the line below (it may be in the file and just need the # comment removing):

header_checks = regexp:/usr/local/etc/postfix/header_checks
 

Edit the file /usr/local/etc/postfix/header_checks and add the line:

/^Received:/ HOLD

This will make sure that any mail received by Postfix will be put on hold (by moving it to the hold folder

Restart postfix and start MailScanner:

postfix start
check_mailscanner