Skip to content

Instantly share code, notes, and snippets.

@CodeBrauer
Created November 17, 2015 20:30
Show Gist options
  • Select an option

  • Save CodeBrauer/4e8ae81ce5eef23dfb7a to your computer and use it in GitHub Desktop.

Select an option

Save CodeBrauer/4e8ae81ce5eef23dfb7a to your computer and use it in GitHub Desktop.

Easy Linux SSMTP Configuration with Mailgun

You need a domain where you can add:

  • TXT domain records and subdomains for sendings
  • CNAME records for tracking
  • MX records for receiving (optional)

Free account can send 10k mails per month.

Send testmail

echo -e "Subject: TESTMAIL" | sendmail -v [email protected]
#/etc/ssmtp/ssmtp.conf
# The default user (The user that gets all the mails (UID < 1000, usually the admin))
[email protected]
# Mailgun
mailhub=smtp.mailgun.org:587
# (Default SMTP Login)
[email protected]
# Default Password
AuthPass=password_of_postmaster
# Your servers hostname
hostname=example.com
# Allow override "From"
FromLineOverride=YES
# Use TLS
UseSTARTTLS=YES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment