Issue deleting emails with cron job
Hi... I am using CPanel Pro 1.0 RC1, not sure what Linux version the server is using
I am forwarding emails to a gmail account... since the user needs to send emails using his server account from gmail, I need to have an account created (can't use just the forward).
The problem is that I need to empty the email account periodically... I am trying to implement this with a cron job
I tried different approaches I found in the forum, but none worked. The guys from the hosting provider asked me to put the cron command in a php file in the public_html folder, and then run the cron job using "curl path_to_php_file"... I did, but that didn't work either.
When running the normal way, I was always getting "No such file or directory", even though the hosting guys tell me the path is correct... I am using
/bin/rm /home2/[cpanel_user]/mail/[domain]/[account]/new/*
and
/bin/rm /home2/[cpanel_user]/mail/[domain]/[account]/cur/*
May I be having a permissions problem??
Thanks
-
Hello :) Have you considered setting up a user-level filter that discards the email after delivery/forward if you have no need for the locally stored mail? Thank you. 0
Please sign in to leave a comment.
Comments
1 comment