Configure mailgun on Ubuntu (bsd-mailx / postfix)

1) Install bsd-mailx

aptitude install bsd-mailx

Select Internet Site in the Postfix Configuration screen.

If you missed it or want do reconfigure do:

dpkg-reconfigure postfix

2) Add mailgun configuration

Edit /etc/postfix/main.cf

relayhost = smtp.mailgun.org
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:[email protected]:password
smtp_sasl_security_options = noanonymous

3) Restart the postifx service

service postfix restart

Source: https://www.jamroom.net/brian/documentation/guides/1312/set-up-postfix-with-mailgun-for-reliable-e-mail-delivery

One Reply to “Configure mailgun on Ubuntu (bsd-mailx / postfix)”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.