2 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Legible quota messages
FromSent OnAttachments
Micah AndersonNov 15, 2006 9:16 pm 
Tony EarnshawNov 16, 2006 1:43 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] Legible quota messagesActions...
From:Tony Earnshaw (teri@barlaeus.nl)
Date:Nov 16, 2006 1:43:11 am
List:net.sourceforge.lists.courier-maildrop

Micah Anderson wrote:

References: <cone@commodore.email-scan.com>

Hi,

I need to bounce over-quota messages, rather than have them stuffing up my queue for 5 days to then be bounced. I found a message from this list from 2004[1] which details how to create a maildrop wrapper as follows:

#!/bin/sh

/usr/bin/maildrop $1 $2 $3 $4 $5 if [[ "$?" == "77" || "$?" == "75" ]]; then exit 100 fi

This serves to bounce messages for users who are over quota, rather than have them be temporary failures. Unfortunately, the bounces are incredibly opaque that none of my users can understand, even the geeks thought something was broken:

<us@mydomain.net>: Command died with status 100: "/usr/local/bin/maildrop_wrapper". Command output: maildrop: maildir over quota.

Sure, the words "over quota" appear in there, but if you have no idea what the first words are, you aren't going to figure out what this means by somehow figuring out that you need to ignore the first 17 words to get to the last two which actually indicate the problem.

How can I make this more legible?

Well, I suppose it depends on what backend you have to keep your users in. This site's users are in LDAPand the schema that we use for "quota" is Courier's authldap.schema. Each user has a quota attribute and if maildrop calculates that a user is over quota it sends a bounce (this is the only occasion we use bounces rather than smtp rejects); the tekst of the message is very plain:

<us@barlaeus.nl>: permission denied. Command output: maildrop: maildir over quota.

This is also for Postfix (2.3.4) with maildrop (2.0.2) delivery via master.cf/pipe.

I'm sure it's possible to do the same with an SQL backend, I don't know about userdb.

--Tonni

My postfix main.cf:

# maildrop unix - n n - - pipe flags=DRhu user=mail argv=/usr/local/bin/maildrop_wrapper -w 90 -d ${recipient}

1. http://article.gmane.org/gmane.mail.maildrop/2490/match=quota+wrapper+andre