Web Hosting Forum | Lunarpages
News: November 3, 2008 - Enter Your URL in to WIN the November Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 18, 2008, 11:15:28 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Piping email forwarder to php script  (Read 183 times)
Caloute
Newbie
*
Offline Offline

Posts: 3


« on: June 07, 2008, 06:38:10 PM »

Hello to all the wonderfull helpers out there,

I have a little problem that I have try to fix twice over the last few months but with no success.

I have installed a php script on my host called Mail Machine Pro which is a very cool mailing list manager.
Everything works fine...but except one thing that does despite any config I tried.

The script has a bounce detecting feature, that according to your settings will then erase any email address that bounce from your mailing list.
You can set the bounce count to any number
eg: 2 or 5 etc...so if you send 2 newsletters and an email address, bounce the second time..bang it is erased from the mailing list, or if you have set this to 5, if after the 5th newsletter you send and an email address as bounced 5 times...bang it erase it fro the newsletter, well you get the drill, you choose the amount of time it bounces, and after that amount of time has been reached it would erase the non working email address from you list.

Now for this feature to work, you have to pipe from a email fowarder to the script page which in this case is called :
bounce_detect.php

So I did everything the manual says to do, even chmod the bounce_detect.php to 755 after I readed a quiet a few forum, but with no success, the bounce_detect.php  is not triggered and emails that are not working are coming back...at the beginning months and months ago...I did not mind, but now since my list is not cleanned and the list of non working email has grown within the mailing list, whenever I send a newsletter, the amount of returned undelivered is a nightmare, and also keeps on coming back to me a for a few days after I sent a newsletter.

I opened a ticket a while ago at lunarpages, and the person who responded really went way over technical for me, he said something like:
************************************************** ************************************************** **************
Hello,

At Lunarpages, our servers are setup to use suPHP to parse php pages as CGI instead of an Apache module.

Because php.ini values are not shared across directories, you would need a separate php.ini file in each folder that has .htaccess or that requires the php_values or php_flags. In order to avoid doing this, you can place a line in the .htaccess file in your public_html folder to have all values in your public_html php.ini to be shared across all folder. This line would be the following:

suPHP_ConfigPath /home/username/public_html

Please let us know if you have any questions or require further assistance.
************************************************** ************************************************** *****************

I did the mod for the htaccess and it did not work a bit, and I have the feeling it was completely unrelated to my query.

Now here are the few options I tried to put in the email forwarder which my catchall email address I have created link to:

| /usr/bin/php -q /home/myusername/public_html/mailpro/bounce_detect.php
|php -q /home/myusername/public_html/mailpro/bounce_detect.php
|/usr/bin/php -q /home/myusername/public_html/mailpro/bounce_detect.php
| /home/myusername/public_html/mailpro/bounce_detect.php
|/usr/bin/php -q /home/public_html/mailpro/bounce_detect.php

Obviously I don't use "myusername", it is replaced with my real username, just kept it out now for privacy purpose.

Also the script is not on the root, it is in a folder called mailpro.

I tried to separate with space between | and the rest of the line but no change. Any other line I should try???

Everytime I sent an email to my catchall to test, it came back with undelivered message, including the pipe code I tried.
I think I alsmost try any combination possible...no success.
I also created a test mailing list with a fake email address, and each time I tried to send a newsletter, the bounce feature is not triggered even though it sending it to a non existing email.

Is there anything else I should try???
Also I have been seeing people use a php line such as /user/bin etc...can't remember the exact line they seem to put on a page, I'd like to try this, but I have no clue where to put it...should I put it on the bounce_detect.php page???

Thanks for your help in advance...I am so frustrated...
Cal

Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3473



« Reply #1 on: June 08, 2008, 09:16:14 AM »

Does this thread provide any help?
Logged

Caloute
Newbie
*
Offline Offline

Posts: 3


« Reply #2 on: June 08, 2008, 09:55:24 AM »

Hi thanks for the reply,

The final message of the thread says to use this line:

|/usr/bin/php -q /home/USERNAME/FILENAME.php

which would be similar to this one:

|/usr/bin/php -q /home/myusername/public_html/mailpro/bounce_detect.php

Except for public_html, so if I remove this it would be:

|/usr/bin/php -q /home/myusername/mailpro/bounce_detect.php

I'll give it a try with no great hope though.

The final message says as well 755 which I did, and says this is not necessary #!/usr/bin/php -q

Actually I would not mind giving the "#!/usr/bin/php -q line a go.
Do I just have to put this on top of the bounce_detect.php or is there anything else I need to put?

Will try and report back...
Thanks
Cal

Logged
Caloute
Newbie
*
Offline Offline

Posts: 3


« Reply #3 on: June 08, 2008, 10:16:29 AM »

Does not work with either line
|/usr/bin/php -q /home/myusername/public_html/mailpro/bounce_detect.php
|/usr/bin/php -q /home/myusername/mailpro/bounce_detect.php
 even adding the line:
 #!/usr/bin/php -q
on top of the bounce_detect.php
both line don't work

Keep returning emails
Cal

Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3473



« Reply #4 on: June 08, 2008, 11:50:12 AM »

Just to clarify some things...

Where exactly  is your bounce_detect.php file? There's no point in trying "with and without public_html/" if you know where it is!

If you use /usr/bin/php -q (have you also tried just php -q?) in the piped command, you are explicitly telling the system to run a PHP command, and there should be no need to put #!/usr/bin/php -q within  the file. The "pound-bang" (#!) line and 755 permission would be needed only  if you simply give the file path and name, leaving the system to try to figure out what processor to feed the script to (| /home/...).

I would try just |php -q /home/..., in case you're on PHP 5 or for some other reason you've got the wrong path to PHP.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM