• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

piping email to php script

P

PontusL

Guest
Hi,

I have read every thread running in this forum about the topic and i am still unable to make it work. Pleask 9.3.0 VPS. I have created a email account (it even have a inbox) in my CP.It is under my domain and the webmail works etc.Then i change the.qmail file under

/var/qmail/mailnames/mydomain/the email account/

remove the default "inbox code" and replace it with

|/var/www/vhosts/my domain/httpdocs/somefolder/test.php

I run some test and saw that there was some chmod problems so made sure the entire path had correct permissions (755). I emailed again and nothing. Nothing happens.I dont get anything back nor does the script run (creating a dummy file with fopen).

Looking at the mail queue the messages seems to stop there
After have sended one:
Messages in queue: 0 not preprocessed, 1 local, 0 remote, 1 total.

looking in the log:
Jun 1 22:52:02 /var/qmail/bin/relaylock[7783]: /var/qmail/bin/relaylock: mail from 209.85.214.175:36060 (mail-iw0-f175.google.com)


Anyone have a clue ?

Thanks!
 
Last edited by a moderator:
I dont know,tried to set back the "redirect to inbox code" and even that has stopped working.All messages now get stuck in the queue,local.
The mail server and mailman seems to having a major break down ?

-I created a new mail account and included both redirect and mail to inbox:

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/qmail/mailnames/domain/mailaccount owned by uid 110 in /var/www/vhosts/myDomain/httpdocs/myScript.php on line 4

Warning: fopen(testFile.txt): failed to open stream

I looked on phpinfo() at the safe mode restrection in php.ini is sett to off but the LOCAL value is still on,tried to change the httpd.include but the local value status ON. I dont have any htaccess files overriding this. The owner of qmail is popuser and the owner of the script is from the ftp upload.

-EDIT It is solved now,it seems to work by setting up permissions correctly.
Thanks
 
Last edited by a moderator:
Back
Top