So you want to do something simple like monitor your hard drives S.M.A.R.T status. You go to install the smartmontools package on Ubuntu and your prompted to install Postfix, and your faced with having to setup a mail relay, what a drag.
This is a simple walkthrough on the changes you need to make after Postfix is installed relay all mail generated on your system to an external mail server that requires SMTP Authentication.
When your prompted by the postfix package configuration choose Local Only, the wizard won’t let you setup authentication so we’re going to add the rest manually. Choosing Local Only will only create a basic main.cf for you. Once the install is complete do the following.
Assume Ubuntu 9.04
Add the following lines to /etc/postfix/main.cf
relayhost = [host3.green-light.ca]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
Create a new file called /etc/postfix/sasl_passwd
[host3.green-light.ca]:587 user:password
Give that file proper permissions
sudo chown root:root /etc/postfix/sasl_passwd; sudo chmod 0600 /etc/postfix/sasl_passwd
Create the hash database from your sasl_passwd file.
sudo postmap hash:/etc/postfix/sasl_passwd
Reload postfix with your new settings
sudo postfix reload