[Dovecot] sieve-test again
I'm not sure what it is I'm doing wrong here, perhaps my 'test' mail is not in the format expected by sieve-test.
The 'test' file is a file taken directly from a dovecot maildir - so is in the normal format of having headers, a new line, then the body. There is nothing exceptional about this email.
Notice how the header below is 'innocent', however it appears that the test is ignoring this header.
grep DSPAM-Res test
X-DSPAM-Result: Innocent
cat sievetest
require ["regex", "fileinto","envelope","reject","vacation","relational","comparator-i;ascii-numeric"];
if header :contains "X-DSPAM-Result" "Innocent" { fileinto "moo"; stop; }
sieve-test -c ./sievetest ./test
Performed actions:
(none)
Implicit keep:
- store message in folder: INBOX
Info: final result: success
I don't think it's this header, but rather *all* headers, as the following check also appears to fail.
if header :contains "To" "o" { fileinto "Spam"; stop; }
Am I mis-using the tool?
Thanks,
Ian
2009/2/23 Ian P. Christian <pookey@pookey.co.uk>:
I'm not sure what it is I'm doing wrong here, perhaps my 'test' mail is not in the format expected by sieve-test.
I don't know why I didn't figure this out from my previous mail/error.
sieve-test appears not to handle relative paths as it's 2nd param.
This works:
sieve-test -c -d - ./sievetest pwd
/test
This doesn't:
sieve-test -c -d - ./sievetest ./test
Ian P. Christian schreef:
2009/2/23 Ian P. Christian <pookey@pookey.co.uk>:
I'm not sure what it is I'm doing wrong here, perhaps my 'test' mail is not in the format expected by sieve-test.
I don't know why I didn't figure this out from my previous mail/error.
sieve-test appears not to handle relative paths as it's 2nd param.
This works:
sieve-test -c -d - ./sievetest
pwd
/testThis doesn't:
sieve-test -c -d - ./sievetest ./test
Ok, this was a bug. Thanks, fixed:
http://hg.rename-it.nl/dovecot-libsieve/rev/4d642db0b754
This was also an issue for deliver -p
and this is fixed by Timo.
Regards,
-- Stephan Bosch stephan@rename-it.nl
participants (2)
-
Ian P. Christian
-
Stephan Bosch