exim-smarthost: make SPF check optional

This commit is contained in:
tv 2022-12-07 20:03:15 +01:00
parent df93a24faa
commit 1796bf4912

View File

@ -12,6 +12,8 @@ let
api = {
enable = mkEnableOption "krebs.exim-smarthost";
enableSPFVerification = mkEnableOption "SPF verification";
authenticators = mkOption {
type = types.attrsOf types.str;
default = {};
@ -181,10 +183,10 @@ let
accept
acl_check_mail:
${if cfg.enableSPFVerification then indent /* exim */ ''
accept
authenticated = *
accept
sender_domains = +sender_domains
hosts = +relay_from_hosts
deny
spf = fail : softfail
@ -212,6 +214,9 @@ let
log_message = spf=$spf_result
accept
add_header = $spf_received
'' else indent /* exim */ ''
accept
''}
begin routers