diff options
author | Andrew Fontaine <andrew@afontaine.ca> | 2020-07-20 08:54:18 -0400 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2020-08-13 21:36:31 +0200 |
commit | baea46c5acbb4a5be9b109d8ce06d2aec197353f (patch) | |
tree | 1b210b26606902e764e09d920282d986c7e38414 /modules | |
parent | fceef469c2ec99232d847f1d9d6b32665d915bbb (diff) |
git: set SSL if useStartTls is false
The git-send-email [0] script uses StartTLS if `smtpEncryption` is set
to `tls`, which can break services that don't support StartTLS.
[0]: https://github.com/git/git/blob/bd42bbe1a46c0fe486fc33e82969275e27e4dc19/git-send-email.perl#L1533
PR #1395
Diffstat (limited to 'modules')
-rw-r--r-- | modules/programs/git.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/programs/git.nix b/modules/programs/git.nix index a174fa0c4ee..312269de316 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -277,7 +277,14 @@ in { genIdentity = name: account: with account; nameValuePair "sendemail.${name}" ({ - smtpEncryption = if smtp.tls.enable then "tls" else ""; + smtpEncryption = if smtp.tls.enable then + (if smtp.tls.useStartTls + || versionOlder config.home.stateVersion "20.09" then + "tls" + else + "ssl") + else + ""; smtpServer = smtp.host; smtpUser = userName; from = address; |