Configure ElasticEmail with Postfix
To configure ElasticEmail with postfix, first install sasl support
On Debian/Ubuntu
1 |
apt-get install libsasl2-modules |
On RHEL/CentOS
1 |
yum install cyrus-sasl-plain |
Edit postfix config
1 |
vi /etc/postfix/main.cf |
On Ubuntu/Debian, you need to comment the line starting with “relayhost”.
Add following
1 2 3 4 5 6 7 |
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_tls_security_level = encrypt header_size_limit = 4096000 relayhost = [smtp.elasticemail.com]:587 |
Now create file
1 |
/etc/postfix/sasl_passwd |
Add following content
1 |
[smtp.elasticemail.com]:587 YOUR_SMTP_USER:YOUR_SMTP_PASSWORD |
You can find your SMTP user name and password from
https://elasticemail.com/account/#/settings/apiconfiguration
Now run
1 2 |
chmod 600 /etc/postfix/sasl_passwd postmap /etc/postfix/sasl_passwd |
Restart postfix with
1 |
systemctl restart postfix |
Postfix will relay mails using postfix now.
See postfix