0

Background: Customer reported redownloading mails. Mails are stored in /home dir with no space available that time i've checked it. (Yes, we got Nagios, but customer is aware of the situation:>) Courier-imap{-ssl} version: 4.8.0-3

Question: How is it possible that when no disk space is observed mail clinet starts to redownload all mails in that account?

As far as i dig i've found connection between this situatuion and file: courierimapuiddb stored in the user's Maildir. It's a database that keeps UIDS of emails. But how is it possible that when no disk space is left it gets wiped?

If you need additional information to invastigate please drop me a link.

1 Answers1

1

Probably the courierimapuiddb is supposed to get updated when an IMAP login occurs to reflect changes in the Maildir contents, but gets corrupted because you've run out of disk space.

That corruption might result in new message UID's getting generated when the next IMAP login occurs, which in turn makes all existing messages appear as new to the IMAP client. (I don't now how deterministic the UID generation for courier is. Unlikely but maybe a rebuild of the courierimapuiddb will always assign the same UID's to the same messages...)

If the IMAP client is configured to synchronise the mailbox (i.e. to facilitate working off-line) those new UID's are the trigger for the client to effectively downloaded all existing messages again. Once downloaded they shouldn't appear as new messages though, because the IMAP protocol preserves read status serverside.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • Ok, that's legitimate i suppose that the database has no space to update itself so it gets corrupted. Do you know any way to preserve that redownloading? (i'm just curious i won't do that on production:)) – Mateusz Pacek Dec 30 '15 at 09:37