From 4be24d5017d0563ec78bd83fb8fcd8528cbd7b6b Mon Sep 17 00:00:00 2001 From: Sam Varshavchik Date: Thu, 16 Jan 2014 18:04:04 -0500 Subject: maildrop: document that pattern searching uses canonical header form. --- maildrop/maildropfilter.sgml | 89 +++++++++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 29 deletions(-) diff --git a/maildrop/maildropfilter.sgml b/maildrop/maildropfilter.sgml index cd912df..9464cc7 100644 --- a/maildrop/maildropfilter.sgml +++ b/maildrop/maildropfilter.sgml @@ -1,5 +1,5 @@ - + SamVarshavchikAuthorCourier Mail Server @@ -601,48 +601,79 @@ form in the filter file: -pattern specifies the text to look for in the -message, in the UTF-8 codeset. -pattern must not begin with a space, -otherwise the leading slash will then be -interpreted as a division sign. If you must search for text that starts -with a space, use something like "/[ ] ... /". + pattern specifies the text to look for in the + message, in the UTF-8 codeset. + pattern must not begin with a space, + otherwise the leading slash will then be + interpreted as a division sign. If you must search for text that starts + with a space, use something like "/[ ] ... /". + -The general syntax of maildrop's patterns is described -in the + The general syntax of maildrop's patterns is + described in the pcrepattern 3 -manual page, with certain exceptions -noted below. -maildrop uses the -PCRE -library to implement pattern matching. -Not all features in PCRE are available in -maildrop, and -the options part, which follows the pattern specification, -changes the pattern matching further. -Consult the - + manual page, with certain exceptions + noted below. + maildrop uses the + PCRE + library to implement pattern matching. + Not all features in PCRE are available in + maildrop, and + the options part, which follows the pattern + specification, changes the pattern matching further. + Consult the + pcrepattern 3 -manual page for more information, but note the following exceptions: + manual page for more information, but note the following + exceptions: + -Internal options settings are not supported (but see the D -maildrop option, below). -Do not include option settings in the pattern, -doing so will lead to undefined results. + Internal options settings are not supported (but see the + D maildrop option, below). + Do not include option settings in the + pattern, + doing so will lead to undefined results. + + + + + Named subpatterns are not implemented. + Numbered subpatterns are implemented, see + Pattern Match Results, + below. + -Named subpatterns are not implemented. -Numbered subpatterns are implemented, see -Pattern Match Results, -below. + The search pattern gets executed not against the raw message text, + but the message transcoded into a canonical UTF-8-based format. + This process involves transcoding any non-UTF-8 message content + into UTF-8. Additionally, message headers get converted into a + canonical format before the search pattern gets executed. + + + + For structured headers with email addresses, the process involves + removing extraneous punctuation, or adding missing ones (in + situations where a missing punctuation character can be deduced). + Additionally certain pre-RFC822 obsolete header formats get + converted to canonical form. + + + + This means that header search patterns that include punctuation + character may appear not to work against obviously-matching + message text. Use reformime -u <message.txt, + with message.txt containing the sample message, + to see exactly the actual text that gets searched by patterns. + -- cgit v1.2.3