Vini Engel writes:
My question is, if after doing all the patter matching and deciding what
to do with the message maildrop realises that it can't deliver to the
maildir because the quota is over. Then it exits with 77 (as the
documentations says) and so vdelivermail passes the failure back to
qmail and so on and the message is bounced back to the sender with
whatever output error given by maildrop. In this case the message "quota
is over".
The problem is, a lot of these messages that are bounced because of
quota are actually spam and could have been dropped instead and also the
error message that is bounced back to the sender is not descriptive
enough for many non-technical and/or non-english speaking people.
Is there any way to write a statement in the .mailfilter that catchs the
over-quota exit code or understand that the user is over quota. So I
could add more conditions based on whether the message will be delivered
or not, or even dropped if its spam score is too high.
You can use the exception statement.
But the real answer is: don't use qmail. It's ancient, unmaintained, and no
longer meets the minimum security standards that's necessary for
Internet-connected mail server.