I would appreciate any feedback I could get on the following rules. The
intent is to not only nuke messages from certain senders, but to also nuke
messages that appear to be followups to those original messages.
---[ blackhole ]---
some@add\.ress
---[###########]---
---[ .mailfilter ]---
if (/^From: *!.*/ && lookup($MATCH2, "$MD/blackhole"))
{
# record the Message-ID in a database
exception {
gdbmopen ("$MD/msgid", "C")
if (/^Message-ID: !.*/)
{
flock "msgid.lock" {
gdbmstore (tolower($MATCH2), "1")
}
}
gdbmclose
}
# deliver to a blackhole directory, just in case
to $MD/.blackhole/
# or you could just do...
#exit
}
if (/^In-Reply-To: *!.*/)
{
exception {
gdbmopen ("$MD/msgid")
if ((gdbmfetch (tolower($MATCH2))) eq "1")
to $MD/.blackhole/
gdbmclose
}
}
---[#############]---
I'm not on the mailing list, but I can follow along via the archives just
fine. Or respond to my personal email and I'll post a summary of the
comments. Whatever works. :-)
/pg
-------------------------------------------------------------
We use Linux for all our mission-critical applications. Having the source code
means that we are not held hostage by anyone's support department.
(Russell Nelson, President of Crynwr Software)