Friday, October 19, 2007

SMTP Forwarding with Postfix

I decided to fix the fact that I wasn't receiving bounce messages, which is unfortunate when I misaddress my emails and then don't get the associated t-shirts =(.

Relevant bits in /etc/postfix/main.cf:

relayhost = smtp.yourdomainhere.tld

# Only if you feel like using sasl
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_security_options =

# good for bounce messages
sender_canonical_maps = hash:/etc/postfix/sender_canonical


/etc/postfix/sasl_password:

smtp.yourdomainhere.tld user:password

chmod 0600 /etc/postfix/sasl_password; postmap /etc/postfix/sasl_password;

/etc/postfix/sender_canonical:

you@yourhostname you@yourdomainhere.tld

postmap /etc/postfix/sender_canonical

/etc/init.d/postfix restart

0 comments: