INSTALL POSTFIX AND LIBSASL
apt-get update
apt-get install postfix libsasl2-modules
DISABLE EXIM4 FROM BOOT
insserv -r exim4 (remove exim4 for boot)
CONFIGURE POSTFIX
nano /etc/postfix/main.cf
remark the 'relayhost = '
add the following:
smtp_sasl_auth_enable =
yes
relayhost = smtp.mailgun.org
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps=
hash
:
/etc/postfix/sasl_passwd
SET SMTP LOGIN CREDENTIALS
echo 'smtp.mailgun.org username@domain.com:yourMGPassword' > /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
RESTART POSTFIX
service postfix restart
TEST FROM CLI
This comment has been removed by a blog administrator.
ReplyDelete