DMA (Dragonfly Mail Agent)

# ansible role
https://github.com/panticz/ansible/tree/master/roles/dma

# preconfigure
echo "dma dma/relayhost string mail.example.com" | debconf-set-selections
echo "ddm dma/mailname string $(hostname -A)" | debconf-set-selections

# install
apt-get install -y dma

# configure relayhost
echo "foo|mail.example.com:bar" >> /etc/dma/auth.conf

# send testmail
echo "This is a test message from ${USER}@${HOSTNAME} at $(date)" | /usr/sbin/sendmail foo@exaple.com

Configuration files
# /etc/dma/dma.conf
AUTHPATH /etc/dma/auth.conf
SMARTHOST smtp.strato.de
PORT 587
MAILNAME example.com
MASQUERADE foo@example.com
SECURETRANSFER
STARTTLS

# /etc/dma/auth.conf
foo@example.com|smtp.example.com:pass1234

view log
journalctl _COMM=sendmail -f

Fix on wheezy
echo "deb http://archive.debian.org/debian squeeze main" > /etc/apt/sources.list.d/squeeze.list
apt-get update

Links
https://wiki.mageia.org/en/Dma_Dragonfly_Mail_Agent