neomutt: fix STARTTLS
When smtps is used as a protocol, neomutt expects TLS but will if STARTTLS should be used. When using STARTTLS, smtp has to be used as protocol and `ssl_force_tls` is set. See <https://neomutt.org/guide/optionalfeatures#2-1-%C2%A0starttls>.
This commit is contained in:
parent
0ed5f9786b
commit
408ba13188
4 changed files with 85 additions and 2 deletions
|
|
@ -118,7 +118,8 @@ let
|
|||
sendmail = "'${neomutt.sendMailCommand}'";
|
||||
} else
|
||||
let
|
||||
smtpProto = if smtp.tls.enable then "smtps" else "smtp";
|
||||
smtpProto =
|
||||
if smtp.tls.enable && !smtp.tls.useStartTls then "smtps" else "smtp";
|
||||
smtpPort = if smtp.port != null then ":${toString smtp.port}" else "";
|
||||
smtpBaseUrl =
|
||||
"${smtpProto}://${escape userName}@${smtp.host}${smtpPort}";
|
||||
|
|
@ -217,7 +218,9 @@ let
|
|||
}";
|
||||
in ''
|
||||
# Generated by Home Manager.
|
||||
set ssl_force_tls = yes
|
||||
set ssl_force_tls = ${
|
||||
lib.hm.booleans.yesNo (smtp.tls.enable || smtp.tls.useStartTls)
|
||||
}
|
||||
set certificate_file=${toString config.accounts.email.certificatesFile}
|
||||
|
||||
# GPG section
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue