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.

4 Comments


  • C November 02, 2011

    Awesome! Thanks! This is still useful information a year later. I appreciate the effort in documenting and posting this!

  • Jon November 05, 2011

    This was very helpful, thank you!!

  • Anonymous November 02, 2011

    This was super helpful, thank you!!!

  • Anonymous July 09, 2011

    Thanks, helped me out!

Have Your Say

We promise not to share your email with anyone. Your email will not be used for promotions or newsletters of any sort. Anonymous comments may be deleted.

Remember to be polite and constructive when commenting!

Secutity Code

I always take my laptop to Chris whenever I need it fixed or updated. Ihave referred him onto my friends and family as he is the best computertechnician I have dealt ...


View More Testimonials
Trojan.Ransomlock.O

Risk Level: Very Low. Type: Trojan.

Trojan.Komodola

Risk Level: Very Low. Type: Trojan.

W32.Stekct

Risk Level: Very Low. Type: Worm.

Packed.Generic.368

Risk Level: Very Low. Type: Trojan, Virus, Worm.