Submitted by bdabelow on Fri, 10/26/2012 - 16:41
When a virtual server has exceeded its quota (group quota) and incoming mail delivery is started for a user of that server with no quota (or a quota higher than the group quota) the mail will neither be delivered nor a DSN will be sent back to the sender of the message.
I am pretty sure that the affected configuration is stock virtualmin pro when it comes to mail delivery.
The following seems to happen here for local delivery:
- /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME is invoked by MTA (postfix)
- procmail-wrapper sets the user to the user being delivered for
- /usr/bin/procmail -o -a $DOMAIN -d $LOGNAME is invoked by procmail-wrapper
- /etc/webmin/virtual-server/lookup-domain.pl $LOGNAME is invoked a specified in /etc/procmailrc (see attachements)
- lookup-domain.pl exits with exit code 0
- Delivery is tried to $HOME/Maildir/
- Delivery fails because group quota is exceeded
- procmail exits with exit code 255
- procmail-wrapper exits with exit code 0
- MTA considers mail as successfully finished
In my book procmail-wrapper should never tamper with procmail exit codes.
As a workaround I will remove any virtual server quota until fixed.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Fri, 10/26/2012 - 18:28 Comment #1
Actually, in step 5 the lookup-domain command is supposed to exit with code 73, indicating that the user is at or near his disk quota. This should then be passed back to Postfix, which interprets code 73 as meaning that the user is over quota, and defers the mail. This is done intentionally to prevent a user's quota from being completely filled up, which then breaks Dovecot and prevents deletion of mail.
But if this is failing for you, it may be because the
lookup-domain-daemon
process is not running on your system. Thelookup-domain
command talks tolookup-domain-daemon
to get quota information..Submitted by bdabelow on Sat, 10/27/2012 - 06:42 Comment #2
When the user is at his disk quota (user quota) lookup-domain returns 73 alright. But this does not happen if the virtual server is at its disk quota (group quota), lookup-domain returns 0 in this case.
Submitted by JamieCameron on Sat, 10/27/2012 - 19:39 Comment #3
Sorry, I missed the part about the domain being over quota. That is indeed a bug, which I will fix in the 3.96 Virtualmin release.
Submitted by Issues on Sat, 11/10/2012 - 18:46 Comment #4
Automatically closed -- issue fixed for 2 weeks with no activity.