Last active
July 11, 2021 00:57
-
-
Save selfagency/88d8fe418e257e4d55f999c667f6efcc to your computer and use it in GitHub Desktop.
[install postfix with mailgun] ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo apt-get install mailutils | |
echo "inet_interfaces = loopback-only \ | |
relayhost = [smtp.mailgun.org]:587 \ | |
smtp_sasl_auth_enable = yes \ | |
smtp_sasl_password_maps = static:[email protected]:password \ | |
smtp_sasl_security_options = noanonymous" >> /etc/postfix/main.cf | |
sudo service postfix restart | |
echo "This is my email test message" | mail -s "My subject line" [email protected] | |
echo "postmaster: root \ | |
root: [email protected]" >> /etc/aliases |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment