[Exim] is it possible to use a single lsearch file for deliv…

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Jonathan Vanasco
Data:  
Para: Exim-users
Assunto: [Exim] is it possible to use a single lsearch file for delivery/redirect / block ?
I'm going crazy on this. Forgive the reposting.

I'd like to have a file like this:
    /usr/exim/virtualdomain
    -------------------------------
    *: user_a@virtualdomain
    user_a: /var/spool/virtual_mail/u/user_a
    user_b: user_a@virtualdomain
    sales: X


and an exim router that would do something like this:
    myRouter:
        address_data =
${lookup{$local_part}lsearch*{/usr/exim/virtual_domain}}
        if address_data is a regex for 'X', fail the delivery
        if address_data is a regex for a path, deliver it w/ the appropriate
transport and set the driver to accept
        if address_data is a regex for a valid email address, accept it with
the driver to redirect


I've been playing around with using a 3 sep files, one each for accept,
block and redirect.
I can get that working almost perfectly -- i just can't figure out how
to reject messages for the block list (would that be better in an acl?)

The reason for the block list, is that I want to keep catchalls on
certain domains, but sometimes an address or two becomes a
'spamtrap', and I want it off.

I *think* i can get the single router to work if i set the address_data
to be the kind of list the address appears in, then do a faked-chained
logic to get 3 tiered results:
driver = if address in block list:
        block
    else:
        if address in accept list:
            redirect
        else :
            if address in virtual list:
                accept
            else


Is this too crazy? Should I stick with 3 sep files?

If so, can someone give me pointers on how to block the addresses in
the block lists?

Thank you all.