Procmail + PHP Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I wrote a small PHP script that reads input from php://stdin. And, i'm
using it in .procmailrc (with using pipe) to get e-mail content and parse.
The problem is PHP script does not read "body" part of e-mails.
Reading process stops before the "body" part of e-mail (i can get
all other header parts).

I've tested it with sending e-mail via firefox, pine, outlook. But i got
same result.

Here is the reading part of the script:
...
...
$fp = fopen("php://stdin", "r");
while (!feof($fp))
  $email .= fgets($fp, 8192);
fclose($fp);
...
...

I also tried it with using "fread" function instead of "fgets", got same
result, used "STDIN" constant and "/dev/stdin" instead of "php://stdin",
got same result.

.procmailrc part is:
...
...
| /home/hdogan/test.php
...
...

My server is running with Postfix 2.x and PHP 4.3.0 (CLI).

I think there is a EOF character before starting body part of e-mail
content. But it was running well when i tried months ago on different
server (MTA server was same - postfix).

Do you have any idea or solition for this issue?

Thanks,

                                             Hidayet Dogan
                              hidayet.dogan@xxxxxxxxxxxxxx

Pleksus Bilisim Teknolojileri D.T.O. A.S.
----------------------------------------------------------
caldiran sok. 14/6 06420 kolej ankara * www.pleksus.com.tr
tel : +90 312 4355343 * faks: +90 312 4354006

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux