Created
September 26, 2023 11:22
-
-
Save ZiTAL/a82849567baba455e72eca3c3cf6a668 to your computer and use it in GitHub Desktop.
config external smtp to setup debian to send mail
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
echo "Testing msmtp from ${HOSTNAME} with mail command" | mail -s "hi there" zital@riseup.net |
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
#!/bin/bash | |
apt-get install msmtp msmtp-mta mailutils | |
apt-get install bsd-mailx |
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
# /etc/mail.rc <- remove this line | |
set ask askcc append dot save crt | |
ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via Delivered-To | |
set mta=/usr/bin/msmtp |
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
# /etc/msmtprc | |
defaults | |
port 587 | |
tls on | |
tls_trust_file /etc/ssl/certs/ca-certificates.crt | |
account isp | |
host mail.riseup.net | |
from zital@riseup.net | |
auth on | |
user zital | |
password 1234567890 | |
account default: isp | |
aliases /etc/aliase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Eskerrak: https://moritzvd.com/email-with-smtp-debian-ubuntu/