[Dovecot] purge maildir folder after sa-learn

Eric Shubert ejs at shubes.net
Sat May 29 19:03:13 EEST 2010


Phil Howard wrote:
> On Wed, May 26, 2010 at 06:13, Timo Sirainen <tss at iki.fi> wrote:
>> On Wed, 2010-05-26 at 09:56 +0200, Florian Effenberger wrote:
>>>> rm -f /path/to/Maildir/.spam-learn/*
>> Oh, I really ment .spam-learn/cur/* (and maybe .spam-learn/new/* if you
>> make it learn from both and it doesn't move mails to cur/).
>>
>>> Can I simply delete the files, don't I destroy any indices or slow
>>> down Dovecot operation because of index rebuilding?
>> Keep Dovecot's index files around so that they won't get deleted while
>> Dovecot is trying to read/write them. You won't slow down anything by
>> manually deleting maildir files.
> 
> So basically, just moving mail files out (to a learn queue or
> whatever), from either "new" or "cur" is safe for Dovecot?  That would
> be simpler.
> 

That's what I do. I move them either to a (shared) ham or spam folder, 
and run the script posted earlier, which processes and deletes them.

-- 
-Eric 'shubes'



More information about the dovecot mailing list