[Dovecot] Deleting messages from MailDir

Matt Richards matt at mattstone.net
Wed Feb 13 01:24:49 EET 2008


excellent :)

thats good, I have used the same method to remove mail after my mail filter learns it as spam now.

Everythings comming together nicley with my new dovecot server, althought the server itself is still mostly in bits on the floor :)

Thanks,

Matt.

On Tue, Feb 12, 2008 at 10:45:08PM +0100, Rody wrote:
> 
> Funny, I asked a few days ago a similar question with the subject: 
> [Dovecot] replacement for IMAP_EMPTYTRASH=Trash:7
> You may want to look for the responses to that question as it's essentially 
> the same.
> In short: you can do this with a find command to remove older mails. There 
> should be no issues as maildir files don't need to be locked in order to do 
> it properly.
> The opinions vary slightly when it comes to using mtime or ctime. I've chosen 
> ctime because i believe using mtime will not garantee that there aren't any 
> mails left which are actually older than 30 days. I believe there are cases 
> where mtime may get changed, where ctime will not. Also, ctime starts 
> counting from the moment the mail gets dropped in a certain mailbox.
> Anyway for 30 day's i'd say you need ctime +29 or mtime +29 as the man pages 
> explain that +0 means actually up until 1 day old.
> 
> Regards,
> Rody
> 
> Op dinsdag 12 februari 2008 19:15, schreef Matt Richards:
> > Hello,
> >
> > I have dovecot running with MailDir as a backend to store email and I would
> > like to remove mail that is older that 30 days.
> >
> > I can do this by running 'find' on the MailDir but will this cause any
> > issues with dovecot?
> >
> > Thanks,
> >
> > Matt.

-- 
My software never has bugs. It just develops random features.
Matt Richards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20080212/c083c04f/attachment.bin 


More information about the dovecot mailing list