Quantcast
Channel: Forums | InterWorx CP
Viewing all articles
Browse latest Browse all 900

Script: Automatically Cleans Up Trash and Junk/Spam Maildir Directories

$
0
0
Interworx Maildir Clean Up

This PHP script does the following:

1) Dynamically queues all current domains to build a domain list.
2) Using the domain list checks for all current email accounts.
3) Deletes any messages in the Trash or Spam/Junk new and cur directories that are x days old.

The Trash and Junk mail days are separately configured. This way you can say set a shorter delay for Trash messages and longer for Junk. You simply crontab this PHP script and then your server will automatically flush old messages. Far better than relying on a client.

I hope this helps your setup.
Attached Files

Viewing all articles
Browse latest Browse all 900

Trending Articles