13 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] conditionally bouncin...
FromSent OnAttachments
Payal RathodJul 1, 2005 2:12 am 
Tony EarnshawJul 1, 2005 3:58 am 
Payal RathodJul 1, 2005 4:41 am 
Payal RathodJul 1, 2005 5:07 am 
Tony EarnshawJul 1, 2005 5:12 am 
Sam VarshavchikJul 1, 2005 5:53 am 
Payal RathodJul 1, 2005 6:03 am 
Jasper SlitsJul 1, 2005 6:19 am 
Tony EarnshawJul 1, 2005 6:35 am 
Payal RathodJul 1, 2005 9:17 am 
moussJul 1, 2005 5:33 pm 
moussJul 1, 2005 5:33 pm 
moussJul 1, 2005 5:45 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:Re: [maildropl] conditionally bouncing a mailActions...
From:Tony Earnshaw (ton@billy.demon.nl)
Date:Jul 1, 2005 3:58:57 am
List:net.sourceforge.lists.courier-maildrop

fre, 01.07.2005 kl. 11.11 skrev Payal Rathod:

I want to bounce all mails from list of domains and which are over 10000 bytes. The best possible I came up was,

if ( $SIZE > 10000 && /^From:.*@example\.com/ ) to /dev/null

But there are missing things here like, - I have to write a condition for each domain. Can I take the list from a text file?

Yes, maildropfilter.html gives a lookup example under "if" and you may use it almost literally.

- Instead of dumping the message this way can I bounce it back to sender?

Yes.

maildroprc:

if ( /^From: *!.*/ && lookup( $MATCH2, "/tmp2/badfrom.dat" )) { EXITCODE=77 exit }

/tmp2/badfrom.dat:

ene@example.com ^[^@]*$

Waiting eagerly for any answers on this.

1. I didn't know any of this before I read your mail, so I read maildropfilter.html and maildrop.html and looked for these things, then tried them out.

2: You should be doing all of this at the MTA level and not at LDA level. You shouldn't be bouncing anything, you should be smtp rejecting before your MTA passes the mail on to the LDA.

Best,

--Tonni