OS X Server with SMTP Relay

1.9k Views Asked by At

Postfix lives in 2 locations on OS X / OS X Server

OSX Server / Mail tip -

Postfix location: /Library/Server/Mail/Config/postfix/main.cf

Note: [smtp.gmail.com]:587 will break the UI I suspect due to the [].

Postfix sasl password:

/Library/Server/Mail/Config/postfix/sasl/passwd

Don't forget to postmap update:

sudo postmap /Library/Server/Mail/Config/postfix/sasl/passwd

There is also a /etc/postfix location which is confusing.

2

There are 2 best solutions below

1
Viktar Pryshchepa On BEST ANSWER

Had a similar problem. This helped me - main.cf

myhostname = smtp.gmail.com
# Use Gmail SMTP
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = plain
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_security_level = encrypt
tls_random_source = dev:/dev/urandom
smtp_sasl_tls_security_options = noanonymous

and

sasl_passwd

[smtp.gmail.com]:587 [email protected]:pass
0
Mark On

Postfix lives in 2 locations on OS X / OS X Server

OSX Server / Mail tip -

Postfix location: /Library/Server/Mail/Config/postfix/main.cf

Note: [smtp.gmail.com]:587 will break the UI I suspect due to the [].

Postfix sasl password:

/Library/Server/Mail/Config/postfix/sasl/passwd

Don't forget to postmap update:

sudo postmap /Library/Server/Mail/Config/postfix/sasl/passwd

There is also a /etc/postfix location which is confusing.

Added above setting from Viktar to the main.cf and its down the road now.