-
-
Save mkurz/d974310fca79943b4877c92192a300d5 to your computer and use it in GitHub Desktop.
setup msmtp and php
This file contains 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
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