git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] docs: git-send-email: difference between ssl and tls smtp-encryption
@ 2022-10-10 17:28 sndanailov
  2022-10-10 19:11 ` Junio C Hamano
  2022-10-10 19:44 ` brian m. carlson
  0 siblings, 2 replies; 7+ messages in thread
From: sndanailov @ 2022-10-10 17:28 UTC (permalink / raw)
  To: git; +Cc: Sotir Danailov

From: Sotir Danailov <sndanailov@wired4ever.net>

New explanation for the difference between these values.
It's hard to understand what they do based only on the names.

Signed-off-by: Sotir Danailov <sndanailov@wired4ever.net>
---
 Documentation/git-send-email.txt | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 3290043053..4db32f05f0 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -178,8 +178,11 @@ Sending
 	for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH.
 
 --smtp-encryption=<encryption>::
-	Specify the encryption to use, either 'ssl' or 'tls'.  Any other
-	value reverts to plain SMTP.  Default is the value of
+	Specify the encryption to use, either 'ssl' or 'tls'. Any other
+	value reverts to plain SMTP. The difference between the two for Git is
+	that 'ssl' uses implicit encryption and defaults to port 465, 'tls'
+	uses explicit encryption and defaults to port 25. Other ports might be
+	used by the SMTP server. Default is the value of
 	`sendemail.smtpEncryption`.
 
 --smtp-domain=<FQDN>::
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] docs: git-send-email: difference between ssl and tls smtp-encryption
  2022-10-10 17:28 [PATCH] docs: git-send-email: difference between ssl and tls smtp-encryption sndanailov
@ 2022-10-10 19:11 ` Junio C Hamano
  2022-10-10 19:44 ` brian m. carlson
  1 sibling, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2022-10-10 19:11 UTC (permalink / raw)
  To: sndanailov; +Cc: git

sndanailov@wired4ever.net writes:

> From: Sotir Danailov <sndanailov@wired4ever.net>
>
> New explanation for the difference between these values.
> It's hard to understand what they do based only on the names.

True.  The names we use, 'ssl' and 'tls', emerged historically and
are not the best ones in retrospect.

It may also help understanding if you mentioned STARTTLS somewhere
in the description of "explicit" one, as (some) readers may be more
familiar with that term than "implicit vs explicit".

>  --smtp-encryption=<encryption>::
> -	Specify the encryption to use, either 'ssl' or 'tls'.  Any other
> -	value reverts to plain SMTP.  Default is the value of
> +	Specify the encryption to use, either 'ssl' or 'tls'. Any other
> +	value reverts to plain SMTP. The difference between the two for Git is
> +	that 'ssl' uses implicit encryption and defaults to port 465, 'tls'
> +	uses explicit encryption and defaults to port 25. Other ports might be
> +	used by the SMTP server. Default is the value of
>  	`sendemail.smtpEncryption`.
>  
>  --smtp-domain=<FQDN>::



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] docs: git-send-email: difference between ssl and tls smtp-encryption
  2022-10-10 17:28 [PATCH] docs: git-send-email: difference between ssl and tls smtp-encryption sndanailov
  2022-10-10 19:11 ` Junio C Hamano
@ 2022-10-10 19:44 ` brian m. carlson
  2022-10-10 23:56   ` Junio C Hamano
  1 sibling, 1 reply; 7+ messages in thread
From: brian m. carlson @ 2022-10-10 19:44 UTC (permalink / raw)
  To: sndanailov; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1657 bytes --]

On 2022-10-10 at 17:28:59, sndanailov@wired4ever.net wrote:
> From: Sotir Danailov <sndanailov@wired4ever.net>
> 
> New explanation for the difference between these values.
> It's hard to understand what they do based only on the names.
> 
> Signed-off-by: Sotir Danailov <sndanailov@wired4ever.net>
> ---
>  Documentation/git-send-email.txt | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
> index 3290043053..4db32f05f0 100644
> --- a/Documentation/git-send-email.txt
> +++ b/Documentation/git-send-email.txt
> @@ -178,8 +178,11 @@ Sending
>  	for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH.
>  
>  --smtp-encryption=<encryption>::
> -	Specify the encryption to use, either 'ssl' or 'tls'.  Any other
> -	value reverts to plain SMTP.  Default is the value of
> +	Specify the encryption to use, either 'ssl' or 'tls'. Any other
> +	value reverts to plain SMTP. The difference between the two for Git is
> +	that 'ssl' uses implicit encryption and defaults to port 465, 'tls'
> +	uses explicit encryption and defaults to port 25. Other ports might be
> +	used by the SMTP server. Default is the value of
>  	`sendemail.smtpEncryption`.

This is a definite improvement, but maybe we'd want to say that 'tls' is
really STARTTLS, while 'ssl' is always-on encryption over a dedicated
port.  It might also be worth mentioning that the choice of name doesn't
affect the actual protocol and version used and the user is almost
certainly using TLS either way.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] docs: git-send-email: difference between ssl and tls smtp-encryption
  2022-10-10 19:44 ` brian m. carlson
@ 2022-10-10 23:56   ` Junio C Hamano
  2022-10-11  0:20     ` Aaron Schrab
  0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2022-10-10 23:56 UTC (permalink / raw)
  To: brian m. carlson; +Cc: sndanailov, git

"brian m. carlson" <sandals@crustytoothpaste.net> writes:

>>  --smtp-encryption=<encryption>::
>> +	Specify the encryption to use, either 'ssl' or 'tls'. Any other
>> +	value reverts to plain SMTP. The difference between the two for Git is
>> +	that 'ssl' uses implicit encryption and defaults to port 465, 'tls'
>> +	uses explicit encryption and defaults to port 25. Other ports might be
>> +	used by the SMTP server. Default is the value of
>>  	`sendemail.smtpEncryption`.
>
> This is a definite improvement, but maybe we'd want to say that 'tls' is
> really STARTTLS, while 'ssl' is always-on encryption over a dedicated
> port.  It might also be worth mentioning that the choice of name doesn't
> affect the actual protocol and version used and the user is almost
> certainly using TLS either way.

So, it is not really specifying "the encryption", rather the way to
get into the encrypted communication.

I think the prose is OK, as long as we are not adding the third
value, at which time we may want to use enumeration instead.

        Specify how SMTP connection should be entered into encrypted
        mode.  The valid values are 'ssl' and 'tls'. Any other value
        reverts to plain (unencrypted) SMTP.  'ssl' refers to "implicit"
        encryption (sometimes calls SMTPS) that uses port 465 or 587 by
        default. 'tls' refers to "explicit" encryption (often known as
        STARTTLS) that uses port 25 by default.  Despite their names, it
        is likely the user is using the newer TLS protocol, not the
        deprecated SSL, for the actual encryption protocol either way.
    +
    Other ports might be used by the SMTP server. Default is the value of
    `sendemail.smtpEncryption`.

We might want to

 * introduce synonyms implicit/smtps vs explicit/starttls and
   deprecate the current confusing names over time?

 * error out when invalid value is given, instead of silently
   talking plaintext SMTP?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] docs: git-send-email: difference between ssl and tls smtp-encryption
  2022-10-10 23:56   ` Junio C Hamano
@ 2022-10-11  0:20     ` Aaron Schrab
  2022-10-11 14:06       ` Philip Oakley
  2022-10-11 15:49       ` Sotir Danailov
  0 siblings, 2 replies; 7+ messages in thread
From: Aaron Schrab @ 2022-10-11  0:20 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: brian m. carlson, sndanailov, git

At 16:56 -0700 10 Oct 2022, Junio C Hamano <gitster@pobox.com> wrote:
>        Specify how SMTP connection should be entered into encrypted
>        mode.  The valid values are 'ssl' and 'tls'. Any other value
>        reverts to plain (unencrypted) SMTP.  'ssl' refers to "implicit"
>        encryption (sometimes calls SMTPS) that uses port 465 or 587 by
>        default.

There can be only one actual default port for each of the settings and 
here that is 465.

Also, port 587 belongs with the 'tls' value. Perhaps saying something 
like:

     uses port 25 by default, but port 587 is often used as well.

>        'tls' refers to "explicit" encryption (often known as
>        STARTTLS) that uses port 25 by default.  Despite their names, it
>        is likely the user is using the newer TLS protocol, not the
>        deprecated SSL, for the actual encryption protocol either way.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] docs: git-send-email: difference between ssl and tls smtp-encryption
  2022-10-11  0:20     ` Aaron Schrab
@ 2022-10-11 14:06       ` Philip Oakley
  2022-10-11 15:49       ` Sotir Danailov
  1 sibling, 0 replies; 7+ messages in thread
From: Philip Oakley @ 2022-10-11 14:06 UTC (permalink / raw)
  To: Junio C Hamano, brian m. carlson, sndanailov, git

On 11/10/2022 01:20, Aaron Schrab wrote:
> At 16:56 -0700 10 Oct 2022, Junio C Hamano <gitster@pobox.com> wrote:
>>        Specify how SMTP connection should be entered into encrypted
>>        mode.  The valid values are 'ssl' and 'tls'. Any other value
>>        reverts to plain (unencrypted) SMTP.  'ssl' refers to "implicit"
>>        encryption (sometimes calls SMTPS) that uses port 465 or 587 by
>>        default.
>
> There can be only one actual default port for each of the settings and
> here that is 465.
>
> Also, port 587 belongs with the 'tls' value. Perhaps saying something
> like:
>
>     uses port 25 by default, but port 587 is often used as well.
>
>>        'tls' refers to "explicit" encryption (often known as
>>        STARTTLS) that uses port 25 by default.  Despite their names, it
>>        is likely the user is using the newer TLS protocol, not the
>>        deprecated SSL, for the actual encryption protocol either way.

I support the feeling that the documentation needs a bit of updating.

I found that I just couldn't manage to set up a send-email configuration
for one of my ISPs who was using non-default settings, and I never
managed to work out what was required, or decode if the script was
trying to enforce the default in some cases (i.e. it wasn't a 'default'
that could be changed!).

That ISP has recently consolidated its options (it has many legacy UK
email domains) to limit it's exposure to security holes, so I may retry
at some point(not this month), but it can be frustrating trying to debug
these failures in setups.

Philip



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] docs: git-send-email: difference between ssl and tls smtp-encryption
  2022-10-11  0:20     ` Aaron Schrab
  2022-10-11 14:06       ` Philip Oakley
@ 2022-10-11 15:49       ` Sotir Danailov
  1 sibling, 0 replies; 7+ messages in thread
From: Sotir Danailov @ 2022-10-11 15:49 UTC (permalink / raw)
  To: Aaron Schrab; +Cc: brian m. carlson, git, gitster

On Tue 11 Oct 2022 02:20, Aaron Schrab wrote:
> uses port 25 by default, but port 587 is often used as well

Well, I was trying to explain that the script would default to that port.
I like your idea as well, but I'm not sure if it will make things clearer.
I'm making a second version of the patch now. I will try to balance out
all of the ideas into something I feel might be easy to follow.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-11 15:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 17:28 [PATCH] docs: git-send-email: difference between ssl and tls smtp-encryption sndanailov
2022-10-10 19:11 ` Junio C Hamano
2022-10-10 19:44 ` brian m. carlson
2022-10-10 23:56   ` Junio C Hamano
2022-10-11  0:20     ` Aaron Schrab
2022-10-11 14:06       ` Philip Oakley
2022-10-11 15:49       ` Sotir Danailov

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).