著者: Michael Kefeder 日付: To: exim-users 題目: Re: [exim] possible bug: sieve filter not working when router uses
data instead of file
Michael Haardt wrote: >>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
>
>
> Your Sieve filter should never try to fileinto "inbox". Could it
> be that you passed it something via data that looked like a Sieve
> filter but had a syntax error? In that case, an implicit keep is
> done, which is equivalent to: fileinto "inbox";
> I never thought there's a syntax error, because fetching a exim style
filter from the database works. And i'm fetching the very same sieve
filter from the database that works when used as .forward file.
With your hint in mind I created a syntax error on purpose (using sieve
in the .forward file) i got the same error-message, therefore your
assumption is true that there's a fetching problem creating a syntax
error. Running exim in debug mode showed me there's a "syntax error in
line 2" when the sieve script is fetched from DB, I will investigate
what that is all about (i think it's about wrong newlines or sth. similar).
The syntax error "handling" is a problem though, because filtering will
fail silently (no user feedback, and looks normal in the logs) as long
as there is a syntax error in the sieve script...
>>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?
>
>
> Try something like this in your transport:
>
> directory = $home/${sg{$address_file}{^inbox}{}}
>
> That way you would deliver "inbox" to $home and "inbox.Folder" to
> $home/.Folder, which is common on maildir systems. Essentially you
> convert the relative path an absolute path, which also fixes the
> problem above.
> I tried that, over and over again with different configurations (the
exim documentation told me to do so ;-)) but this made my transport end
up being a normal transport to the default maildir and filtering didn't
work. At least that was what i felt when testing the filters, now i
think i ran into the problem that keep; is run when there's a problem
with the filter, which makes it look like a "normal" delivery.
Thanks to your hint I finally got the point of using $address_file ;-),
the config-snippets i found on the mailinglist about $address_file did
not help me much. The sieve filter (using .forward) works now using
fileinto "inbox.subdir"; - The clumsyness of full maildir pathes in
sieve scripts is gone now, thanks!
> I am sorry for not yet giving a way to get Sieve error messages
> other than by debug logs. It's on the TODO list, though.
> Oh well i can test the scripts for syntax errors on commandline using
'exim -bf <whatnot>' iirc - that's ok for me, well almost, testing for
errors using the database will become tough now ;)
Thanks for your help, i hope i can find the issue with DB-stored sieve
scripts.