Configure CentOS and Postfix To Relay Through An External Server

I just installed a default install on CentOS 5.6, and I needed to use an external server to send email, as I do not have a dedicated IP. I had tried using sendmail, but the few tutorials I tried didn’t work well. So I asked Mr. Google and I found this site:

Postfix relaying with Google Apps SMTP

If you don’t have Postfix installed, or any of the other required libraries they mention, you can do the following

yum install postfix
yum install xmlsec1-openssl openssl openssl-perl openssl-devel openssl097a
yum install cyrus-sasl cyrus-sasl-lib cyrus-sasl-plain cyrus-sasl-md5

Obviously change your config files to match your account info, but it works like a champ. I hope this helps others.

A Second Example

Today I needed to do the same thing on a CentOS 5.7 (Final) server, and found the following to work great! I used it with my mail settings, but should work for anyone. I did have to use the TLS options, so if you’re like me, be sure to follow those, as well.

Setup Postfix with a remote SMTP relay host

Comments

comments

Posted in Linux Tagged with: , ,