[thelist] Running php scripts from an email

Dunstan Orchard dunstan at 1976design.com
Mon Oct 13 09:59:57 CDT 2003


Hi there,

When someone posts a comment to my blog (not that that happens very often) my
php scripts send me an email alerting me of the event.

If the comment is spam I'd like to be able to reply to the email and have my
server run another php script to delete that record from my mysql db.

Is that possible given that I'd have the db row id of the comment in question?

Can anyone get me started in the right direction (or stop me in my tracks if
it's impossible)?

I see this article at evolt:
http://www.evolt.org/article/Incoming_Mail_and_PHP/18/27914/

Is says I need three things:

[1] PHP compiled as a CGI binary, not just as an Apache module;
[2] a local mail system or MTA, (are you using Sendmail, Exim, Qmail or some
other system);
[3] shell access to your server, whether or not you have to be root depends on
your mail system.

My PHP_INFO() says:
PHP GATEWAY_INTERFACE is CGI/1.1
does that cover [1]?

I have sendmail on my system, so that covers [2].

I don't have shell access, does anyone know how I can get around this for [3]?


The server is running Apache, MYSQL, PHP.


Thanks for any advice,

- Dunstan

---------------------------
Dorset, England
http://www.1976design.com/
http://www.1976design.com/blog/


More information about the thelist mailing list