[Dovecot] Dovecot behaviour when the server's file system fails (possible feature request)
I've met a couple of times a situation, that there is something wrong with the mail server's operating system / file system, but Dovecot is still working, although it cannot any more access the mailbox files. The result is, that the imap mail client in the workstation automatically synchronises with the improperly empty-looking mailbox, effectively deleting everything previously loaded into the workstation's mail client (eg. Outlook Express) when using imap protocol.
This is very annoying, especially when the workstation isn't connected with a high-speed-enough connection, since after the server is properly brought up again, reloading all the contents of the improperly emptied mail client may take considerable amount of time. This is especially the case, if the workstation has kind of mobile connection (eg. gprs) with very limited bandwith -in that case the sychronizing of eg. 20MB account may take at least from half an hour to more than one hour, and in some cases (eg. gprs roaming) also cost considerable amount of money (gprs data transfer may cost from eg. 5 to over 10 euros or dollars per megabyte, when roaming outside the phone operator's own network).
So, is there currently a way to configure Dovecot in a way it would recognize that the mailbox actually is not accessible, and in that case it would return an error message to the mail client instead of returning "empty mailbox"? Of course, a smart enough mail client might also ask something from the user, but that seems not be the case either...
If this behavious cannot be changed with the current configuration options, then a kind feature request to the developer: Would it be possible to change the behaviour of Dovecot when it actually can not access the mailbox files?
Although the actual problem in this case is outside Dovecot, this kind of improvement would greatly improve the error tolerance of the whole system.
-- TiN
On Sun, 2006-09-03 at 13:25 +0300, Timo Neuvonen wrote:
I've met a couple of times a situation, that there is something wrong with the mail server's operating system / file system, but Dovecot is still working, although it cannot any more access the mailbox files. .. So, is there currently a way to configure Dovecot in a way it would recognize that the mailbox actually is not accessible, and in that case it would return an error message to the mail client instead of returning "empty mailbox"? Of course, a smart enough mail client might also ask something from the user, but that seems not be the case either...
How would Dovecot figure out if the mailbox isn't accessible because of some filesystem error, or because it's simply a new user who doesn't yet have a mailbox?
If any system calls return eg. EIO errors Dovecot catches those and fail with internal error messages. So I guess in your case everything seemed to work, but the mail directories just were lost. I can't think of how Dovecot could in a generic way detect that this is the case.
If this behavious cannot be changed with the current configuration options, then a kind feature request to the developer: Would it be possible to change the behaviour of Dovecot when it actually can not access the mailbox files?
Change mail_executable to point to a script:
#!/bin/sh
if [ ! -f ~/mail ]; then echo "* BAD mails are lost, bye" exit 0 fi exec /usr/local/libexec/dovecot/imap
participants (2)
-
Timo Neuvonen
-
Timo Sirainen