That is strange… I am not sure what is causing it to not delete the messages. Only thing I could suggest is checking the system logs for any possible error messages. I know on CentOS you can check /var/log/ directory not sure if logs are stored in the same location for other distros sorry.
Run it manually or cron it.
This script deletes any files older that 60 days in those folders.
Increase the number of days to what you need.
Delete lines with folders you don’t want emptied.
Thank you inteq, this works fine. Thought about doing it before but I am not very knowledgeable about linux commands. Done it in terminal and will setup a cron for the future.