I'm getting to the point where I am entirely happy to grovel for
assistance. As with many folk I'm using SpamAssassin and want to delete
certain mails. I have checked the lists, and come up with a number of
methods. None of them actually work - whatever I try, the mail _always_
gets requeued for another delivery attempt. Eventually it bounces, which
given the fact that most headers are faked gives me some problems.
Here are the things I've tried:
First Try: -------------------------------------------------------
if ( /^X-Spam-Level: *\*\*\*\*\*/ )
{
log "MCS - Identified SPAM for immediate delete"
EXITCODE=99
exit
}
This requeues the message with the log file containing the "MCS - " line
only.
Second Try: ------------------------------------------------------
if ( /^X-Spam-Level: *\*\*\*\*\*/ )
{
log "MCS - Identified SPAM for immediate delete"
exception {
to /dev/null
}
}
This requeues the mail, leaving this in the log file:
MCS - Identified SPAM for immediate delete
Date: Wed Apr 21 09:28:17 2004
From: "Courier mail server at zhar.savigear.com" <@>
Subj: NOTICE: mail delivery status.
File:/dev/null (11094)
Third Try: ------------------------------------------------------
if ( /^X-Spam-Level: *\*\*\*\*\*/ )
{
log "MCS - Identified SPAM for immediate delete"
# This scipt silently drops the message content
#to "|path/to/autotrash.py"
exception {
to /dev/null
}
}
The script itself just reads stdin and does nothing with the result.
This requeues the mail, leaving one of two options in the log file
depending on the exit code of the script. For a 0 exit code:
MCS - Identified SPAM for immediate delete
Date: Wed Apr 21 09:28:17 2004
From: "Courier mail server at zhar.savigear.com" <@>
Subj: NOTICE: mail delivery status.
File:|/path/to/autotrash.py
If the script exits with a 99 code, the last line reads
Err!:|/path/to/autotrash.py
Note that I have no maildroprc set in my global settings.
Thanks in advance for your help,
Matt.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users