Dovecot IMAP and Quotas
I recently ran into an issue with a Dovecot (POP/IMAP) server on a Linux system that perplexed and annoyed me. The client complained that they were not receiving new emails and that their customers were getting bounce messages back from attempts to send them. As usual, the first step is to get a copy of the bounce to see what the problem reported to the sender is.
The error was a temporary one (thank goodness) so that meant that after I figured out the problem, email should begin flowing without loss:
deferred: local mailer (/usr/bin/procmail) exited with EX_TEMPFAIL
# quota
Disk quotas for user (uid ):
Filesystem blocks quota limit grace files quota limit grace
/dev/hda3 102400* 102400 102400 20707 0 0
That was it! Changing the quota was easy enough (I know, I should have fussed at the user and told them to reduce their disk usage, but I am a "nice guy"©.
# /usr/sbin/edquota
Use the "vi" interface to change the lines to 204800 (about 200MB).
Happy user? Not yet. Apparently, dovecot could not get over its fear of quotas. When the user attempted to login, they got an error and no update to their mailbox (postfix and procmail showed that mail was being delivered, but they weren't seeing it).
Connecting directly to dovecot as a client yielded:
# telnet localhost 110
Trying nnn.nnn.nnn.nnn...
Connected to mail.yourpobox.us.
Escape character is '^]'.
+OK Dovecot ready.
user
+OK
pass
+OK Logged in.
-ERR [IN-USE] Couldn't sync mailbox.
Connection closed by foreign host.
Ouch.
Dovecot was still in full error mode for this mailbox. Other user's mailboxes were not affected. I was going to restart dovecot, but, since it was late at night and the system had been up for a little over a half-a-year without updates or a reboot, I decided now would be a good time for both.
A couple of yum-based updates (yeah, yum!) and a reboot later, the mail was flowing again and the client was happy (well, the client was happy the next day when he was actually awake.




