Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

I am using postfix and need to send the mail using google apps smtp. I am getting errors after I thought I had set everything up correctly:

May 11 09:50:57 zedsaid postfix/error[22214]: 00E009693FB: to=<www-data@zedsaid.com>, relay=none, delay=2466, delays=2462/3.4/0/0.06, dsn=4.7.0, status=deferred (delivery temporarily suspended: SASL authentication failed; cannot authenticate to server smtp.gmail.com[74.125.155.109]: no mechanism available)
May 11 09:50:57 zedsaid postfix/error[22213]: 0ACB36D1B94: to=<www-data@zedsaid.com>, relay=none, delay=2486, delays=2482/3.4/0/0.06, dsn=4.7.0, status=deferred (delivery temporarily suspended: SASL authentication failed; cannot authenticate to server smtp.gmail.com[74.125.155.109]: no mechanism available)
May 11 09:50:57 zedsaid postfix/error[22232]: 067379693D3: to=<www-data@zedsaid.com>, relay=none, delay=2421, delays=2417/3.4/0/0.06, dsn=4.7.0, status=deferred (delivery temporarily suspended: SASL authentication failed; cannot authenticate to server smtp.gmail.com[74.125.155.109]: no mechanism available)

main.cf:

# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = zedsaid.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =
#relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
delay_warning_time = 4h
smtpd_recipient_limit = 16
# how many error before back off.
smtpd_soft_error_limit = 3
# how many max errors before blocking it.
smtpd_hard_error_limit = 12

## Gmail Relay
relayhost = [smtp.gmail.com]:587

smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_mechanism_filter = login
smtp_tls_eccert_file =
smtp_tls_eckey_file =
smtp_use_tls = yes
smtp_enforce_tls = no
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_received_header = yes
tls_random_source = dev:/dev/urandom

transport_maps = hash:/etc/postfix/transport
debug_peer_list = smtp.gmail.com
debug_peer_level = 3

What am I doing wrong?

share|improve this question

marked as duplicate by masegaloeh, fukawi2, HBruijn, RolandoMySQLDBA, mdpc Jan 31 at 7:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

Checkout this setup: https://www.wormly.com/blog/2008/11/05/relay-gmail-google-smtp-postfix/

share|improve this answer
    
I get errors when running this line: openssl ca -out ./postfixclient.pem -infiles postfixclient.csr –  Zed Said May 11 '11 at 18:12
    
@ZedSaid, you should paste the error you're getting... –  bmurtagh Oct 25 '12 at 18:37

Try adding this:

smtp_tls_security_level=encrypt
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.