On Sat, Dec 10, 2005 at 01:21:21PM -0800, Rob Hudson wrote:
> I think I have a similar question for procmail while we're at it... I'm
> using dspam for spam filtering. It gives headers of the form:
>
> X-DSPAM-Result: Spam
> X-DSPAM-Confidence: 0.5065
> X-DSPAM-Probability: 1.0000
> X-DSPAM-Signature: some kind of hash
>
> I'd like to filter those with result=Spam and with a confidence above a
> certain threshold to /dev/null since I'm pretty comfortable I never want
> to see those. The ones with lower confidence I may want to save in case
> of a false positive for spam.
>
> I've filtered on a single header before but never two. How do you do that?
That depends. Do you want an OR or an AND?
For an AND, you just include a second expression line. You can even match
on the same header twice:
:0
* ^List-Id:.*<[-A-Za-z0-9]*\.nfbnet\.org>
* ^List-Id:.*<\/[-A-Za-z0-9]*
NFB_${MATCH}/
BTW, I invented that little trick back when I was a Debianite because of
Debian's 37,000 different mailing lists. It's safe against shell escapes,
writes to maildir in my case (add the locking : if you change that!), and
this version of the rule works on all Mailman/Listar servers only editing
for the identity of the server in question. While on Debian, I used
<debian-[-A-Za-z0-9]*.lists.debian.org> for the first and used Debian_ as
my prefix. That way I didn't wind up with Debian_debian-devel, etc.
Unfortunately, these NFB lists have names like nfb-talk, nabs-l, blndtalk,
etc, mostly 8 characters or less from the daze of DOS because David can't
be bothered to rename the list, create the aliases, etc. ;)
--
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit."
-- Aristotle
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug