procmail
[Top] [All Lists]

Re: Killing countries by email

2000-01-08 11:11:01
On Thu, 6 Jan 2000, David W. Tamkin wrote:

Shane asked,

The brackets do not contain runs of spaces.  The first one encloses caret,
space, tab; the second encloses space and tab.  Somewhere along the line
an editor program or a mail transport apparently replaced the tab with spaces
to the column where it ended.  That second condition should read,

        * ^Received:.*\.\/(cn|nl|jp)[^        ][      ]

The point is to make sure that the character after the country code is
something visible (usually a right-side angle bracket or a comma or a
semicolon, I'm guessing; it is folly to try to read Era's mind), followed by
a space or a tab.  The point is not to make a false match on, say, mail
from somebody(_at_)somemachine(_dot_)cnn(_dot_)com, for one example.

You are right.  Probably becuase it wasn't Era's mind (for once) that
something like taht came from.  :-)
 

         * ^Received:.*\.\/(cn|nl|jp)[^-._0-9a-z]

to make sure that we were matching on the last two characters of the domain
(well, last three if we count the period before the extractor).  We would
still need the next condition to strip the extra character off and get only
the country code out of it.

(Of course, thanks to procmail, we *do* know somebody in the Netherlands.)

Whitelists man.  Whitelists. :-)

--
"I'd love to go out with you, but I have to floss my cat."

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