Hi Jörg,
>i finally found the reason why messages to overquota mailboxes silently
>disappear. deliver wasn´t invoked directly by sendmail. It was wrapped
>into the /usr/sbin/scanmail skript (from the Amavis project). Scanmails
>checks the mail for viruses and if none found forwards the mail to the
>original delivery agent. But scanmails completely ignores the return
>code from deliver and always return 0. I now patched scanmails so that
>the return code from the final delivery agent is returned and now mail
>to an overquota mailbox stays in the queue with status deferred.
if you do this, sendmail will try to deliver the mail (usually in short
intervals) again.
Because amavis will scan it every time again, this may bring you a BIG load
on the
machine. Usually those mailboxes that get lots of attachments are over quota
:-(
It could be better for some use cases to give an return code 69
(unavailable) to discard the mail and send an error message to the sender.
If you don't want this, set at least a big MinQueueAge value in your
sendmail.cf.
Daniel Matuschek
Swisscom IP-Plus