Skip to content

Instantly share code, notes, and snippets.

@selfagency
Last active July 11, 2021 00:57
Show Gist options
  • Save selfagency/88d8fe418e257e4d55f999c667f6efcc to your computer and use it in GitHub Desktop.
Save selfagency/88d8fe418e257e4d55f999c667f6efcc to your computer and use it in GitHub Desktop.
[install postfix with mailgun] ubuntu
#!/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