I have a working php script that actually intercepts the incoming e-mail from sendmail and saves it to a file.
here it is:
<?php
$fd = fopen("php://stdin", "r");
while (!feof($fd)) {
$email .= fread($fd, 1024);
}
fclose($fd);
$fdw = fopen("/test/mail.txt", "w+");
fwrite($fdw, $email);
fclose($fdw);
?>
i have never seen something like this in terms of reading from
php://stdin
is there a PYTHON version of this ?
i rather use python than php.
but this php script works fine.