3

Our client has asked us to send sensitive data via TLS and to install a certificate on our mail servers so that they can verify the authenticity of our e-mails.

If I understand correctly, TLS encrypts the 'tunnel' that the message is communicated through, while not encrypting the actual content of the e-mail or any of its attachments. Is this correct?

If this is the case, am I right in saying that the content of the e-mail is potentially vulnerable to being intercepted at any server that is involved in SMTP relay between our outbound mail server and the recipients mail server?

4
  • TLS is just for connection authentication or as you called it, the "tunnel". It's really just for mail flow connections between servers and/or clients to make sure that unauthenticated clients/servers aren't permitted to send mail through said host/server.
  • If they want you to install a certificate on your server, that's for the purpose of verifying that there isn't a rogue or spoofing mail server trying to send them mail using your domain name but not your server. It's one of many ways to verify the sending server's authenticity to send mail for the respective domain.
  • Encryption of the email data itself is a completely different technology. There are various third-party vendors that offer this service, along with open source options such as PGP
  • Thanks Jack. You have confirmed my concerns. Given that the data is sensitive and personal, it sounds like we should reallty insist on message encryption like PGP or S/MIME if we want to stay on the right side of data protection legislation. – Mr Cholmondley Warner Feb 23 '16 at 19:22
  • I've used a few different vendor services. I've found ProtectedTrust to be very good. I would recommend you research their services. There are several vendors that offer the same or similar services as well. Glad to help. – Jack Bahou Feb 23 '16 at 19:24
  • Would importing an email certificate purchased from one of the big CA's, then configuring Thunderbird to use S/MIME be a reasonable solution? – Mr Cholmondley Warner Feb 23 '16 at 19:29
  • @MrCholmondleyWarner Look at en.wikipedia.org/wiki/S/MIME and read the Obstacles to Deploying section. Yes, in theory you could. However, the scope to which you would like to leverage encryption would be limited. – Jack Bahou Feb 23 '16 at 19:33
  • Thanks, I'll take a look. We are UK based and I am informed that we are no longer allowed to rely on the safe harbor agreements, so ProtectedTrust are out for us. – Mr Cholmondley Warner Feb 23 '16 at 19:36
3

If I understand correctly, TLS encrypts the 'tunnel' that the message is communicated through, while not encrypting the actual content of the e-mail or any of its attachments. Is this correct?

The email content passes encrypted through the tunnel, so it's won't be in plain through the wire (). It's like downloading a zip file through https. The zip itself won't have a password, but it was downloaded securely.

(Of course, you could use PGP in the email as well)

if TLS is specified, all relaying servers in between will use TLS…

That's wrong. TLS in emails, is hop-by-hop. You may transmit encrypted to the next relay, but if encryption is unavailable to the next, it will be transmitted in the plain. You could specify the XSECURITY ESMTP extension to request otherwise, but I think only courier mailservers support it.

If this is the case, am I right in saying that the content of the e-mail is potentially vulnerable to being intercepted at any server that is involved in SMTP relay between our outbound mail server and the recipients mail server?

Yes. While protected in transit, the content is fully available in the intermediate hosts so a malicious email relay could steal the contents. Thus, their output email host is probably connecting to your web server directly, not through any untrusted relay. Then, by using a (trusted) certificate, their mailserver can ensure that their server is connecting to yours, with no intermediate relay.

There are a number of caveats if you want true security, though:

  • First of all, they would somehow ensure they are not receiving a malicious MX dns reply, since you are probably not using dnssec.
  • The sending email server would need to verify that the certificate is trusted (it is pinned, or signed by a trusted CA…). By default, MTA will accept any certificate, as there too many self-signed ones so far.
  • Equally, when you are replying, your server should need to be equally hardened. What's good in having a perfect email server, if your replies are then quoting your secret contents, and sent with a MTA that is not taking advantage of the secure tunnel you offer?

Still, just will protect against passive eavesdroppers, such as a government agency snooping on the submarine cables.

  • Thanks Angel, I think governent agencies snooping on submarine cables are less of a concern to me that malicious SMTP relays, but interesting reading :) You are further confirming that I need to be employing message level encryption. – Mr Cholmondley Warner Feb 24 '16 at 12:41
1

Why would other servers be involved in the SMTP relay? Your server makes a secure connection to the destination MX server and sends the email. The only way for it to be intercepted is if the destination server is compromised. If the domain only uses secure MX servers then the message cannot be intercepted.

edit:

There can be multiple servers involved in an email exchange, however these servers are all either smtp relays configured by the originating server, or secondary MX servers configured by the destination domain. If a domain uses secure MX servers, and these servers have been properly configured for secure internal transfers, then you have the whole connection controlled.

It's not like 3rd party servers can inject themselves into the delivery pipeline.

  • This is not how email works. There can be intermediaries between originating and destination server. – Neil Smithline Feb 24 '16 at 3:07
  • @NeilSmithline If my mail server wants to send an email to a gmail account, it connects directly to the gmail MX servers. There are no servers in between. Assuming this connection is secure, there is nothing in between that can intercept the message. – user1751825 Feb 24 '16 at 3:49
  • @NeilSmithline This of course assumes that the OP has not configured additional SMTP relays himself. – user1751825 Feb 24 '16 at 3:57
  • The only servers involved in the email delivery are the originating SMTP server, SMTP relay servers (configured by the originating server), and primary and secondary MX servers (configured for the destination domain). The OP controls the originating server, his client presumably controls the destination servers, so there is no reason why the email delivery cannot be fully secure, even without content encryption. – user1751825 Feb 24 '16 at 3:59
  • So it's only true if there are no relays configured on the OP's server. That's missing from your answer. – Neil Smithline Feb 24 '16 at 6:25
0

Yes, this is correct. It sounds like they are hoping to connect directly to your mailserver.

These intermediate mailservers will be connecting to you over TLS and then making their own TLS connection to the next server. This in between is not encrypted. Essentially they are a man-in-the-middle.

  • So, if TLS is specified, all relaying servers in between will use TLS, but it is possible for someone to intercept the (plain text) message if/when it is stored on a relay?# – Mr Cholmondley Warner Feb 23 '16 at 19:11
  • 2
    It's not required that all relaying servers use TLS, no. – d1str0 Feb 23 '16 at 19:17
  • I think you should clarify that point in your answer. It read differently to me @d1str0 – Neil Smithline Feb 24 '16 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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