I apologize in advance. I'm still a bit of a noob, especially with things like postfix and ssl.
I've spent my day so far following the directions on the Outgoing mail via gmail wiki and I ran into a couple snags that I was eventually able to work around. I'm hoping this will save someone else some trouble... Everything below was run as root.
First, at the following step:
Code: Select all
Add the following to the bottom of the file /etc/postfix/main.cf. You do not need to change anything else in it, as the last setting for any option is the one that is saved.
Text
#### Gmail SSL SMTP Relay
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_tls_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtp_tls_scert_verifydepth = 5
smtp_tls_key_file=/etc/pki/tls/gmail_relay/server.key
smtp_tls_cert_file=/etc/pki/tls/gmail_relay/server.pem
smtpd_tls_ask_ccert = yes
smtpd_tls_req_ccert =no
smtp_tls_enforce_peername = no
Code: Select all
[root@amahi-server etc]# postmap hash:/etc/postfix/sasl_passwd
postmap: fatal: /etc/postfix/main.cf, line 679: missing '=' after attribute name: "??????# Gmail SSL SMTP Relay"
Code: Select all
postmap hash:/etc/postfix/sasl_passwd
Code: Select all
#### Gmail SSL SMTP Relay
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_tls_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtp_tls_scert_verifydepth = 5
smtp_tls_key_file=/etc/pki/tls/gmail_relay/server.key
smtp_tls_cert_file=/etc/pki/tls/gmail_relay/server.pem
smtpd_tls_ask_ccert = yes
smtpd_tls_req_ccert = no
smtpd_tls_enforce_peername = no
Code: Select all
chown postfix /etc/postfix
After that everything worked and I was able to send mail properly.