On 2019-04-12 07:43, azurit--- via dovecot wrote:
Hi,

recently, we had a problem on one of our mail servers and, after
reboot, HDD with emails wasn't mounted into system. Until we fixed it,
 LOTS of users logged in (Dovecot allowed login and recreated
directory  structure of mailboxes) and saw empty mailboxes. Now they
are  redownloading all email, which isn't fun, as it's about 2 TB of
data.

Anyway, is there a way how to prevent this in the future? Can i set
Dovecot to disallow logins in such situations? Thanks.

You didn't tell which OS or init system you are using.
With systemd, you can add use "systemctl edit dovecot" and use:

[Unit]
RequiresMountsFor=/path/to/your/mounted/mailbox

This way dovecot will be started when the directory has been mounted.

IMHO, and with no offence intended, if you can't control your system initialization, then you should not start daemons automatically, i.e. you should take the role of systemd.

Cheers.

Reply via email to