procmail
[Top] [All Lists]

Re: Problems with To: line recognition (oh, and hello)

1997-12-04 16:22:28
According to the man page...
"If  the  regular expression contains `^TO' it will be sub-
stituted by `(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-
Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)', which
should catch all destination specifications."

   Load up the entire message(s) into a text editor and look at all
occurences of "vsp@" etc.  You'll probably yourself listed under one
of them.

  Also, what happens when one of your subscribed mailing lists
get spammed?  In my filter (conceptually similar to yours) if a spam
is addressed To:/Cc:/Bcc: the procmail list then it gets through.  If
the envelope is to the list but the To:/Cc:/Bcc: lines don't have the
procmail list address, it's trapped.

{
   :0 c
   | (grep -iE '^From|^Subject: [etc.]  ' ; echo '') >> $MAILDIR/.elog

   :0 W: $MAILDIR/emailspam.lock
   $MAILDIR/emailspam
}

  Great minds think alike<g>.  I'm doing something very similar.  It
looks like you're invoking grep to get the headers into $MAILDIR/.elog
and then invoking echo '' to force linefeeds.  Here's my equivalent...

{
LOG="////////////////////////////////////////01
"
       :0 hc: headers1.lock
       $LOGFILE

       :0: rejects1.lock
       $BACKUPFILE
}

   Yes... the LOG statement begins on one line and ends on the next.
This incorporates the linefeed, without having to invoke the shell
and echo ''.  I end the line of slashes with "01" because I have a
similar recipie in another area of my .procmailrc, and I want to
know which one tripped the spam alarm.
   Note the "h" in ":0 hc: headers1.lock".  This says to feed the
entire headers (but not the body) into the process.. i.e. append to
the logfile.  The line of slashes separates one spam-message's
headers from the next spam's headers.  The main difference between
our scripts is that mine does everything using procmail.  By not
invoking the shell, not invoking grep, and not invoking echo, I
think that my version places slightly less load on the server.

-- 
Walter Dnes
waltdnes(_at_)interlog(_dot_)com


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