Re: I need a script for deleting mail from mail boxes...
| From: | Chris Hayes | Date: | Tue, 09 Dec 2003 15:17:06 +0000 |
| Subject: | Re: I need a script for deleting mail from mail boxes... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172268@lists.php.net to get a copy of this message | ||
At 16:08 9-12-03, you wrote:
Hi All, I need to know how to write a script for deleting mail from a Linux server. It's more important to know what sort of mail it is. I suppose POP3 mail, so then look for the POP class of Manuel Lemos, i think on phpclasses.org.
Essentially I need to be able to delete all mail with a date-stamp less than some threshold date. That should be do-able with that class.
Then I want this script to run from a regular cron job. I am not sure if this is doable in PHP or whether I must write a shell script, but either way I need some pointers on how to go about it. There are quite some tutorials on cron jobs with PHP. To run PHP as a cron job you need the cgi version, as far as I know. Ask your favourite search engine.