#662960 ssmtp doesn't validate server TLS certificates

Package:
ssmtp
Source:
ssmtp
Description:
extremely simple MTA to get mail off the system to a mail hub
Submitter:
"W. Trevor King"
Date:
2026-03-02 17:41:05 UTC
Severity:
wishlist
Tags:
#662960#5
Date:
2012-03-07 15:56:30 UTC
From:
To:
The current versions of sSMTP doesn't attempt to validate the server
certificate when using TLS.  Without this, users authenticating over
encrypted connections might unknowingly be sending their
authentication information to a man in the middle.

The attached patch allows the user to configure a set of trusted
authorities which can be used to validate the server (`TLS_CA_File`
and `TLS_CA_Dir`).  If neither configuration option is given, the
current behavious (no validation) is preserved.

The attached patch should be applied after my patch for bug #662959
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662959).

Trevor

#662960#12
Date:
2012-09-28 10:52:14 UTC
From:
To:
Hi, I have tried to use this patch in situation where ssmtp client is not
authenticating,  but I still want to have proper TLS connection to smtp
server. Found out the server SSL cert is not validated at all in this case. It
would be worthwhile addition.

#662960#19
Date:
2014-11-02 10:04:26 UTC
From:
To:
There is an improved patch in Fedora, that validates the CA but still
not the hostname:
http://pkgs.fedoraproject.org/cgit/ssmtp.git/tree/ssmtp-validate-TLS-server-cert.patch

#662960#24
Date:
2018-04-24 22:09:57 UTC
From:
To:
Dear Maintainer,

I'm changing the severity of this bug to 'serious'. I apologize if this
is presumptuous, but it seems to me that software that advertises TLS
functionality but neglects to check the supplied certificates is seriously
flawed. At the very least, the documentation should contain a Big Fat
Warning that the TLS functionality is limited to encryption and does not
include authentication of the server.

#662960#31
Date:
2019-01-09 15:23:53 UTC
From:
To:
Any chance seeing this issue addressed or its severity lowered, so we can have the package in Buster ?

Given its purpose - "extremely simple MTA [...]" - should this issue really be considered "serious" (and Release Critical) ?

PS: ssmtp is extremely handy to forward machine-generated messages in large deployments, internally, iow. where TLS is not required

#662960#36
Date:
2019-01-09 15:44:07 UTC
From:
To:
ssmtp seems like abandonware. Have you tried msmtp(-mta)? It works in a
similar way, is well supported and does the right thing when you want TLS.

Regards,
Simon

#662960#41
Date:
2019-01-10 08:22:27 UTC
From:
To:
(I liked the extreme lightweight of ssmtp but so be it)

PS: one might also look at esmtp(-run)

#662960#46
Date:
2019-03-05 22:26:58 UTC
From:
To:
Hi Celejar,

you have raised severity to "serious" on ssmtp Debian package
in bug #662960, which is reserved for "Serious policy violations" as
described at https://www.debian.org/Bugs/Developer#severities

It is customary to indicate exactly which section of Debian policy
Manual (at https://www.debian.org/doc/debian-policy/) the bug
breaks when setting "serious" severity.

While I do agree that limitations of TLS implementation should be
prominently noted in package documentation and even description, I do
not think that even completely non-existent TLS support qualifies for
more than "important" severity (and more likely "normal" or
"wishlist").

Unless someone objects with specific Debian policy section that this
package runs afoul, I'm going to revert its severity back to wishlist.

#662960#51
Date:
2019-03-06 01:05:56 UTC
From:
To:
I concede that I was probably mistaken in raising the severity to
"serious". I was probably just so aggravated at the package promising
TLS support but silently failing to perform certificate validation
that I conflated the normal English meaning of "serious" with its
technical meaning in this context ;)

I do stand by my position that this is at least an "important" bug. I
agree that non-existent TLS support would be merely "wishlist" priority
- but not if the package assured the user that it was providing TLS but
silently failed to do so!

Another email in this report argues:

Again, while I concede that this may not technically be RC, pointing
to the software's self-description as an "extremely simple MTA [...]"
misses the point: I have no problem with insecure software (I'm not
filing any bugs against telnet ;)), only with software that assures the
user of a certain level of security but does not provide it.

Thank you for your work on Debian, and I apologize for my initial error.

Celejar

#662960#56
Date:
2019-03-06 03:11:41 UTC
From:
To:
severity 662960 wishlist
thanks

The bug have been added tag "security", which is in sync with its TLS
deficiencies. However (as you noticed) "Severity" values (while they
might look innocently like plain English) have quite specific meanings
in BTS, which sometimes might be at odds with their common language
usages.

Because of that "Severity" is not just a number from 0-5 indicating
how much one would like for bug to be fixed, but something else.

"Severity: important" would indicate that package is just one small
step away from "rendering it completely unusable to everyone", which
looks too harsh to me in this case (as in many cases ssmtp is used
only for non-TLS plaintext SMTP delivery on LAN from satellite
machines to main MTA, which would then speak TLS to outside world
etc.)

"Severity: wishlist" however (as opposed to "normal") subtly
indicates that there is some functionality that is *missing*, and
that someone needs to think it over and write it, and that it might
be a more complicated task and probably not an one-line-fix (and thus
it would probably left to upstream to fix it, as Debian maintainer in
most cases won't be fixing it h[im/er]self unless upstream is dead
and someone else provides a verified good patch). It also indicates
it might be due to design decisions, like here.

I do agree completely with you that package should strongly indicate
in its docs and description about it's TLS deficiencies. If someone
would write such a documentation patch, perhaps it might have a
chance to be included.

[ As a side note, even with certificate checking in place there are a
lot of problems in todays "zillion untrusted CAs which we trust
anyway" security model, and even more so if you move from web
world (where clients try to be secure, and even people might
sometimes check basic credentials) to unattended MTA world where
almost nobody does, and vast majority of MTAs will simply by
default silently downgrade to plaintext if they think anything
might be problematic with TLS support etc. ]

#662960#63
Date:
2019-03-06 03:35:13 UTC
From:
To:
On Wed, 6 Mar 2019 04:11:41 +0100 Matija Nalis <mnalis-debianbug@voyager.hr> wrote:

...

According to the documentation, "important" denotes:

"a bug which has a major effect on the usability of a package, without
rendering it completely unusable to everyone."

I would say that that misleading the user about certificate
verification should be considered "a major effect on the usability of
[the] package", but I think we've beat this horse to death, so I defer
to your judgment.

I'll try to write something and submit it here.

Celejar

#662960#68
Date:
2019-04-16 13:12:28 UTC
From:
To:
On Wed, 6 Mar 2019 04:11:41 +0100 Matija Nalis <mnalis-debianbug@voyager.hr> wrote:

...

Attached are some documentation suggestions (I didn't touch the
manpage).

Celejar