View Single Post
  #5  
Old 13th January 2008, 22:31
heymrdj heymrdj is offline
Member
 
Join Date: Feb 2007
Posts: 58
Thanks: 2
Thanked 4 Times in 4 Posts
Default

I found out how you can use GMAIL SMTP server as a relay host in Postfix.

Code:
relayhost = [smtp.gmail.com]:587

#auth
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

#tls
smtp_use_tls = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tks_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtp_tls_scert_verifydepth = 5
smtp_tls_key_file=/etc/postfix/certs/itchy.key
smtp_tls_cert_file=/etc/postfix/certs/itchy.pem
smtpd_tls_ask_ccert = yes
smtpd_tls_req_ccert =no
smtp_tls_enforce_peername = no

Create “/etc/postfix/sasl_passwd” with the following format:
gmail-smtp.l.google.com user@gmail.com:password
smtp.gmail.com user@gmail.com:password

postmap /etc/posfix/sasl_passwd

/etc/init.d/postfix reload
I just have one question. When relaying like this, do the receivers of the email see my servers email (egw[REMOVE]eatest.homelinux.org) or do they see the account i relay through (heymrdjCW[REMOVE]@gmail.com) on the from line. I want the server to send emails in the form of the first, rather than the latter.
Reply With Quote