9 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Bounce email in .mail...
FromSent OnAttachments
Christian LerrahnJun 13, 2005 7:48 am 
Sam VarshavchikJun 13, 2005 8:13 am 
Casey Allen ShobeJun 16, 2005 3:39 pm 
Sam VarshavchikJun 16, 2005 4:23 pm 
moussJun 16, 2005 4:50 pm 
Casey Allen ShobeJun 17, 2005 1:14 am 
Jure KorenJun 17, 2005 1:28 am 
Tony EarnshawJun 17, 2005 2:41 am 
Sam VarshavchikJun 17, 2005 6:56 am 
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:Re: [maildropl] Bounce email in .mailfilterActions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Jun 13, 2005 8:13:30 am
List:net.sourceforge.lists.courier-maildrop

Christian Lerrahn writes:

Hi, I'm desperately trying to get maildrop to bounce an email based on its size. What I've put in my .mailfilter is the following.

if ( $SIZE > 100000) { to "|/var/qmail/bin/bouncesaying 'Message too big'" }

The detection of the size seems to work correctly but what I find in the logs is

2005-06-10 14:02:55.259169500 status: local 2/10 remote 0/20 2005-06-10 14:02:55.332340500 delivery 220280: success: did_0+0+1/ 2005-06-10 14:02:55.332346500 status: local 1/10 remote 0/20 2005-06-10 14:02:55.823625500 delivery 220281: success: Message_too_big/ maildrop:_error_writing_to_filter./did_0+0+1/

and the message will just be delivered. The strange thing is that the error code of bouncesaying seems to be the same as the one vdelivermail will throw if the email has to be bounced by vpopmail (code 100). Nevertheless vdelivermail bounces work but the bouncesaying ones don't. What am I doing wrong? How do I get maildrop to recognize this as failed and hand over the error code 100 to qmail so that qmail bounces the email?

There are a couple of things wrong here:

1) You've instructed maildrop to pipe the message to an external program, "bouncesaying". maildrop expects this program to read the message and process it. bouncesaying failed to read the entire message. Although it's not possible for maildrop to detect this in all circumstances, when maildrop detects that the program terminated without reading the message, it correctly interprets it as a failure.

2) You should avoid bouncing mail after it's already accepted by your mail server. What you're doing might've been tolerable years ago, but on today's Internet, where an estimated 75% of all E-mail is spam with forged return addresses, sending backscatter bounces to forged return addresses -- especially in situations where they are easily preventable -- is considered abusive.