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