DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Find Old Emails In Trash

03.29.2009
| 2996 views |
  • submit to reddit
        // oneliner to find all old emails (deleted more than 30 days ago) in Trash or Junk folders for all virtual users of a particular domain in Dovecot.

find /home/vmail/domains/qvox.org/* -regex '.*/\.\(Trash\|Junk\)\(/.*\)?\/\(cur\|new\)/.*' -type f -ctime +30