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.