Use smtp.gmail.com as postfix relay
As some ISPs are blocking outgoing mail from home smtp server, we have to use a relay.
smtp.gmail.com is a good choice.
Here are the steps I've followed in order to configure postfix on ubuntu 10.10 to use gmail as a relay :
Install postfix
Choose Internet Site and keep the proposed next option
create the file passwd
if you copy the content of the equifax certificate, this is also working and much more simple that the two previous steps
I saw on some blogs/forums that you should add the ca cert of Equifax, but in my case, I didn't do it and this is working fine.
Credit : 1 2 3
smtp.gmail.com is a good choice.
Here are the steps I've followed in order to configure postfix on ubuntu 10.10 to use gmail as a relay :
Install postfix
Choose Internet Site and keep the proposed next option
aptitude install postfixconfigure postfix
cd /etc/postfix nano main.cfadd the following lines at the end of the file :
relayhost = [smtp.gmail.com]:587(there is no need to comment out the same options that can be present before in the file as only the last ones are used)
smtp_use_tls = yes
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd
smtp_sasl_security_options = noanonymous
create the file passwd
cd /etc/postfix/sasl/ nano /etc/postfix/sasl/passwdinsert this line, changing your own logon information
[smtp.gmail.com]:587 yourname@gmail.com:yourpasswordgenerate a db file that postfix can read
postmap passwdgive the right to postfix to read the two files
chmod +r /etc/postfix/passwd*Generate the cacert.pem file
/usr/lib/ssl/misc/CA.pl -newcaI input the following information (but I don't think that any data input below are important):
Country Name (2 letter code) [AU]:BECopy cacert.pem
State or Province Name (full name) [Some-State]:Liege
Locality Name (eg, city) []:Liege
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Google
Organizational Unit Name (eg, section) []:Google
Common Name (eg, YOUR name) []:nicolas jolet
Email Address []:myaddress@gmail.com
cp demoCA/cacert.pem /etc/postfix/EDIT 17/01/2011:
if you copy the content of the equifax certificate, this is also working and much more simple that the two previous steps
cat /etc/ssl/certs/Equifax_Secure_CA.pem > /etc/postfix/cacert.pemRestart postfix deamon
/etc/init.d/postfix restart
I saw on some blogs/forums that you should add the ca cert of Equifax, but in my case, I didn't do it and this is working fine.
Credit : 1 2 3
Comments