Skip to content

Instantly share code, notes, and snippets.

@rafi
Created July 3, 2014 12:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save rafi/82a3937a0f15a26919d5 to your computer and use it in GitHub Desktop.
Save rafi/82a3937a0f15a26919d5 to your computer and use it in GitHub Desktop.
setup msmtp and php
apt-get install msmtp ca-certificates
vim /etc/msmtprc
# Set defaults.
defaults
# Enable or disable TLS/SSL encryption.
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
# Set up a default account's settings.
account default
host smtp.sendgrid.net
port 587
auth on
user <username>
password <password>
from bounces@your-doman-here
logfile /var/log/msmtp/msmtp.log
vim /etc/php5/apache2/php.ini
sendmail_path = /usr/bin/msmtp -t
mkdir /var/log/msmtp
chown www-data:adm /var/log/msmtp
vim /etc/logrotate.d/msmtp
/var/log/msmtp/*.log {
rotate 12
monthly
compress
missingok
notifempty
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment