Koozali.org: home of the SME Server

[SOLVED] Easy configuration to talk to other SMTP servers securely?

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Not an expert here, so I might not be phrasing things quite well.

In any case, and if I understand correctly, communication between mail servers may be in secure SMTP form. Can 9.1 do it?

I am asking here because Google has started showing a small red unlocked lock key when communication came from a party without some form of encryption. I think this is a new feature and, in my server's case, communication seems to be in not encrypted form.

Can I easily switch to encrypted communication during server-to-server SMTP transfers (or show that my sme is willing to proceed in an encrypted manner)?
« Last Edit: March 23, 2016, 07:46:37 AM by Michail Pappas »

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Easy configuration to talk to other SMTP servers securely?
« Reply #1 on: March 18, 2016, 12:01:48 PM »
Not an immediate answer, but here's a Google page with a little more detail about what they're looking for: https://support.google.com/mail/answer/180707?hl=en

It looks like it relies on DKIM and SPF.  Here's some information on setting up DKIM with SME: https://wiki.contribs.org/Email#DKIM_Setup.  I don't immediately see information on implementing SPF, but I'll check some more.
« Last Edit: March 18, 2016, 12:07:12 PM by DanB35 »
......

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Re: Easy configuration to talk to other SMTP servers securely?
« Reply #2 on: March 18, 2016, 01:03:17 PM »
Thanks, however if I understand correctly both of these links include information to strongly identify whether the sender of an incoming email is spoofed or not.

What I am looking for is means to configure SME, so that when talking to another, encryption-willing mail server, the SMTP session will be encrypted. End-to-end encryption that is.

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Easy configuration to talk to other SMTP servers securely?
« Reply #3 on: March 18, 2016, 01:27:43 PM »
What I am looking for is means to configure SME, so that when talking to another, encryption-willing mail server, the SMTP session will be encrypted. End-to-end encryption that is.
SME already does this via STARTTLS.  But according to Google's docs, from what I can see, the red padlock icon is not related to in-transit encryption, but to sender authentication (DKIM/SPF).  Do you have something from Google that says otherwise?

Edit: Never mind, looks like you're talking about this: https://support.google.com/mail/answer/6330403?hl=en.  I was confusing the red question mark (which is clickable, and explains what it means) with the red padlock (which isn't clickable).  Thanks, Google, for making things a bit confusing...

I stand by my statement above that SME does SMTP over TLS, but it appears it isn't using TLS (at least) when talking with the gmail servers.  I don't know why that would be--perhaps some research will help.

« Last Edit: March 18, 2016, 01:36:51 PM by DanB35 »
......

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Easy configuration to talk to other SMTP servers securely?
« Reply #4 on: March 18, 2016, 01:55:06 PM »
I stand by my statement above that SME does SMTP over TLS,...

... only when transferring messages to a configured SmartHost. When there is no SmartHost configured, qmail-remote does deliveries over port 25, unencrypted, based on MX or A records for the destination mail server.

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Easy configuration to talk to other SMTP servers securely?
« Reply #5 on: March 18, 2016, 01:58:08 PM »
Thanks for the clarification.  Is there a way to change this?  It seems a sensible default would be to attempt to use TLS when connecting to any remote host.
......

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Easy configuration to talk to other SMTP servers securely?
« Reply #6 on: March 18, 2016, 02:41:28 PM »
Thanks for the clarification.  Is there a way to change this?

Modify qmail, or use a different MTA. There might be patches for qmail which other people have already made.

Quote
It seems a sensible default would be to attempt to use TLS when connecting to any remote host.

What do you do when the cert has problems, e.g. weak ciphers, wrong name or unknown signing cert?

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Easy configuration to talk to other SMTP servers securely?
« Reply #7 on: March 18, 2016, 02:47:45 PM »
I wouldn't personally worry too much about this, just Google decided to show an icon that the message is encrypted or not, until Google decided to "show" an padlock icon we never "knew" about this.

As long as you've set up your MX / SPF etc, correctly everything will be fine.

If you are really paranoid about privacy etc, then use something like Proton Mail :)
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Easy configuration to talk to other SMTP servers securely?
« Reply #8 on: March 18, 2016, 02:49:32 PM »
What do you do when the cert has problems, e.g. weak ciphers, wrong name or unknown signing cert?
I'd think that should be configurable by the server admin, on a couple of levels: (1) what features are required for TLS to work (hostname match, recognized cert, which ciphers), with sensible defaults; and (2) what to do of TLS fails (send in cleartext, refuse to send, or ???).  On the second point, I'd think a fallback to cleartext would be a reasonable default--try to transport via TLS if possible, but use cleartext if not.

But if the only way to make qmail do this is to patch it, or otherwise use a different MTA, it would appear that the answer to Michail's question is that there's no easy way to do this.
......

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Easy configuration to talk to other SMTP servers securely?
« Reply #9 on: March 18, 2016, 03:11:57 PM »
it would appear that the answer to Michail's question is that there's no easy way to do this.

Use a SmartHost. IOW, delegate.

Offline Michail Pappas

  • *
  • 351
  • +1/-0
Re: Easy configuration to talk to other SMTP servers securely?
« Reply #10 on: March 22, 2016, 07:02:49 AM »
From the sound of it, it's not an easy feat to accomplish. At least for someone with my rather low knowledge of this area...

I have SPF installed, and there's an excellent DKIM setup page in the wiki, so I'll most likely tackle that.

Thanks to all for your feedback, I certainly got a quite interesting read queue waiting for me :)