Dynamically queues all current domains to build a domain list.
Using the domain list checks for all current email accounts.
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.
Current Version: 1.4 Released On 4 March 2014 - New feature: The ability to change the mail path which now defaults to /var instead of /chroot/home. Upgrading: The cli sytnax as changed so please see the readme.
Note: If you are looking for custom PHP development feel free to contact me.
[QUOTE=ChrisZ;25345]Excellent script! Thank you for sharing! I had to modify it, though, since the home folder isn’t chrooted on my new server for some reason.
Chris[/QUOTE]
Awesome! I’m glad you found it useful. It is interesting that your IW isn’t using /chroot. I wonder why the difference?
Since I am a new IW user I am not sure why this is the case as I would have guess they were all the same. I am still learning how IW organizes its environment. So is your environment using the same paths just without the leading /chroot? In otherwords /home/vpopmail?
This would be easy to check for in the script so you wouldn’t have to edit anything.
I think asking the question may not give you a lot of answers sorry, but for a highly professional polished script, if it’s not too much work, I would just do it, as it’s reputation and personal contentment, which cannot be bought.
I could be wrong though, and I understand any feeling if you prefer not too, it would be lovely if all users shared their code.
No worries! It caught me completely off-guard, too, because I had written a number of scripts for some clients that were on a server I just retired (using chroot) and the scripts were “broken” after I migrated them to the current server. As John said, there was probably an option I set on the retired server and forgot to set on the new server.
I have released a new version of this script which now allows for the easy modification of the vpopmail directory. It now defaults to /var instead of /chroot/home however this is easy to alter. I did change the cli syntax so please consult the readme file.
Use Wordpress? Have clients that use Wordpress? Know of people that use Wordpress? You might want to check out this Wordpress thread.
Also if you are looking for custom PHP development feel free to contact me.