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 at 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
Possibly Parallel Threads
- Sieve: deleteheader not working with duplicate filter for implicit keep
- Sieve: deleteheader now working with duplicate filter for implicit keep
- managesieve script 'redirect' fails @ "Error: sieve: ... aborted due to temporary failure; Error: smtp-server: ... failed: SSL_accept() failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number"; direct send OK ?
- managesieve script 'redirect' fails @ "Error: sieve: ... aborted due to temporary failure; Error: smtp-server: ... failed: SSL_accept() failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number"; direct send OK ?
- can't get sieve to sort virus into spam