I sometime feel the need of sending mail directly from my terminal (eg. with mail or reportbug) without having a complete mail-server on my laptop, which is often offline or NATted. For this, I’ve started to use ssmtp, a simple MTA which only delivers local mails to a more powerful remote SMTP-server. I’ve configured it to only communicate over an encrypted TLS connection to well-known port 465, to avoid man-in-the-middle sniffers and firewalls filtering outgoing port 25. This is my configuration (can be tuned via /etc/ssmtp/smtp.conf on Debian-like systems):
root=myuser
mailhub=mail.example.org:465
rewriteDomain=example.org
hostname=myhost.example.org
UseTLS=yes
UseSTARTTLS=no
AuthUser=myuser@example.org
AuthPass=XXXXX
FromLineOverride=YES
Of course, you need an external mail server configured to relay your mail and accepting TLS connections. For this purpose, you could also use a free mail service, like GMail.
Koplano ha detto,
22/03/2013 a 10:25 am
hello, can SSMTP be used as a relay for my LAN computers and allow each person to use his own authentication to the mailhub? For instance if each user has an account at google app, can SSMTP proxy their authentication so that when they send each person is using his account instead of a common account ? Or do you know any solution that can do that? thank you.
kaeso ha detto,
22/03/2013 a 11:09 am
Msmtp should be capable of doing that. I am currently considering it, to replace ssmtp.