I must be blind.
I'm writing a spam and malware filter for an e-mail discussion list. Dump
anything with a header "Content-Type: text/html" or "Content-Type:
multipart/". That part works, as procmail always has worked for me.
Also dump anything with any of " " or "<font" or "<a href=" in the
body. Nothing I do works. I've found "B" as a flag in the man pages, I've
found "* B ??" in examples here and elsewhere, but still haven't been able
to find a manual describing that syntax. (This is the first time I've ever
tried to make procmail match something in the body of e-mail.)
I'm replying to test messages so that there are cascading lines like
On Mon, 7 Oct 2002, daniel lance herrick wrote:
in the body of the messages I'm testing with.
With .procmailrc as follows:
# This is the Theonomy-L spam filter
LOGFILE=procmail.log
LOGABSTRACT=all
VERBOSE=yes
:0 cB
* daniel
$HOME/mail/danielbody
# end of test spam filter
the log comes out looking like
procmail: [7916] Tue Oct 8 22:57:59 2002
procmail: No match on "daniel"
procmail: Locking "/var/spool/mail/theonomy-l.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/theonomy-l"
procmail: Opening "/var/spool/mail/theonomy-l"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/spool/mail/theonomy-l.lock"
procmail: Notified comsat: "theonomy-l(_at_)1658:/var/spool/mail/theonomy-l"
From root Tue Oct 8 22:57:59 2002
Subject: Now it's Wednesday (was: Re: it's Tuesday
Folder: /var/spool/mail/theonomy-l 1686
and the message goes in the INBOX, not in $HOME/mail/danielbody.
Change the recipe in .procmailrc to
:0 c
* B ?? daniel
$HOME/mail/danielbody
and repeat the test. Same result:
procmail: [8063] Tue Oct 8 23:25:31 2002
procmail: No match on "daniel"
procmail: Locking "/var/spool/mail/theonomy-l.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/theonomy-l"
procmail: Opening "/var/spool/mail/theonomy-l"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/spool/mail/theonomy-l.lock"
procmail: Notified comsat: "theonomy-l(_at_)5004:/var/spool/mail/theonomy-l"
From root Tue Oct 8 23:25:31 2002
Subject: Wednesday (was: Re: it's Tuesday
Folder: /var/spool/mail/theonomy-l 1655
Just noticed the "c" flag is still there. That was useful when I had many
recipes, before I stripped the .procmailrc down to just one recipe for
testing and writing this plea for help.
The procmail is what came with RedHat 7.2:
[theonomy-l(_at_)cosmo theonomy-l]$ procmail -v
procmail v3.21 2001/06/29
Copyright (c) 1990-1999, Stephen R. van den Berg <srb(_at_)cuci(_dot_)nl>
Copyright (c) 1997-2001, Philip A. Guenther
<guenther(_at_)sendmail(_dot_)com>
Submit questions/answers to the procmail-related mailinglist by sending to:
<procmail-users(_at_)procmail(_dot_)org>
And of course, subscription and information requests for this list to:
<procmail-users-request(_at_)procmail(_dot_)org>
Locking strategies: dotlocking, lockf()
Default rcfile: $HOME/.procmailrc
It may be writable by your primary group
Your system mailbox: /var/spool/mail/theonomy-l
don't know what that "writable by your primary group" comment means,
-rw-r--r-- 1 theonomy users 149 Oct 8 23:24 .procmailrc
but surely it has nothing to do with not matching strings in message body.
Doing a less on /var/spool/mail/theonomy-l, every message has my name
written out full in the body. Every one of them went past recipes like the
ones above and there does not exist a file named
/home/theonomy-l/mail/danielbody.
Somebody please tell me! What silly little thing am I overlooking?
(The recipes in these tests try to match on my name to avoid the
complication of shift-seven and shift-dot. I tried a lot of variations on
and <font before switching to trying to match my name first.)
dan
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail