3 messages in net.sourceforge.lists.courier-maildropRE: [maildropl] Re: Making over-quota...
FromSent OnAttachments
Andre FortinAug 5, 2004 11:04 am 
Sam VarshavchikAug 5, 2004 3:34 pm 
Andre FortinAug 9, 2004 12:29 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] Re: Making over-quota deliveries fail instead of being deferredActions...
From:Andre Fortin (afor@personainc.ca)
Date:Aug 9, 2004 12:29:53 pm
List:net.sourceforge.lists.courier-maildrop

Thanks, that works great... Hadn't thought of it :) For anyone else who might want this, this code works as a wrapper:

#!/bin/sh /usr/local/bin/maildrop $1 $2 $3 $4 $5 if [ "$?" -eq 77 ]; then return 100; fi

Quite simple, and you can add $6 $7 etc if you need more arguments passed to maildrop.

Andre

-----Original Message----- From: cour@lists.sourceforge.net [mailto:cour@lists.sourceforge.net]On Behalf Of Sam Varshavchik Sent: Thursday, August 05, 2004 6:34 PM To: cour@lists.sourceforge.net Subject: [maildropl] Re: Making over-quota deliveries fail instead of being deferred

Andre Fortin writes:

Hello,

I am using Maildrop with qmail-ldap and all works well, but there's one behavior I'd like to change, and I'm wondering if there's a simple way to do this. When a user is over their quota, qmail-ldap (if maildrop is not specified to be used) attempts the delivery, and returns a failure. However, if the user is set up to have their mail processed via maildrop, and are over quota, maildrop defers the delivery and leaves it in the local queue to try again. I'd like to make maildrop return a failure instead of deferring the message in this case. Is this possible? Thanks

in advance,

maildrop terminates with exit code 77 if the maildir is over quota.

You need to wrap maildrop inside a short shell script fragment that tests for exit code 77, and substitutes an exit code that qmail will interpret as a permanent delivery failure.