msmtp: add account option tls.fingerprint
This commit is contained in:
parent
9302523d34
commit
bce63e4dff
|
@ -22,6 +22,17 @@ with lib;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
tls.fingerprint = mkOption {
|
||||||
|
type = types.nullOr (types.strMatching "([[:alnum:]]{2}\:)+[[:alnum:]]{2}");
|
||||||
|
default = null;
|
||||||
|
example = "my:SH:a2:56:ha:sh";
|
||||||
|
description = ''
|
||||||
|
Fingerprint of a trusted TLS certificate.
|
||||||
|
The fingerprint can be obtained by executing
|
||||||
|
<command>msmtp --serverinfo --tls --tls-certcheck=off</command>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.attrsOf types.str;
|
type = types.attrsOf types.str;
|
||||||
default = { };
|
default = { };
|
||||||
|
|
|
@ -24,6 +24,9 @@ let
|
||||||
tls_starttls = onOff smtp.tls.useStartTls;
|
tls_starttls = onOff smtp.tls.useStartTls;
|
||||||
tls_trust_file = smtp.tls.certificatesFile;
|
tls_trust_file = smtp.tls.certificatesFile;
|
||||||
}
|
}
|
||||||
|
// optionalAttrs (msmtp.tls.fingerprint != null) {
|
||||||
|
tls_fingerprint = msmtp.tls.fingerprint;
|
||||||
|
}
|
||||||
// optionalAttrs (smtp.port != null) {
|
// optionalAttrs (smtp.port != null) {
|
||||||
port = toString smtp.port;
|
port = toString smtp.port;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue