postfix: Support setting options for policyd-spf
This commit is contained in:
parent
61df799036
commit
88e292c5b7
2 changed files with 15 additions and 11 deletions
12
default.nix
12
default.nix
|
@ -454,6 +454,18 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
policydSPFExtraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
example = ''
|
||||||
|
skip_addresses = 127.0.0.0/8,::ffff:127.0.0.0/104,::1
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Extra configuration options for policyd-spf. This can be use to among
|
||||||
|
other things skip spf checking for some IP addresses.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
monitoring = {
|
monitoring = {
|
||||||
enable = mkEnableOption "monitoring via monit";
|
enable = mkEnableOption "monitoring via monit";
|
||||||
|
|
||||||
|
|
|
@ -98,17 +98,9 @@ let
|
||||||
(lib.optional cfg.dkimSigning "unix:/run/opendkim/opendkim.sock")
|
(lib.optional cfg.dkimSigning "unix:/run/opendkim/opendkim.sock")
|
||||||
++ [ "unix:/run/rspamd/rspamd-milter.sock" ];
|
++ [ "unix:/run/rspamd/rspamd-milter.sock" ];
|
||||||
|
|
||||||
policyd-spf = pkgs.writeText "policyd-spf.conf" (''
|
policyd-spf = pkgs.writeText "policyd-spf.conf" (
|
||||||
TestOnly = 1
|
cfg.policydSPFExtraConfig
|
||||||
|
+ (lib.optionalString cfg.debug ''
|
||||||
HELO_reject = Fail
|
|
||||||
Mail_From_reject = Fail
|
|
||||||
|
|
||||||
PermError_reject = False
|
|
||||||
TempError_Defer = False
|
|
||||||
|
|
||||||
skip_addresses = 127.0.0.0/8,::ffff:127.0.0.0/104,::1
|
|
||||||
'' + (lib.optionalString cfg.debug ''
|
|
||||||
debugLevel = 4
|
debugLevel = 4
|
||||||
''));
|
''));
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in a new issue