Question about Maildir automatic cleanup.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about Maildir automatic cleanup.

José Ildefonso Camargo Tolosa
Hi!

I want to automatically delete old messages from one user's Maildir, and I was thinking on running something like this:

find /home/user/Maildir/cur/ /home/user/Maildir/new/ -daystart -mtime +15 -delete

but I'm not sure if by deleting messages "manually" I will break the dovecot.index* files.

What do you think?

Thanks!

Ildefonso.


      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Reply | Threaded
Open this post in threaded view
|

Re: Question about Maildir automatic cleanup.

Jose Celestino
Words by José Ildefonso Camargo Tolosa [Tue, May 06, 2008 at 12:47:30PM -0700]:

> Hi!
>
> I want to automatically delete old messages from one user's Maildir, and I was thinking on running something like this:
>
> find /home/user/Maildir/cur/ /home/user/Maildir/new/ -daystart -mtime +15 -delete
>
> but I'm not sure if by deleting messages "manually" I will break the dovecot.index* files.
>
> What do you think?
>

The index files will "auto-fix".

--
Jose Celestino | http://japc.uncovering.org/files/japc-pgpkey.asc
----------------------------------------------------------------
"I trust my family jewels only to Linux" -- Knuth
Reply | Threaded
Open this post in threaded view
|

Re: Question about Maildir automatic cleanup.

mouss-2
Jose Celestino wrote:

> Words by José Ildefonso Camargo Tolosa [Tue, May 06, 2008 at 12:47:30PM -0700]:
>  
>> Hi!
>>
>> I want to automatically delete old messages from one user's Maildir, and I was thinking on running something like this:
>>
>> find /home/user/Maildir/cur/ /home/user/Maildir/new/ -daystart -mtime +15 -delete
>>
>> but I'm not sure if by deleting messages "manually" I will break the dovecot.index* files.
>>
>> What do you think?
>>
>>    
>
> The index files will "auto-fix".
>
>  

that said, deleting messages from the new/ directory is a bit risky...

also, for safety, better move the messages to another place (in the same
partition, to avoid a copy) and have another job delete them from that
place (maybe few days later).