exim: Add initial configuration.
[matthijs/servers/drsnuggles.git] / etc / exim4 / conf.d / router / 850_exim4-config_lowuid
1
2 ### router/850_exim4-config_lowuid
3 #################################
4
5 .ifndef FIRST_USER_ACCOUNT_UID
6 FIRST_USER_ACCOUNT_UID = 0
7 .endif
8
9 .ifndef DEFAULT_SYSTEM_ACCOUNT_ALIAS
10 DEFAULT_SYSTEM_ACCOUNT_ALIAS = :fail: no mail to system accounts
11 .endif
12
13 COND_SYSTEM_USER_AND_REMOTE_SUBMITTER = "\
14                ${if and{{! match_ip{$sender_host_address}{:@[]}}\
15                         {<{$local_user_uid}{FIRST_USER_ACCOUNT_UID}}}\
16                     {1}{0}\
17                 }"
18
19 lowuid_aliases:
20   debug_print = "R: lowuid_aliases for $local_part@$domain (UID $local_user_uid)"
21   check_local_user
22   driver = redirect
23   allow_fail
24   domains = +local_domains
25   condition = COND_SYSTEM_USER_AND_REMOTE_SUBMITTER
26   data = ${if exists{/etc/exim4/lowuid-aliases}\
27               {${lookup{$local_part}lsearch{/etc/exim4/lowuid-aliases}\
28               {$value}{DEFAULT_SYSTEM_ACCOUNT_ALIAS}}}{DEFAULT_SYSTEM_ACCOUNT_ALIAS}}