Configuring Postfix to relay to Postini
Update: I've seen a lot of traffic to this page since I originally posted it, but I want to know, is this helping people out? Are the steps clear enough? Let me know in the comments below. Thanks!
Some of these steps are not required for a typical Postfix install, I've italicized the unnecessary ones, but kept them there, just to be consistent with exactly what I did. My Postfix server runs on my firewall, also, this is all from memory, I did this all very rushed yesterday morning, so if it's missing some information, feel free to comment at the bottom of the page.
STEP 1
Configure Postini to accept your SMTP (Postfix) server, you need the public IP address of your SMTP (postfix) server, if it's NAT'd behind a firewall, then you need the IP of your firewall.
Log into Postini, Click outbound servers, choose your Org, under status click "add another outbound email server", now enter in your IP range (for me, I only have one ip, so I put the same number in both boxes). Also, if your Postfix server is going to be your reinjection host as well, enter it's IP again under reinjection host.
Click SAVE.
Now, if you go to your Postfix server, and try to telnet to your Postini server on port 25, you should get a successful connection (not the typical "Mail relay from..." not allowed message).
STEP 2
I managed to get Postfix relaying to Postini by doing the following:
On your Postfix server:
vi /etc/postfix/access
---> add in all of the device IP's that will be using Postfix as
their SMTP server. This is only if you do reverse look ups on connecting IP's like I was doing.
/usr/sbin/postmap /etc/postfix/access
vi /etc/sysconfig/iptables
---> add in all of the device IP's that will be using Postfix as
their SMTP server (allow port 25)
vi /etc/postfix/transport
Comment out anything you have in here for now, so mail is only routed to the relay host (unless your using this Postfix installation for other mail deliveries as well).
/usr/sbin/postmap /etc/postfix/transport
vi /etc/postfix/main.cf
Add the following:
relayhost = outbounds5.ga.obsmtp.com
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
(NOTE: Sasl info isn't currently required, just kept there for informative
reasons, if we wanted to use sasl, would need to add in the domain
username:password to the file, and then /usr/sbin/postmap the sasl_passwd
file).
also: add network range of your devices to mynetworks variable (in main.cf), ie: 10.9.0.0/16 if all your devices were in that range.
then finally
/etc/init.d/postfix restart
Mail will now be flowing through Postfix to Postini.


