[Dovecot] Dovecot behaviour when the server's file system fails (possible feature request)

Timo Sirainen tss at iki.fi
Sun Oct 8 23:46:14 UTC 2006


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20061009/3964b799/attachment.pgp 


More information about the dovecot mailing list