Leroy van Logchem wrote:

I found the file to be ever growing, so when it had grown back to
160Mb in a single day, I decided to employ cron on the mail server:

11 4 * * * find $HOME/.maildir -type f -name dovecot.index.cache -exec rm {} \;

Since my mail is fetched in the background anyway, I am happy to
take the performance hit first thing in the morning.

I'm wondering, can this be done safely with connected users?


My guess would be :  Yes.

If dovecot has the file open, the OS won't trash it until there are no more 
links.

If dovecot is about to open the file, I'm sure Timo would use an open/create-on-fail pattern, not a test-if-exist/open patter which would lead to a race.

Worst case I can see is someone's session suddenly slows down a bit.

--
Curtis Maloney
[EMAIL PROTECTED]

Reply via email to