Skip to content

Instantly share code, notes, and snippets.

@ZiTAL
Created September 26, 2023 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZiTAL/a82849567baba455e72eca3c3cf6a668 to your computer and use it in GitHub Desktop.
Save ZiTAL/a82849567baba455e72eca3c3cf6a668 to your computer and use it in GitHub Desktop.
config external smtp to setup debian to send mail
echo "Testing msmtp from ${HOSTNAME} with mail command" | mail -s "hi there" zital@riseup.net
#!/bin/bash
apt-get install msmtp msmtp-mta mailutils
apt-get install bsd-mailx
# /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
# /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
@ZiTAL
Copy link
Author

ZiTAL commented Sep 26, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment