[Exim] conditions in filters

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Paul Slootman
Fecha:  
A: exim-users
Asunto: [Exim] conditions in filters
I have a client that has his own domain. He has a dialup connection to
his ISP, and all email to anyone@??? goes into a POP mailbox.
Unfortunately, the POP3 server apparently doesn't have any extensions
for determining the original envelope recipient (e.g. like Demon's
SDPS). Currently fetchmail collects the email and dumps it to a local
user "info". I was thinking of giving the user "info" an exim filter
that would examine the To: and Cc: headers for any possible local
addresses, and then checking whether those local addresses exist. If so,
then deliver to those local addresses, else fall through to the "info"
mailbox (e.g. in case of a Bcc: copy).

However, somehow I can't quite grok the filter conditions. I had
something like:

# Exim filter

if first_delivery
then
    if foranyaddress $header_to:,$header_cc: ( $thisaddress matches "([a-z0-9.-]+)@hisdomain.com" )
    then
        if ${if exists {/home/${1}} {true}{}}
        then
            deliver $1@???
            seen finish
        fi
    endif
endif



However, this always gives the error:
Filter error: unrecognized condition word "exists" near line 7 of filter file

I realize I'm better off looking for valid local addresses via a
file lookup, but this was a first simple test and I can't figure out why
it doesn't work. This also doesn't work:

    deliver ${if exists {/home/${1}} {$1@???}{info@???}}


Same error message.
Are these conditions allowed in filters? If not, why are they listed in
the filter.txt?

This is with Exim 3.12.


Paul Slootman
-- 
home:       paul@??? http://www.wurtel.demon.nl/
work:       paul@???       http://www.murphy.nl/
debian:     paul@???      http://www.debian.org/
isdn4linux: paul@???   http://www.isdn4linux.de/