1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

aerc: do not use smtp-starttls (#4272)

It was deprecated in 0.15.0, +insecure schema is suggested instead.
Thus, we can just copy imap logic, which already uses +insecure.
This commit is contained in:
Maxim Karasev 2023-08-05 11:56:10 +03:00 committed by GitHub
parent 15043a6591
commit 0a014a729c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 11 deletions

View file

@ -177,21 +177,20 @@ in {
params = cfg.aerc.smtpOauth2Params; params = cfg.aerc.smtpOauth2Params;
}; };
protocol = if smtp.tls.enable && !smtp.tls.useStartTls then protocol = if smtp.tls.enable then
if smtp.tls.useStartTls then
"smtp${loginMethod'}"
else
"smtps${loginMethod'}" "smtps${loginMethod'}"
else else
"smtp${loginMethod'}"; "smtp+insecure${loginMethod'}";
port' = optPort smtp.port; port' = optPort smtp.port;
smtp-starttls =
if smtp.tls.enable && smtp.tls.useStartTls then "yes" else null;
in { in {
outgoing = outgoing =
"${protocol}://${userName}@${smtp.host}${port'}${oauthParams'}"; "${protocol}://${userName}@${smtp.host}${port'}${oauthParams'}";
} // optPwCmd "outgoing" passwordCommand } // optPwCmd "outgoing" passwordCommand;
// optAttr "smtp-starttls" smtp-starttls;
msmtp = cfg: { msmtp = cfg: {
outgoing = "msmtpq --read-envelope-from --read-recipients"; outgoing = "msmtpq --read-envelope-from --read-recipients";

View file

@ -38,7 +38,6 @@ source-cred-cmd = echo PaSsWorD!
[e_smtp-nopasscmd-tls-starttls] [e_smtp-nopasscmd-tls-starttls]
from = Foo Bar <addr@mail.invalid> from = Foo Bar <addr@mail.invalid>
outgoing = smtp+plain://foobar@smtp.host.invalid:42 outgoing = smtp+plain://foobar@smtp.host.invalid:42
smtp-starttls = yes
[f_smtp-passcmd-tls-nostarttls] [f_smtp-passcmd-tls-nostarttls]
from = Foo Bar <addr@mail.invalid> from = Foo Bar <addr@mail.invalid>
@ -47,12 +46,12 @@ outgoing-cred-cmd = echo PaSsWorD!
[g_smtp-passcmd-notls-nostarttls] [g_smtp-passcmd-notls-nostarttls]
from = Foo Bar <addr@mail.invalid> from = Foo Bar <addr@mail.invalid>
outgoing = smtp+plain://foobar@smtp.host.invalid:42 outgoing = smtp+insecure+plain://foobar@smtp.host.invalid:42
outgoing-cred-cmd = echo PaSsWorD! outgoing-cred-cmd = echo PaSsWorD!
[h_smtp-passcmd-notls-starttls] [h_smtp-passcmd-notls-starttls]
from = Foo Bar <addr@mail.invalid> from = Foo Bar <addr@mail.invalid>
outgoing = smtp+plain://foobar@smtp.host.invalid:42 outgoing = smtp+insecure+plain://foobar@smtp.host.invalid:42
outgoing-cred-cmd = echo PaSsWorD! outgoing-cred-cmd = echo PaSsWorD!
[i_maildir-mbsync] [i_maildir-mbsync]