I have configured Postfix as my MTA instead of the default Sendmail. It actually acts as a pass-through SMTP gateway for my internal Exchange server. I got sick and tired of patching that Win2k server every other day, so I decided to put FreeBSD to work. After the initial setup, it has been running without a hitch for a month or so.
*UPDATE* - I now have Courier-IMAP installed and I changed the configuration of Postfix to deliver my email locally to my ~/Maildir/, while still having my wife's email transported to Exchange (at least until I wean her from it). I am also using Maildrop for local delivery of the email, which lets me do lots of neat filtering, which helps a lot since I am on quite a few mailing lists. I also wrote a small script that can be used with Maildrop to run a script, using information from the email within the script. My use for this is to trigger X10 events via email. If you are interested in seeing the script, let me know and I will send it to you.
First, I had to create a virtual table of addresses that I wanted to be used for local delivery. I had to do this in order to keep my email (email@example.com) from being transported to the internal Exchange server. As it turns out, this is so much better than I ever thought it could be. I created the address mappings in the /etc/postfix/virtual file like this:
michael michael@rogue us michael@rogue,firstname.lastname@example.org
Here, 'rogue' is the hostname of the server running Postfix. Having 'mydomain' set to 'gargantuan.com' in /etc/postfix/main.cf causes the entries in /etc/postfix/virtual to be treated as 'email@example.com' and 'firstname.lastname@example.org', respectively. Since I don't have an entry in the /etc/postfix/virtual file for Trudy, her email is forwarded on to the Exchange server.
Once the virtual file is created, run the following command:
to build the database. Then, add this line to the /etc/postfix/main.cf file:
virtual_maps = hash:/etc/postfix/virtual
Then, issue the 'postfix reload' command to reload the Postfix configuration. Gravy...
Out of curiosity, I wanted to see what the delay was for each email passing through Postfix. I did this by running the following command:
cat /var/log/maillog | grep delay | sed -e 's/^.*delay=//' | cut -f1 -d","
More to come...
My name is Michael Oliver, and I
can be contacted by email here.