Hi,

I would like to make it easily configurable in the Debian packages to
reject messages to local accounts with UID below a certain border. I
also would like to have the possibility to define exceptions for this
rule.

This is what I built:

|FIRST_USER_UID = 500
|
|lowuid_aliases:
|  debug_print = "R: lowuid_aliases for [EMAIL PROTECTED] (UID $local_user_uid)"
|  check_local_user
|  driver = redirect
|  allow_fail
|  domains = +local_domains
|  condition = "${if <{$local_user_uid}{FIRST_USER_UID}\
|                       {1}{0}}"
|  data = "${if exists{/etc/exim4/lowuid-aliases}\
|             {${lookup{$local_part}lsearch{/etc/exim4/lowuid-aliases}}}\
|             fail}"
|  redirect_router = lowuid_target
|
|lowuid_reject:
|  debug_print = "R: lowuid_reject for [EMAIL PROTECTED] (UID $local_user_uid)"
|  check_local_user
|  driver = redirect
|  allow_fail
|  domains = +local_domains
|  condition = "${if <{$local_user_uid}{FIRST_USER_UID}\
|                       {1}{0}}"
|  data = ":fail: no mail to system accounts"
|
|lowuid_target:
|  condition = 0
|  driver = redirect
|  data = ":fail:"

I don't particularly like that it took me three routers to accomplish
this. The first router handles a special alias file as exception rule,
and, if an exception is found, continues processing with the target
router which is configured to always decline. If no exception is
configured, the lowuid_reject router issues the reject.

Can this be done a little more elegant and a little less clumsy?

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to