1 message in net.sourceforge.lists.courier-maildrop[maildropl] Maildrop and quota issues
FromSent OnAttachments
Pablo MedinaMay 26, 2005 11:56 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:[maildropl] Maildrop and quota issuesActions...
From:Pablo Medina (pabl@gmail.com)
Date:May 26, 2005 11:56:48 pm
List:net.sourceforge.lists.courier-maildrop

Hi all

Sorry about bothering with an issue that was addressed many times, but i am pretty lost. I have a qmail/vpopmail/maildrop combo running on a slackware 10.1 full updated box. qmail 1.03 vpopmail 5.4.9 maildrop 1.8.0

I have seen many scripts for maildrop and all have similar approachs to quota managing. My mailfilter script ends with: ---> # ------------------------------------------------------------------------------ # Deliver the mail normally # ------------------------------------------------------------------------------

if ($SPAM_DELIVERY == 0) { exception { xfilter "$DELIVERQUOTA -w 90 $VHOME" } } else { log $TMP_DIR exception { to "$TMP_DIR" } } # ------------------------------------------------------------------------------ # returncode 77 means Maildir over-quota, so bounce the mail # ------------------------------------------------------------------------------

if ($RETURNCODE == 77) { to "|$BOUNCESAYING 'El usuario ha excedido la quota '" } <---

I guess i am missing something obvious but cannot understand how to solve it. The situation is:

When a user is under quota, mail is succesfully delivered and my logfile shows:

-------------------------------------------------------------- Date: Fri May 27 02:09:05 2005 From: "eduardo rossia" <%FROM@goldenmail.ru> Subj: *SPAM(28.1)* fidelice a sus clientes File: /home/vpopmail/domains/xxxxx/info/Maildir/.Spam (7486)

-------------------------------------------------------------- (in this case it is spam so it's delivered to spam folder. If message is ok, it goes to normal maildir)

When the user is over quota this happens:

my logfile shows

-------------------------------------------------------------- Date: Fri May 27 02:09:47 2005 From: =?iso-8859-1?Q?Ver=F3nica_Videla?= <Reservas@xxxxxxx> Subj: !Err: |/var/qmail/bin/bouncesaying 'El usuario ha excedido la quota ' (1065)

-------------------------------------------------------------- and qmail logs shows:

@4000000042969f4a0817403c delivery 20459: deferral: maildrop:_Filtering_through_`echo_${PWD##*/}`/maildrop:_Filtering_through_`PWDTMP=${PWD_/*};_echo_${PWDTMP##*/}`/maildrop:_Filtering_through_`test_-e_$VHOME/maildirsize`/maildrop:_Filtering_through_`test_-e_$VHOME/.mailfilter`/maildrop:_Filtering_through_`test_-d_$VHOME/.$SPAM_DIR`/maildrop:_Filtering_through_xfilter_/usr/local/bin/deliverquota_-w_90_/home/vpopmail/domains/xxxxhost/xxxuser/Maildir/maildrop:_Delivering_to_|/var/qmail/bin/bouncesaying_'El_usuario_ha_excedido_la_quota_'/El_usuario_ha_excedido_la_quota_/maildrop:_error_writing_to_mailbox.//usr/local/bin/maildrop:_Unable_to_deliver_to_mailbox./

(using verbose option in this case)

No mail is returned (alerting about the user is over quota).

1) Is this because of the deferral return code? (In my sysexits.h i can see : #define EX_NOPERM 77 /* permission denied */)

2) Shouldn't this return a 75 errorcode? ( TEMPFAIL 75 )

3) If the answer above is yes, what is the correct way to make it happen?. I mean to reject mail with over quota message. Should i patch maildrop? (i saw in a mailing list "You have to patch maildrop to return a persistent return code in overquota conditions")

4) How do you manage this in your servers? Do you reject messages? Do you let the MTA solve this and retry till the normal queue process ends?

5) Is there a standard documented approach? i mean RFC's or so.(RFC822 says nothing about this and i am not sure if mail quotas are included in RFC's)

6) The most annoying issue. Under some circunstances (and i couldn't find a way to determine which ones) mail is delivered to /var/spool/mail/vpopmail (the mbox of vpopmail system user) . So instead of being queued to retry later, message is delivered to vpopmail user.

maildrop log shows:

--------------------------------------------------------------------------------- Date: Fri May 27 03:08:57 2005 From: "waxwork Whitman" <midb@funtimedate.com> Subj: *SPAM(12.9)* I'm very easy lets meet File: /var/spool/mail/vpopmail (4688)

---------------------------------------------------------------------------------

and qmail log shows:

@400000004296b983068b1a2c delivery 21229: success: maildrop:_maildir_over_quota./did_0+0+1/

I've increased logging options to check for a missing variable , but $USERNAME, $HOSTNAME and $TMP_DIR are defined. Also, permissions are ok in the Maildir.

Any ideas about what could be happening?

Well. That's all for now

Some questions may seem obvious or dumb but i prefer to be clear as i am not an english speaker.

Thanks in advance for your help.

Pablo E. Medina