msmtp: add extraConfig account option
This patch allow to define custom msmtp options per email account. For
example: to change the "auth" method from "on" to "login", add
`msmtp.extraConfig.auth="login"`.
(cherry picked from commit a7affc93ba
)
This commit is contained in:
parent
2d77421d7c
commit
6d8a296625
|
@ -21,5 +21,16 @@ with lib;
|
||||||
primary account will be used.
|
primary account will be used.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = { };
|
||||||
|
example = { auth = "login"; };
|
||||||
|
description = ''
|
||||||
|
Extra configuration options to add to <filename>~/.msmtprc</filename>.
|
||||||
|
See <link xlink:href="https://marlam.de/msmtp/msmtprc.txt"/> for
|
||||||
|
examples.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ let
|
||||||
# msmtp requires the password to finish with a newline.
|
# msmtp requires the password to finish with a newline.
|
||||||
passwordeval = ''${pkgs.bash}/bin/bash -c "${toString passwordCommand}; echo"'';
|
passwordeval = ''${pkgs.bash}/bin/bash -c "${toString passwordCommand}; echo"'';
|
||||||
}
|
}
|
||||||
|
// msmtp.extraConfig
|
||||||
)
|
)
|
||||||
++ optional primary "\naccount default : ${name}"
|
++ optional primary "\naccount default : ${name}"
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue