Automatically purge inbox and other IMAP folders

The only automated purge tool DA has is for the Spambox and Trash data.
Admin Level -> Admin Settings -> Automatically Purge Spambox/Trash data

The inbox and other folders (inbox + other) won't be touched by DA as it would be considered live data that User may want.

If you needed to purge that data anyway, you'd likely need to create a script that uses the "find" command, and use the -mtime option, eg:

find /home/*/imap/*/*/Maildir -mtime +30 | grep -E '/cur/|/new/'


but double check the output before using it to ensure the syntax is what you need.

Once satisfied it's generating the files you want, try:

rm -f `find /home/*/imap/*/*/Maildir -mtime +30 | grep -E '/cur/|/new/'`

Just be very careful and double check all of the syntax, else it might delete files you don't want.


Was this article helpful?

mood_bad Dislike 1
mood Like 0
visibility Views: 10004