Msmtp Setup

intro | dma | msmtp nullmailer

Intro

doesn’t have a local queue?!

Install

debian

apt install msmtp
# msmtp-mta

slackware

removepkg dma | grep -v Deleting
rm -rf /etc/dma/
rm -rf /var/spool/dma/

slackpkg search gnutls
slackpkg search libsecret
slackpkg search p11-kit
slackpkg search nettle

sbopkg -r
sbopkg -i libgsasl
sbopkg -i msmtp

ls -lhF /etc/ssl/certs/ca-certificates.crt

make the null-mailer available to the system

ls -lF /usr/sbin/sendmail # no exist
ln -s ../bin/msmtp /usr/sbin/sendmail

netbsd

pkg_add msmtp
cp -pi /etc/mailer.conf /etc/mailer.conf.dist
vi /etc/mailer.conf

sendmail        /usr/pkg/bin/msmtp
mailq           /usr/pkg/bin/msmtp
newaliases      /sbin/nologin

Setup

ls -lF /etc/msmtprc* # no exist

# debian
cp -i /usr/share/doc/msmtp/examples/msmtprc-system.example /etc/msmtprc.dist

# slackware
cp -i /usr/doc/msmtp-*/msmtprc-system.example /etc/msmtprc.dist

# netbsd
mv /usr/pkg/etc/msmtprc /etc/msmtprc.dist
touch /usr/pkg/etc/msmtprc
ln -s /usr/pkg/etc/msmtprc /etc/msmtprc

grep -vE '^#|^$' /etc/msmtprc.dist > /etc/msmtprc.clean
grep -vE '^#|^$' /etc/msmtprc.dist > /etc/msmtprc
vi /etc/msmtprc

account default
host xc.nethence.com
port 465
tls on
tls_starttls off

auto_from on
maildomain DOMAIN-HERE

auth on
user USERNAME-HERE
password PASSWORD-HERE

syslog LOG_MAIL

Acceptance

see null-mailer

Resources

MSMTP https://marlam.de/msmtp/


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5
Copyright © 2023 Pierre-Philipp Braun