[Dovecot] replacement for IMAP_EMPTYTRASH=Trash:7

Rody rody at xs4all.nl
Fri Feb 8 00:58:29 EET 2008


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?

Rody


More information about the dovecot mailing list