Skip to content

Instantly share code, notes, and snippets.

@mkurz
Forked from rafi/install.sh
Created June 5, 2018 14:47
Show Gist options
  • Save mkurz/d974310fca79943b4877c92192a300d5 to your computer and use it in GitHub Desktop.
Save mkurz/d974310fca79943b4877c92192a300d5 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