[Dovecot] (somewhat ot?) purging old maildir messages
it-dovecot at ml.epigenomics.com
it-dovecot at ml.epigenomics.com
Tue Jan 8 11:08:46 EET 2008
On Thu, 3 Jan 2008 00:02:40 -0500,
"Matt LaPlante" <cyberdog3k at gmail.com> wrote:
>
> I know that since maildir uses flat files, I can literally just delete
> messages doing something similar to the following with bash:
>
> for i in $(find /var/spool/vmail/host1/user/cur/ -mtime +30); do
> rm $i
> done
>
Hi!
If you want to purge emails that have been marked as deleted in
Maildirs, use something like this:
find /var/spool/vmail/host1/user -name '*:2,*T*' -mtime +7 -exec rm -fv {} \;
This deletes all emails older than 7 days which are marked as deleted
(flag T in Maildir format).
We are using this for quite a while and have seen no problems with
dovecot imapd.
Greetings
--
Robert Sander Senior Manager Information Systems
Epigenomics AG Kleine Praesidentenstr. 1 10178 Berlin, Germany
phone:+49-30-24345-0 fax:+49-30-24345-555
http://www.epigenomics.com robert.sander at epigenomics.com
More information about the dovecot
mailing list