I have a setup consisting of postfix + maildrop, with maildir delivery and
quotas on maildirs (via maildirmake -q ).

While examining the logs, I noted that over-quota mails were deferred by
postfix, rather than bounced with an over-quota message.

Searching all over the net and through man-pages, maildrop (or rather
deliverquota) should return exit code 77 (EX_NOPERM) when over quota, and
postfix should bounce such messages.

However, I finally stumbled upon README.Debian, that says


--------------------------------
Patches
*******

The error code for errors on opening maildirs has been changed from
77 (EX_NOPERM) to 75 (temporary failure). See Debian bug 265399 for
a more thorough discussion of the reason for this patch.
--------------------------------

In deliver.C :


if ( deliver_maildir.MaildirOpen(mailbox, deliver_file,
             maildrop.msgptr->MessageSize()) < 0)
                  throw 75;


In maildir.C :

...
         merr << "maildrop: maildir over quota.\n";
               return (-1);
...


So - MaildirOpen returns < 0 if account is over quota, as well as if the
disk-space is full.

A high-volume mailserver with possibly lot of "abusing" or forgetful
users, should not have over-quota mails deferred, as this may even cause
the server to run out of disk-space in the long run because of queue build
up.

A more fine-grained patch is thus required.

Regards,
 Stefan




Reply via email to