Emails redownloading

Jozef Sudolsky ELBIA s. r. o.
2019-04-12T09:04:49Z

Cit?t "B. Reino via dovecot" <dovecot at dovecot.org>:

> 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.



Thanks. Any other suggestions? Some which will cover also situations
where HDD is disconnected while server is already running (so Dovecot
won't display empty mailbox but deny login instead).

--
S pozdravom
Bc. Jozef Sudolsky

ELBIA, s. r. o.
Stoli?kov? 870/4
974 01 Bansk? Bystrica

I?O: 36 702 897
I? DPH: SK2022300995
Spolo?nos? je zap?sana v OR vedenom OS v Banskej Bystrici pod spisovou zna?kou
12334/S v zlo?ke Sro.

Pred vytla?en?m tohto mailu, pros?m, zv??te dopad na ?ivotn?
prostredie. ?akujeme.
Please consider the environment before printing this e-mail. Thanks.