on
dns
technitium
ubuntu
- Get link
- X
- Other Apps
1. Setup Google's App passwords for SMTP relay access authentication.
2. Install msmtp-mta package. I am using it on my Ubuntu server setup.
sudo apt-get install msmtp-mta
3. Create msmtp configuration file (/etc/msmtprc) with below setting. Replace the username and password using the newly created app passwords.
defaults
tls on
# Syslog logging with facility LOG_MAIL instead of the default LOG_USER
syslog LOG_MAIL
account gmail
auth on
host smtp.gmail.com
port 587
user username
from username@gmail.com
password xxxxx
account default: gmail
4. Let do a test email using msmtp client.
printf "Subject: MSMTP Test\n\nhello there from MSMTP." | msmtp -a default username@domain.com
Comments