[exim] User filter file...

Top Page
Delete this message
Reply to this message
Author: John Mc Murray
Date:  
To: exim-users
Subject: [exim] User filter file...
Hello everyone,

(Added note: I've sent this same email twice before, but I've not seen
it showing up in my own mailbox, nor replies, etc, so my guess is that
there was some issue with the email account I was sending it from. I'm
going to try once more from my regular address)...

I'm trying to configure exim for auto reply, mail forwarding (per user
or per domain) as well as catch all email addresses.

This is on a server with multiple domains and each domain has multiple
virtual users / mailboxes.

I have most of this working, but what I'm stuck on is a catch all email
which only catches all if there is not an existing mailbox for the to
address, ie, if there is a mail box john@??? but not
peter@???, then mail to john@ will go to john, but mail to
peter@ will go to catch all.

I was thinking of using something like this in my user's filter file.

By the way, the user's directories will be in the format:

/home/username/mail/domain.com/john
/home/username/mail/domain.com/mike, etc

and the filter file sits in /home/username/mail/domain.com/.filter

so, what I wanted to do is:

if ! exist {/home/username/mail/domain.com/$local_part}
then
seen deliver "catchall@???"
endif


That way, if the local_part folder does exist, the catch all is skipped..

I have an error in that conditional testing though. I keep getting this
in the logs:

error in filter file: unrecognized condition word
"${home/domainco/mail/domain.com/${local_part}}" near line 5 of filter file


Please will someone help me get the syntax right.

Regards,

John