2 messages in net.sourceforge.lists.courier-users[courier-users] Courier perlfilter an...
FromSent OnAttachments
Robert August Vincent IIAug 7, 2002 1:04 pm 
Robert August Vincent IIAug 7, 2002 1:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Courier perlfilter and DSN'sActions...
From:Robert August Vincent II (cour@bobvincent.org)
Date:Aug 7, 2002 1:05:45 pm
List:net.sourceforge.lists.courier-users

Okay, I've successfully set up a simple perlfilter that calls spamc to determine whether a piece of email is spam. It returns "500 Spam" or "", depending on the return value of spamc. The relevant code is REALLY simple:

if (system("spamc -c < $filename &>/dev/null")) { return "500 Spam." } else { return ""; }

The problem I'm having is that DSN's contain the original email and are also detected as spam. So I'm seeing multiple errors in the log where Courier keeps trying to send a DSN and fails because the global filter is rejecting it.

I suppose I could just ignore the situation, as courierdsn will give up after about 4 retries. But that means that every piece of spam will be processed by spamassassin 5 times before going away.

I've modified my filter so that it won't bounce or scan DSN's, but I'd really rather drop spam directly into the bit-bucket, as the DSN's are often undeliverable because of bad envelope return addresses.

Is there any way a global filter can signal Courier to drop a message, without sending a DSN?

I suppose I could turn off DSN's entirely, but that seems a little extreme.

Comments? Suggestions? Criticisms?