[Dovecot] How to delete old mails in dovecot 1.2.x

Przemysław Orzechowski przemek.orzechowski at makolab.pl
Fri Feb 17 01:42:22 EET 2012


On Fri, 17 Feb 2012 01:28:28 +0200, Timo Sirainen <tss at iki.fi> wrote:
> On 17.2.2012, at 0.39, Przemysław Orzechowski wrote:
> 
>> I need to delete old mails from over 100 mailboxes with average of 10k
>> mails / mailbox 
>> Is there a way to delete old mails (by message date not file creation
>> date) as with doveadm in dovecot 2 ?
> 
> You can delete them by mtime or by ctime:
> 
> http://wiki.dovecot.org/Plugins/Expire#v1.0_cronjob_equivalent
> 
> If by "message date" you mean the Date: header, then there's no easy
way.

Yes Date header unfortunatly (seems i will have to write some kind of
script for that)

Just to be sure just deleting mail files is safe? 
Or do i have to run some additional commands to recreate dovecots index
files?
I'm using Maildir.

Asking just to be sure that I will not screw up something.




More information about the dovecot mailing list