X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=etc%2Fexim4%2Fconf.d%2Frouter%2F850_exim4-config_lowuid;fp=etc%2Fexim4%2Fconf.d%2Frouter%2F850_exim4-config_lowuid;h=10e09a467e50f4c2eb0c8e53601f22ebc1bb589f;hb=0625c01974df320cade3f9cd56674bcdfee0d9f3;hp=0000000000000000000000000000000000000000;hpb=101c70d3c1375d6a434f87465bdba6722ad764ed;p=matthijs%2Fservers%2Fdrsnuggles.git diff --git a/etc/exim4/conf.d/router/850_exim4-config_lowuid b/etc/exim4/conf.d/router/850_exim4-config_lowuid new file mode 100644 index 0000000..10e09a4 --- /dev/null +++ b/etc/exim4/conf.d/router/850_exim4-config_lowuid @@ -0,0 +1,28 @@ + +### router/850_exim4-config_lowuid +################################# + +.ifndef FIRST_USER_ACCOUNT_UID +FIRST_USER_ACCOUNT_UID = 0 +.endif + +.ifndef DEFAULT_SYSTEM_ACCOUNT_ALIAS +DEFAULT_SYSTEM_ACCOUNT_ALIAS = :fail: no mail to system accounts +.endif + +COND_SYSTEM_USER_AND_REMOTE_SUBMITTER = "\ + ${if and{{! match_ip{$sender_host_address}{:@[]}}\ + {<{$local_user_uid}{FIRST_USER_ACCOUNT_UID}}}\ + {1}{0}\ + }" + +lowuid_aliases: + debug_print = "R: lowuid_aliases for $local_part@$domain (UID $local_user_uid)" + check_local_user + driver = redirect + allow_fail + domains = +local_domains + condition = COND_SYSTEM_USER_AND_REMOTE_SUBMITTER + data = ${if exists{/etc/exim4/lowuid-aliases}\ + {${lookup{$local_part}lsearch{/etc/exim4/lowuid-aliases}\ + {$value}{DEFAULT_SYSTEM_ACCOUNT_ALIAS}}}{DEFAULT_SYSTEM_ACCOUNT_ALIAS}}