Set Up Postfix For Relaying Emails Through Another Mailserver
Set Up Postfix For Relaying Emails Through Another MailserverVersion 1.0 This short guide shows how you can set up Postfix to relay emails through another mailserver. This can be useful if you run a Postfix mailserver in your local network and have a dynamic IP address because most dynamic IP addresses are blacklisted today. By relaying your emails through another mailserver that is hosted on a static IP address in a data center (e.g. your ISP's mailserver) you can prevent your emails from being categorized as spam. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!
1 Preliminary NoteTo configure relaying on your Postfix mailserver, you need a valid email account (with username and password) on another mailserver (provided that this mailserver makes use of SMTP-AUTH (which it should do)). This other mailserver should be hosted on a static IP address in some data center (e.g. your ISP's mailserver). In this guide I use smtp.example.com as the remote mailserver on which I have a valid email account with the username someuser and the password howtoforge. I assume you have already installed Postfix as I won't go into the details of installing Postfix here.
2 Configure Postfix For RelayingTo configure our Postfix server for relaying emails through smtp.example.com, we run postconf -e 'relayhost = smtp.example.com' Our username (someuser) and password (howtoforge) for smtp.example.com must be stored in /etc/postfix/sasl_passwd, therefore we do this: echo "smtp.example.com someuser:howtoforge" > /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd must be owned by root, and noone else should have read access to that file, so we do this: chown root:root /etc/postfix/sasl_passwd Now we must convert /etc/postfix/sasl_passwd into a format that Postfix can read: postmap /etc/postfix/sasl_passwd This will create the file /etc/postfix/sasl_passwd.db. All that is left to do is restart Postfix: /etc/init.d/postfix restart That's it. You can now test by sending emails over your mailserver and having a look at your mail log. You should see that all your emails are now passed on to smtp.example.com (except the ones that have a local recipient).
3 Links
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com







Recent comments
14 hours 57 min ago
16 hours 25 min ago
20 hours 10 sec ago
22 hours 53 min ago
1 day 1 hour ago
1 day 2 hours ago
1 day 2 hours ago
1 day 3 hours ago
1 day 4 hours ago
1 day 5 hours ago