Sending mail through a SSL-only relay server with ssmtp

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.

Sending mail through a SSL-only relay server with ssmtp

8 pensieri su “Sending mail through a SSL-only relay server with ssmtp

  1. 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.

    1. I want to to thank you for this excellent read!! I certainly loved every bit of it. I have you saved as a favorite to check out new stuff you post…

  2. Thank you for some other informative blog. The place else may just I am getting that kind of information written in such a perfect way?
    I have a undertaking that I’m simply now operating on, and I
    have been at the glance out for such info.

    1. Hi it’s me, I am also visiting this website daily, this website is actually fastidious and the viewers are actually sharing fastidious thoughts.

  3. Every weekend i used to go to see this web page, for the reason that i wish for enjoyment, since this this web page conations actually pleasant funny stuff too.

Lascia un commento

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...