Op vrijdag 8 februari 2008 03:26, schreef Mark Nienberg: > Rody wrote: > > While running dovecot on debian etch using version 1.0.rc15-2etch3, i > > wonder the following: > > > > If i read the config files correctly, dovecot seems to have no equivalent > > of courier's IMAP_EMPTYTRASH=Trash:7 setting. > > Therefore, i wrote a script that dives into the user's directories and > > their maildirs. It looks like this: > > ============================================= > > #!/bin/bash > > > > for pad1 in $(ls /home) > > do > > if [ -e "/home/$pad1/Maildir/.Prullenbak" ] > > then find "/home/$pad1/Maildir/.Prullenbak/cur" -mtime +2 -type f > > -delete find "/home/$pad1/Maildir/.Prullenbak/new" -mtime +2 -type f > > -delete fi > > if [ -e "/home/$pad1/Maildir/.Allerlei.Spam" ] > > then find "/home/$pad1/Maildir/.Allerlei.Spam/cur" -mtime +2 -type > > f -delete > > find "/home/$pad1/Maildir/.Allerlei.Spam/new" -mtime +2 -type > > f -delete > > fi > > done > > ============================================ > > Now, can i just put a script like this in /etc/hourly or do i have to add > > things like stopping the dovecot deamon (i sure hope not!) in order to > > prevent file-corruption? > > > > Or has dovecot in the meantime got a config option that does this just > > like courier does? > > I do something similar with a nightly cron job running a perl script. > There is no locking for Maildir, so you don't have to worry about that. > Some previous discussion on this list suggested that ctime might be > better than mtime. > > Mark
That makes sence. I just realize that the mtime method does not garantee that only mails exist in the mailbox which are not older than 3 days. Rody