exim-smarthost: make SPF check optional
This commit is contained in:
parent
df93a24faa
commit
1796bf4912
@ -12,6 +12,8 @@ let
|
|||||||
api = {
|
api = {
|
||||||
enable = mkEnableOption "krebs.exim-smarthost";
|
enable = mkEnableOption "krebs.exim-smarthost";
|
||||||
|
|
||||||
|
enableSPFVerification = mkEnableOption "SPF verification";
|
||||||
|
|
||||||
authenticators = mkOption {
|
authenticators = mkOption {
|
||||||
type = types.attrsOf types.str;
|
type = types.attrsOf types.str;
|
||||||
default = {};
|
default = {};
|
||||||
@ -181,10 +183,10 @@ let
|
|||||||
accept
|
accept
|
||||||
|
|
||||||
acl_check_mail:
|
acl_check_mail:
|
||||||
|
${if cfg.enableSPFVerification then indent /* exim */ ''
|
||||||
accept
|
accept
|
||||||
authenticated = *
|
authenticated = *
|
||||||
accept
|
accept
|
||||||
sender_domains = +sender_domains
|
|
||||||
hosts = +relay_from_hosts
|
hosts = +relay_from_hosts
|
||||||
deny
|
deny
|
||||||
spf = fail : softfail
|
spf = fail : softfail
|
||||||
@ -212,6 +214,9 @@ let
|
|||||||
log_message = spf=$spf_result
|
log_message = spf=$spf_result
|
||||||
accept
|
accept
|
||||||
add_header = $spf_received
|
add_header = $spf_received
|
||||||
|
'' else indent /* exim */ ''
|
||||||
|
accept
|
||||||
|
''}
|
||||||
|
|
||||||
begin routers
|
begin routers
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user