|
#1
|
|||
|
|||
|
Hi,
Sorry this isn't the right board, but I'm waiting for access to the customer-only sections. I'm trying to use the cPanel mail filter to pipe e-mails to a program, but I can't find any documentation on how to actually get that input. I'm piping it to a php file and trying to use fread(STDIN) and it's not picking up anything, so IDK what else to try. |
|
#2
|
||||
|
||||
|
You should pipe this way :
Code:
| php -q /home/YourAccountName/public_html/cgi-bin/YourScriptName.php PHP Code:
|
|
#3
|
|||
|
|||
|
Thanks, but I'm still not getting anything.
It looks like the file never gets executed. This is the exact value for the program to pipe to: Code:
| php -q /home/frampton/public_html/cgi-bin/testpipe.php PHP Code:
|
|
#4
|
||||
|
||||
|
Try setting permissions to 755. The php file should have permissions set to 644.
|
|
#5
|
|||
|
|||
|
Quote:
Code:
-rwxr-xr-x 1 frampton frampton 0 Jun 11 14:03 testfile.txt* -rw-r--r-- 1 frampton frampton 421 Jun 11 14:15 testpipe.php |
|
#6
|
||||
|
||||
|
I ran a couple of tests on my dedicated server. I added the code your gave with #!/usr/bin/php added as the first line to a file called test.php and put it in my /home/username/ folder with permissions set to 755. Mail sent to that address was written to the file. I did not have to create the file, the server created it when the message was received. Permissions on that file (testfile.txt) were set to 644 by the system.
I also tried creating a filter based on the Subject line and it worked as well. The only glitch I saw was that in both cases a Mail Delivery Failed message was sent to the email address I sent the message from. |
|
#7
|
|||
|
|||
|
Thanks a lot for trying that. It turned out that my problem had to do with the filter itself (I just got done talking to HG support). The regex option in the filter wasn't working for some reason... I'm not sure what could have been wrong with it because it was very simple:
Code:
/MSG[0-9]+/ Last edited by schweickism; 06-11-2009 at 04:08 PM. Reason: see above |
|
#8
|
||||
|
||||
|
The cPanel Perl regex interpretation is somewhat problematic.
They have been informed of this problem for quite a while... |
|
#9
|
||||
|
||||
|
Quote:
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What FTP program do you use? | Sam | Off-Topic | 47 | 08-18-2008 11:35 AM |
| Question from a newbie about cPanel & Mail | ladyhelipilot | Shared Hosting Support | 1 | 08-08-2008 04:18 AM |
| FTP Program | Yizi | Shared Hosting Support | 12 | 06-01-2008 04:09 PM |
All times are GMT -5. The time now is 12:45 PM.










