procmail
[Top] [All Lists]

Re: Filtering based on body only

1999-10-19 14:22:53
W. Mark Herrick, Jr. asked:
The first recipe here works fine, catches anything addressed to 
addreses(_at_)austin(_dot_)rr(_dot_)com

The second, however, isn't catching squat. What I'm trying to do is search 
the body of the message. If the IP's in the list below are in the body, 
then sort to the sw-austin folder.

I've tried various combinations (removing \ characters, parens, etc).

I also tried the following, but it didn't work:

:0: austin-lock
* B ?? (24\.27\.[0-63]\.|24\.93\.[32-63]\.|24\.28\.[64-95]\.)
sw-austin

Well, you could put the B in the flags (and why not use the
default lockfile name, especially since other parts of your
recipes do use the default for the same folder?):

:0B:
* (24\.27\.[0-63]\.|24\.93\.[32-63]\.|24\.28\.[64-95]\.)
sw-austin

but I don't think that's your problem.  I think it actually matches
what you call "the IP's in the list" but the list isn't right.

[0-63] does NOT match numbers from 0 to 63; it matches
the characters 0, 1, 2, 3, 4, 5, and 6.  (3 is in there twice.)
Perhaps you mean something like this?:
        ... ([0-9]|[1-5][0-9]|6[0-3]) ...
and similarly for [32-63] and [64-95].

(Note that if you're trying to catch arbitrary IP's as from spammers
it gets very tricky; they can use QP and/or hexadecimal, etc.)

Hope that helps,
Stan

<Prev in Thread] Current Thread [Next in Thread>