[exim] possible bug: sieve filter not working when router us…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Michael Kefeder
Datum:  
To: exim-users
Betreff: [exim] possible bug: sieve filter not working when router uses data instead of file
Hi List,

I started to play a little bit with Exim 4.41 and filters. I use a setup
where account data is stored in a mysql database, and i wanted to store
the filters there too. Thats why i used the following router and
transport to enable filters per user:

# ROUTER
xams_forward:
driver = redirect
address_data = ${lookup SQL_QUOTA_SITENAME}
allow_filter
check_ancestor
user = mail
directory_transport = xams_address_file
no_expn
data = ${lookup SQL_FORWARD_DATA{${value}}}
domains = +xams_domains
file_transport = xams_address_file
pipe_transport = address_pipe
reply_transport = address_reply
retry_use_local_part
no_verify
router_home_directory = /var/mail/${lookup
SQL_GET_SITENAME{${value}}}/${lc:$local_part}
transport_home_directory =
/var/mail/${extract{sitename}{$address_data}}/${lc:$local_part}

# TRANSPORT
xams_address_file:
driver = appendfile
check_string =
delivery_date_add
envelope_to_add
group = mail
maildir_format = true
maildir_tag = ,S=$message_size
message_prefix =
message_suffix =
quota = ${extract{quota}{$address_data}}
quota_size_regex = S=(\d+):
return_path_add
user = mail
create_file = belowhome

When i use it like this a Exim-filter:

#Exim filter
if $header_subject: contains Dbmail then save $home/dbmail/ endif

works but a Sieve filter:

# Sieve filter
require ["fileinto"];
if header :contains ["subject"] "Dbmail"
{
fileinto "/var/mail/my.domain/localpart/.dbmail/";
stop;
}
fileinto "/var/mail/my.domain/localpart/";

does not and produces the following output to the exim_main.log file:

2004-08-23 22:04:20 1BzL3D-0004XA-4W == save inbox <localpart@???>
R=xams_forward T=xams_address_file defer (-21): appendfile: file or
directory name "inbox" is not absolute

It thought it maybe is a configuration issue and started to fiddle
around a lot, but when i changed the router to point to a .forward file
instead of using "data" the very same sieve filter from above works.

To sum it up again:
- router using data with Exim-filter works
- router using file = .forward with Exim-filter works
- router using data with Sieve-filter does not work
- router using file = .forward with Sieve-filter works

Maybe it is technically impossible to use the data directive for
sieve-filters or something but i did not find anything about that in the
docs? I just wanted to tell you my experiences and would be very happy
if sieve filters work with data too, therefore i'm crossing my fingers
that it _is_ a bug that can be fixed ;-)

Also I don't know how to nicely write sieve scripts for maildir - using
the full path to the maildir is quite clumsy and also not obvious to
users from outside (a.k.a. customers, they have no idea of my servers
directory layout ;)). I think I'm missing something obvious here, but
all sieve examples i've found so far seem to be for mbox or cyrus-imap
as mailstore and they use fileinto "inbox.subdir"; - Is there something
similar available for maildir? Any example scripts for sieve+maildir out
there?

Thanks in advance for any useful hints

Mike