Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've installed sSMTP on Ubuntu 10.04 via:

sudo apt-get install ssmtp

My configuration file is:

# Config file for sSMTP sendmail
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named

# Where will the mail seem to come from?

# The full hostname

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address

Am I transmitting my credentials in clear text? Is calling ssmtp a secure operation?


share|improve this question

2 Answers 2

up vote 2 down vote accepted

Mail submission to will fail if STARTTLS is not issued:

[palantir]-[/var/tmp]-[528] % nc 587                        [2:16]
220 ESMTP b3sm14232728ibf.7
EHLO at your service, []
250-SIZE 35651584
530 5.7.0 Must issue a STARTTLS command first. b3sm14232728ibf.7
220 2.0.0 Ready to start TLS

For this use case, your credentials must be transmitted over TLS to be transmitted at all, so they are not being sent in the clear. Note however that while this is common behavior, this is not the required behavior -- it is quite possible that a server doesn't require TLS on the submission port, and also possible to similarly misconfigure your client.

As joschi mentioned, you can make sure it is encrypted with any tool that can capture packets off the wire, and I'd like to add tcpflow as a suggestion as well for that.

share|improve this answer
Would you say this is the best option for sending emails through a web site via something like PHP? As opposed to setting up a mail server. I'm just looking for something simple, with minimum security risk. – Rudy Jun 15 '10 at 3:06
Sure, that will work. If you choose to send directly through your code / own mailserver at some point, see… as well. – Sam Halicke Jun 16 '10 at 21:31

Besides setting UseStartTLS you should also set UseTLS to yes. See ssmtp.conf(5).

You could also check whether ssmtp is using an encrypted connection by sniffing the traffic with wireshark or tcpdump.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.