Author Topic: Need help testing bounce script  (Read 3814 times)

leiderman

  • Posts: 10
    • View Profile
Need help testing bounce script
« on: January 03, 2007, 06:23:59 pm »
My ISP uses standard cpanel.

I set up email forwarding to forward bounce@headachefreedom.com to /public_html/cgi-bin/bounce.cgi/ after I set the path to listmail in bounce.cgi to /public_html/listmail/, which is where listmail is implemented. bounce.cgi has had its permissions set to 755 and it resides in /public_html/cgi-bin/

From Outlook, I sent an email to bounce@headachefreedom.com with TESTBOUNCE in the subject line.

The email I sent was, in fact, sent because it is in my sent items folder.

But what happened is unexpected.

I did not receive anything at the email address I have set to receive bounced emails notifications, which I set in the configuration menu, which is info@headachefreedom.com. Am I right in thinking I should have received something there?

What I did receive in my Outlook junk mail folder was this:

=======
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

  pipe to |/home/headache/public_html/cgi-bin/bounce.cgi
    generated by bounce@headachefreedom.com
    local delivery failed
==========

So my ISP bounced the message back to me, the sender, at my personal email address. It looks to me like the bounce mechanism is not working, but I don't know what to expect, so I can't tell what is happening.

Any help will be greatly appreciated.

Lloyd

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Need help testing bounce script
« Reply #1 on: January 03, 2007, 10:45:14 pm »
Hi Lloyd,
Quote
I set up email forwarding to forward bounce@headachefreedom.com to /public_html/cgi-bin/bounce.cgi/. bounce.cgi has had its permissions set to 755 and it resides in /public_html/cgi-bin/

Aside from the first path to bounce.cgi containing an unnecessary forward slash (I think thats a typo) and also missing the | pipe character beforehand,  this sounds good.
Quote
After I set the path to listmail in bounce.cgi to /public_html/listmail/, which is where listmail is implemented.

This should actually be the full URL to your site (ie http://example.com/mail).  ListMail's bounce.cgi actually forwards the call to a web page for processing due to the fact that a large number of hosts do not allow email redirection to PHP.
Quote
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

pipe to |/home/headache/public_html/cgi-bin/bounce.cgi
generated by bounce@headachefreedom.com
local delivery failed

It looks like your alias is set up correctly but there is another problem.  This may or may not be caused by the incorrect definition of the URL.

The only other problem you might have with the process is based on the availability of the /usr/bin/wget system utility.  This utility is used by bounce and signup CGI scripts.

In bounce.cgi you will see the line:
Code: [Select]
$http_program = "/usr/bin/wget -O /dev/null " . $listmail_url . "/bounce.php";
If the process fails to generate a success message to your "Administrator Email" I would then try a popular alternative, curl:
Code: [Select]
$http_program = "curl -o /dev/null " . $listmail_url . "/bounce.php";
After that, there may be some further alternatives available to try, but if it's not against policy I will usually try to upload my own copy of wget into the home folder.  This can be tricky because you need a copy of wget compiled for the same OS as the server. :)

Please let me know if I can be of further assistance.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

leiderman

  • Posts: 10
    • View Profile
Still doesn't work
« Reply #2 on: January 04, 2007, 03:07:01 pm »
Hi Dean,

I still cannot get my bounce.cgi to send a message to my admin email address info@headachefreedom.com.

Just for info, this is what I have just set my bounce.cgi to be, using curl:

================
# Full URL to ListMail, no trailing slash
$listmail_url = "http://www.headachefreedom.com/listmail";

# Program and paramaters to pass URL to
# Usually works as default (may be /usr/local/bin/wget or other)
# $http_program = "/usr/bin/wget -O /dev/null " . $listmail_url . "/bounce.php";
$http_program = "curl -O /dev/null " . $listmail_url . "/bounce.php";
================

I send a blank email from my personal email leiderman@mcn.net to bounce@headachefreedom.com with subject TESTBOUNCE. The result is that I get in my junk mail a message from my ISP saying it could not forward the email. I have my forwarder set to forward bounce@headachefreedom.com to |public_html/cgi-bin/bounce.cgi

Here is the message my ISP sends, along with a lot of other header stuff:

===========
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

  pipe to |public_html/cgi-bin/bounce.cgi
    generated by bounce@headachefreedom.com
===========

So it looks like nothing is ever even getting to bounce.cgi.

Dean, do you see anything that could be keeping the email from being forwarded?

Here is another tack:

The help file says to set the "Forward to" textbox:

=========
|/home/username/public_html/cgi-bin/bounce.cgi
=========

But I do not have any directory called literally "home". And I do not have one that I can see in my FTP program called "headache," which is my cpanel username. That is why I set my forwarder to "|public_html/cgi-bin/bounce.cgi", with no leading forward slash, as you told me to do. I am convinced that there is no place called "|/home/headache/public_html/cgi-bin/bounce.cgi", but maybe you know better. Should I be using that? Why does the help file mention the  "/home/username/" portion of the path it says to use, anyway? Are really supposed to use the literal "home"? Or is it metadata that is supposed to be substituted with something?

Incidentally: I just tried changing the forwarder to the above, and it still does not work. I get the following message from my ISP:

================
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

  pipe to |/home/headache/public_html/cgi-bin/bounce.cgi
    generated by bounce@headachefreedom.com
    local delivery failed
================

I just can't get any forwarder to work.

Thanks,
Lloyd

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Need help testing bounce script
« Reply #3 on: January 04, 2007, 11:12:27 pm »
Hi Lloyd,
Quote
Just for info, this is what I have just set my bounce.cgi to be, using curl:
$http_program = "curl -O /dev/null " . $listmail_url . "/bounce.php";

The -O parameter for curl should be lower-case, ie:
Code: [Select]
$http_program = "curl -o /dev/null " . $listmail_url . "/bounce.php";
Quote
The help file says to set the "Forward to" textbox:
|/home/username/public_html/cgi-bin/bounce.cgi
I am convinced that there is no place called "|/home/headache/public_html/cgi-bin/bounce.cgi", but maybe you know better. Should I be using that?

Yes, actually.  Via FTP /home/username is your "root" folder.  You are generally stuck in that folder and cannot browse up to see the parent folders.
Quote
Incidentally: I just tried changing the forwarder to the above, and it still does not work. I get the following message from my ISP:

Try fixing the capitalization of the -O parameter and let me know if that does not fix it. :)

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

leiderman

  • Posts: 10
    • View Profile
Changed -o to lower case and still does not work
« Reply #4 on: January 05, 2007, 01:10:01 am »
Hi Dean,

As you requested, I changed bounce.cgi to use lowercase -o and my ISP still just sends a message to me, which lands in my junk folder, with:

==========
pipe to |/home/headache/public_html/cgi-bin/bounce.cgi
    generated by bounce@headachefreedom.com
    local delivery failed
==========

As I've been saying, I think the bounce.cgi program is not even involved yet. The server is not able to find bounce.cgi at all.

I STILL don't know if I am supposed to be using the /home/headache/ portion of the redirect target. Or if I am supposed to use just /public_html/cgi-bin/bounce.cgi as the path to bounce.cgi. I am thinking that I should use the latter, since you said in your last post that "/" is the same as "/home/headache/".

Do you have any idea at all how to get my ISP to pipe the incoming bounce email to bounce.cgi?

Thanks,
Lloyd

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Need help testing bounce script
« Reply #5 on: January 05, 2007, 01:25:49 am »
Hi Lloyd,

The path is normally /home/username/public_html/cgi-bin/bounce.cgi

Please click here to submit your info and I will investigate this one for you.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

leiderman

  • Posts: 10
    • View Profile
Submitteda ticket
« Reply #6 on: January 05, 2007, 01:43:06 am »
Thanks Dean,
I submitted a tech support ticket with all my login info for you to see why the bounce forwarding does not work.
Lloyd

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Need help testing bounce script
« Reply #7 on: January 05, 2007, 02:53:01 am »
Lloyd,

I took a look at your installation.  Your host appears to work with the default /usr/bin/wget call.  An alternative should not be required for the CGI scripts or Dailymail cron task.

Unfortunately I can't recall the exact step which fixed the problem (I got a little frustrated after making a simple URL error (ie. /mail over /listmail) I had   tried a bunch of wget alternatives until realizing my mistake and retrying /usr/bin/wget) ... All I know is after recreating bounce.cgi and the forwarder it worked. :)  You can click "Test Mail Settings" on the ListMail "Configuration" page to verify.

Please let me know if you have any more questions!

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

leiderman

  • Posts: 10
    • View Profile
finally!!!
« Reply #8 on: January 05, 2007, 05:34:23 pm »
Hi Dean,

Thanks for whatever you did. Did you change anything?

It works now, but I can't understand why. I send a message to bounce@headachefreedom.com and it returns a success message to my designated admin mailbox. I changed bounce.cgi back to use wget, as you suggested, and everything seems to be okay now. (I was using wget before, when it was not working, but now it is.)

I'm blaming this on Casper the friendly ghost, and moving on to the next step in the installation.

I sure hope the next steps go smoother than this one.

Thanks again,
Lloyd

scotthastings

  • Posts: 3
    • View Profile
Need help testing bounce script
« Reply #9 on: February 05, 2007, 05:05:20 am »
Hi

I'm having the exact same problem as leiderman.

When I click the Test mail settings I'm not getting the email to the administrator email account.

I'm sure i've set up the forwarder correctly with the correct pathname including the pipe character.

I've tried to use the curl command as mentioned and different paths to wget but to no avail.

The host is a cpanel

Any help would be appreciated on this or shall I just raise a support ticket?

Also when i access the signup.php file through the web browser I get about a dozen php errors -

Warning: sort() expects parameter 1 to be array, null given in /home/wizihas4/public_html/listmail/signup.php on line 25

Warning: Variable passed to each() is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 29

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 33

Warning: Variable passed to each() is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 78

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 85

Warning: Variable passed to each() is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 88

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 111

Warning: Variable passed to each() is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 114

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 121

Warning: Variable passed to each() is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 124

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 148

Warning: Variable passed to each() is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 151

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/wizihas4/public_html/listmail/signup.php on line 158
ListMail Custom HTML not found! Please contact your administrator.

scotthastings

  • Posts: 3
    • View Profile
Need help testing bounce script
« Reply #10 on: February 05, 2007, 05:13:45 am »
UPDATE

I've just notice I got my first Dailymail from the cron job.
So i assume that wget is in the correct place otherwise it wouldn't have worked - /usr/bin

but nothing from bounce.cgi

scotthastings

  • Posts: 3
    • View Profile
Need help testing bounce script
« Reply #11 on: February 05, 2007, 03:09:02 pm »
Ignore my ramblings above.
My hosting provider managed to sort the forwarder issue.

Cheers