[Exim] exim / cyrus / filtering: best approach?

Top Page
Delete this message
Reply to this message
Author: Jeff
Date:  
To: exim-users
Subject: [Exim] exim / cyrus / filtering: best approach?
Greetings fellow eximers!

I have exim acting as my MTA and successfully delivering to Cyrus
IMAP using a pipe driver to /usr/cyrus/bin/deliver.

I want to enable exims user filtering, and have got this running, at
least with logwrite messages atm.

I want users to be able to deliver incoming mail into a variety of
imap folders based on all the normal sort of filtering things - e.g.
things like: if $h_from contains "root" save $home/servers endif

Cyrus uses its own centralised message store, so this doesn't work.
(Please remember I want this to be easy for users to manage their
own .forwards!)

I see several approaches, and would like advice on the best one:

1) Set a perlvar in the filter that is used and then cleared in the
cyrus pipe: (I have tested this and it works - will it work for lots
of users simultaneously as the perl set_folder var is global?)

.forward
if <condition> ${perl{set_folder}{apples}} endif

/etc/exim.conf
  local_delivery:
    driver = pipe
    command = "/usr/cyrus/bin/deliver \
                ${perl{get_folder} \
                -- ${local_part} \
                ${perl{set_folder}{}"



2) Let the users specify the pipe in their .forwards
- don't know if this will work? (deliver must be run as cyrus user)
- easy for users to get wrong!

3) Use the Cyrus + addressing?
.forward
if <condition> deliver "${local_part}+apples" endif

and then I guess put in rules to make exim ignore anything from the
plus sign onwards?

Your advice appreciated.

Regards
Jeff