Posts Tagged ‘cpanel’

Quota changes not being implemented on Dovecot mail server.

May 12th, 2010

Every now and again when applying a quota change to a user on a Dovecot mail server the change will fail to be implemented.  On a cPanel server in particular this will result in an error message being thrown back to the administrator.  On other systems the change will often appear to have been applied, but in reality will have failed.

The result of this will either be that the old quota level remains active, or occasionally that the user’s mail box is permanently flagged as full.  Obviously with the latter, this will cause emails being sent to the user being returned to the sender.  Often this is the first clue that something has gone wrong.

 
The fix for this: Simply navigate to the user’s mail directory and delete the maildirsize file.

rm -f maildirsize

 
The next time the user receives an email the file will be recreated by the Dovecot process and the quoter system will be repaired.  Once that’s done you’re able to re-a-sign the new quota level to the user.
 

Why does this happen?

Very occasionally it is just that the file gets corrupt.  However thanks to Dovecot’s ‘self healing’ abilities this is normally resolved automatically the next time the user receives an email.  A more likely cause is that the permissions on the maildirsize file have been altered, preventing the Dovecot process from being able to write to the file.

The most common cause however is that the quota was changed, and then before it was implicated by the server, (which happens on receipt of a new email), the quota was adjusted again.  If this happens continuously this problem will arise.