Am 19.12.2012 um 18:00 schrieb pan-users-requ...@nongnu.org: > FritzS - gmx posted on Tue, 18 Dec 2012 17:03:53 +0100 as excerpted: > >> Hi, >> how could I create nested rules? >> With Boolean terms --> (...) AND OR >> >> like this >> (User-Agent: ^MacSOUP/D-2\.8\.3 \(Mac OS X version 10\.6\.8 \(x86\)\)$) >> AND >> (X-Trace: netfront.net) > > Please turn off the HTML, at least when posting to the pan list. I > suppose you know how bad it looks in pan when others post with it.
sorry, I overseen this - my mac mail.app send default in html > > I'm guessing you mean scoring rules, not just rules, which in pan context > have a different meaning, as old-pan had something called "rules" that it > used differently. > > For complex scoring rules, you may have to edit the scorefile directly, > as pan's scoring GUI simply wasn't designed for that. pan uses slrn > scorefile format (minus advanced stuff like include, and case insensitive > by default). The documentation for it is available here: > > http://www.slrn.org/docs/score.txt > > Quoting from it: > > The `Score' keyword is used to assign a score to the header. > If it is followed by a single colon, the score is only given if all > tests are passed (logical AND); two colons indicate that the score > should be awarded if any of the tests are passed (logical OR). > > > I'd suggest reading the linked document in full, especially the example > scorefile (part 3) and explanation (part 4), as that can be clearer than > the bare rules in the first couple parts. > > Down at the bottom, there's this (with an example I'm not posting), but I > don't know for sure if pan supports it or not, and I'm headed to work in > a few minutes so I don't have time to experiment before I post: > > Lines enclosed in curly braces are grouped; the initial brace is > followed by one or two colons that indicate whether only one (`::') or > all of the lines (`:') inside the group need to match for the group to > pass. > > If pan doesn't take the curly-brace grouping, you can of course still do > the same thing using separate scoring rules. Now I use this in the score file %-------------------------------------------- % Chamaeleon [de.*, at.*] Score: =-7444 User-Agent: MacSOUP/D-2\.8\.3 \(Mac OS X version 10\.6\.8 \(x86\)\) X-Complaints-To: news@netfront\.net %-------------------------------------------- but the second line are ignored from pan, if I write this false "newssss@netfront\.net" it works too. Here the original NNTP header lines from a message I want to score X-Complaints-To: n...@netfront.net User-Agent: MacSOUP/D-2.8.3 (Mac OS X version 10.6.8 (x86)) Did I adapt this correct for the score file? What effected the ^ and the $ sample User-Agent: ^MacSOUP/D-2\.8\.3 \(Mac OS X version 10\.6\.8 \(x86\)\)$ > > One thing to note if compare the example file against what pan creates > using its GUI. The pan GUI doesn't create the most elegant or organized > scorefile, for sure. If you do a lot of scorefile hand editing (and > possibly even if you don't, simply for scoring efficiency if you have a > lot of scoring rules), it's worthwhile to organize things manually, and > do most of your editing manually after that. Here, I did my > organization, leaving a comment at the bottom under which all new entries > are added if I use the pan GUI to do so. Particularly for expiring > scores, I'll often create the score initially using the GUI, then edit > the scorefile, removing all comments but the %BOS line with the date and > possible a reason appended. And I'll go in and kill all the expired ones > occasionally. The most entries I make with Smultron - a simple and good editor for Mac Pan runs with MacPorts on Mac OS X Mountain Lion 10.8.2 -- FritzS fri...@gmx.net _______________________________________________ Pan-users mailing list Pan-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/pan-users