I'm banging my head against a brick wall here. I thought that
I had my IP-based filter working. I started by testing for an IP
block anywhere in the headers, and putting the to-be-rejected
IP-string in the subject. That worked. However, I didn't really
want to filter out "Subject:" lines, just the "Received: from"
lines. I'm logging on to an account I have at work, and sending
short test messages to my home account. One of the header lines
that shows up in those messages is...
Received: from domain_name (domain_name [142.97.204.150])
I've stuck the following lines into my .procmailrc...
#################
SET VERBOSE=ON
:0 h: test.lock
* ^Received: from*\[142\.97\.204\.
$LOGFILE
SET VERBOSE=OFF
#################
The message gets through (i.e. does *NOT* have its headers dumped
to $LOGFILE) and the log file swears up and down that the string
did not match. I've tried "* ^Received: from*()\[142\.97\.204\." as
well, but no luck.
This test happens to be the first line in the headers, if that
makes any difference. But I *CANNOT* assume that it's always that
way. Here's an example of the first 7 lines in a header. My ISP
is interlog...
==================================================================
Received: from mx2.mail.interlog.net
(root(_at_)mx2(_dot_)mail(_dot_)interlog(_dot_)net
[198.53.145.12])
by gold.interlog.com (8.8.5/8.8.5) with ESMTP id TAA19950;
Sat, 11 Oct 1997 19:50:52 -0400 (EDT)
From: 111097t7C10(_at_)tmi-osm(_dot_)net
Received: from webcube.cscent.net ([206.85.231.10])
by mx2.mail.interlog.net (8.8.5/8.8.5) with ESMTP id TAA26734;
Sat, 11 Oct 1997 19:46:53 -0400 (EDT)
==================================================================
HELP!!!
--
Walter Dnes
waltdnes(_at_)interlog(_dot_)com