[courier-users] Interesting bug - failed to match after adding headers in maildrop

2014-07-21 Thread Denis Kanchev
Hi all, I've found a bug, where mail drop cant match the mail headers ( version 2.7.1 ) . The mail headers are in this order Received: Received: Message-ID: Date: From: User-Agent: To: Subject: Content-Type: Content-Transfer-Encoding: Then i run mail drop with -A option ( to add headers )

Re: [courier-users] Interesting bug - failed to match after adding headers in maildrop

2014-07-21 Thread Sam Varshavchik
Denis Kanchev writes: Matching /^subject:.*тест.*nst / against Subject: =?UTF-8?B?0YLQtdGB0YI= Nice - the subject is 3 symbols longer :) , then lets cut more symbols from the headers in the options, then we remove 3 more symbols from the options and finally maildrop matched the pattern

Re: [courier-users] Interesting bug - failed to match after adding headers in maildrop

2014-07-21 Thread Denis Kanchev
The maildrop rules are just : import SENDER; SENDER=tolower($SENDER) import RECIPIENT; RECIPIENT=tolower($RECIPIENT) RECIP=substr($RECIPIENT, length($HOST)+1) SHELL=/bin/sh logfile maildrop.log # junk to:тест if (/^subject:.*тест.*/:h) { log Matched } exit Mail is ( data is not actual :) ):

Re: [courier-users] Interesting bug - failed to match after adding headers in maildrop

2014-07-21 Thread Sam Varshavchik
Denis Kanchev writes: In the last test we see that the last symbol in subject is missing ( compared to previous log ) and the string is not decoded The pattern matching fails in last 2 tests. If the logging is the problem - the pattern will match and evaluate code inside the condition . I

Re: [courier-users] Interesting bug - failed to match after adding headers in maildrop

2014-07-21 Thread Denis Kanchev
Thanks a lot ! :) 2014-07-22 2:52 GMT+03:00 Sam Varshavchik mr...@courier-mta.com: Denis Kanchev writes: In the last test we see that the last symbol in subject is missing ( compared to previous log ) and the string is not decoded The pattern matching fails in last 2 tests. If the logging