D
D
denn2014-12-08 22:07:45
postfix
denn, 2014-12-08 22:07:45

How to force Postfix to send emails via Yandex Mail?

How to force the daemon to send all emails via the Yandex Mail service? Currently, emails that are generated using websites (phpmail) are sent via Postfix.
So much hemorrhoids with these settings. You set it up, but all the same, letters fly into spam :\

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lehha, 2014-12-18
@lehha

Similar to GMAIL, only a different host.
In main.cf:

relayhost = [smtp.gmail.com]:587

#  use tls
smtp_use_tls=yes

# use sasl when authenticating to foreign SMTP servers
smtp_sasl_auth_enable = yes 

# path to password map file
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

# list of CAs to trust when verifying server certificate
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

# eliminates default security options which are imcompatible with gmail
smtp_sasl_security_options =

Add Gmail creds to /etc/postfix/sasl_passwd
Run
sudo postmap /etc/postfix/sasl_passwd

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question