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

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Marc Sherman
Data:  
Para: exim-users
Asunto: Re: [exim] Reject messages to users with low UID
Marc Haber wrote:
> On Tue, 05 Jun 2007 21:04:17 +0200, Marc Haber
> <mh+exim-users@???> wrote:
>> 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.
>
> No comments about this for me?


Is there any reason why you couldn't combine the two data blocks into a
single router? 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}}


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?

- Marc