[Dovecot] Thunderbird Archive to slower storage - sort of alternate storage

Marcio Merlone marcio.merlone at a1.ind.br
Tue Mar 13 16:36:32 EET 2012


Hi people,

When a user archives a message from Thunderbird it moves to an IMAP 
folder "Archives", everyone knows that. I use dovecot 1:1.2.9-1ubuntu6.5 
on Ubuntu 10.04 and want to move that folder (and respective IMAP 
sub-folders) to a slower storage, link it to original location and my 
first idea for this is

find -type d -name .Archives\* -print0 | \
while read -d $'\0' archive; do \
mv "$archive" /dead/Emails/jhon.doe/; \
ln -s "/dead/Emails/jhon.doe/$archive" .; done

It works, given that the files are not locked. I could restart dovecot 
before so it would unlock the files, but there is no guarantee it does 
not get locked again before the find finishes.

I took a look on mailling list archives, but could not find something 
like that and was wondering what you guys use (if any) for such task and 
what are the recommendations, best practices, solutions for that?

Thanks in advance, best regards.


-- 
*Marcio Merlone*


More information about the dovecot mailing list