Re: [exim] Reject messages to users with low UID

Top Page
Delete this message
Reply to this message
Author: Marc Haber
Date:  
To: exim-users
Subject: Re: [exim] Reject messages to users with low UID
On Thu, 07 Jun 2007 08:49:59 -0400, Marc Sherman
<msherman@???> wrote:
>Is there any reason why you couldn't combine the two data blocks into a
>single router?


Personal stupidity, which is the reason why I asked here.

>This isn't tested, but I think it'd work:
>
>COND_SYSTEM_USER_AND_REMOTE_SUBMITTER = "\
>                ${if and{{! match_ip{$sender_host_address}{:@[]}}\
>                         {<{$local_user_uid}{FIRST_USER_UID}}}\
>                     {1}{0}\
>                 }"
>DATA_FAIL_SYSTEM_USER = ":fail: no mail to system accounts"

>
>lowuid_reject:
>   debug_print = "R: lowuid_reject 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}{DATA_FAIL_SYSTEM_USER}}}{DATA_FAIL_SYSTEM_USER}}


This seems to do the trick with only one router, thanks.

>But why have a separate aliases file for low uids in the first place?
>Wouldn't the re-ordering of the routers I suggested in the bug I filed a
>couple years ago on this topic solve the problem simpler and allow low
>uids to remain in the standard /etc/aliases file?


Your solution has a little too many side effects, IMO, and has
influence on the real- router which we really have for a long time.

How would you handle, in your solution, the case that it is desired to
have mail for, say, uucp (UID 8) be delivered to the mail store of the
user uucp? Aliasing it to itself in the system aliases file won't work
here.

Another argument for having our own alias file for low-uid users is
that /etc/aliases may be used by different MTAs on Debian systems as
well, and I'd like to keep its semantics as closely as possible to
what one expects of an /etc/aliases file on a Unix system.

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