Author Topic: BOUNCE.CGI not sending admin email on test  (Read 3298 times)

MagicStrategy

  • Posts: 13
    • View Profile
    • http://KillerSalesLetter.com
BOUNCE.CGI not sending admin email on test
« on: December 10, 2004, 01:41:27 pm »
I'm installing ListMailPro and am unable to get BOUNCE.CGI to work. (The SMTP test message arrives instantly, but no bounce message.)

When I found it wasn't working I added a snippet of code at the beginning to use sendmail to email me a confirmation that the CGI had run... and that email arrives, so I know the alias on the server is engaging bounce.cgi. But nothing else happens.

I used "which wget" on my UNIX server to be sure I had the right path, and I changed the topline bang statement to locate perl on my machine. And, yes, I put the path to the listmail files in bounce.cgi.

I'm not certain that bounce.php gets started.

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
BOUNCE.CGI not sending admin email on test
« Reply #1 on: December 10, 2004, 09:32:30 pm »
The bounce success message uses the PHP mail() function.  Does this function work on your server?  To test, toggle the sending method from SMTP to internal mail() and send a test message to a test list.

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

MagicStrategy

  • Posts: 13
    • View Profile
    • http://KillerSalesLetter.com
Local mail() works
« Reply #2 on: December 11, 2004, 08:37:02 am »
I changed from SMTP to local mail and the mailing worked. So PHP mail is apparently okay. How can I test bounce.php to make sure it's running?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
BOUNCE.CGI not sending admin email on test
« Reply #3 on: December 12, 2004, 07:29:35 pm »
It's possible that there are permission problems with the mailer (qmail, Exim, Sendmail) reaching the bounce.cgi script.  You may need to make sure all folders leading to the bounce.cgi script are CHMOD 755.  The bounce script must also have these permissions.

Another possible solution is to change your alias to include a call to perl directly, ie:

|/path/to/bounce.cgi

To:

|/usr/bin/perl /path/to/bounce.cgi

On some systems it is necessary to put a "symlink" in the /etc/smrsh folder.  Do you suspect that your system has "smrsh"?
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

MagicStrategy

  • Posts: 13
    • View Profile
    • http://KillerSalesLetter.com
BOUNCE.CGI not sending admin email on test
« Reply #4 on: December 13, 2004, 06:54:45 am »
Keep in mind that I tested bounce.cgi by temporarily adding a short sendmail call at the beginning and it sends me an email. So I know that bounce.cgi is getting called. What I don't know is whether bounce.php is getting called.

By putting that snippet just ahead of the system() call, I know that the $sys_cmd begins with:

/usr/local/bin/wget -O /dev/null http://www.sellbetter.com ...

and I know that TESTBOUNCE is in the text.

So bounce.cgi is getting that far and calling wget

As to smrsh, I haven't heard anything about smrsh on this server, and I don't find any smrsh folders on the server.

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
BOUNCE.CGI not sending admin email on test
« Reply #5 on: December 13, 2004, 09:53:22 am »
Hmm, there shouldn't be a problem with the sys_cmd being able to run.  You could test it by setting the variable to run a command like:

"echo > /root/itworks"

If the file /root/itworks is created then the command should be sent.

Next would be the permissions and existence of the program /usr/local/bin/wget.  Make sure it's CHMOD to 755.
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

MagicStrategy

  • Posts: 13
    • View Profile
    • http://KillerSalesLetter.com
BOUNCE.CGI not sending admin email on test
« Reply #6 on: December 13, 2004, 10:37:41 am »
Dean, now we're getting somewhere!

When I set

  $sys_cmd = "echo > /root/itworks"

the file is NOT created.

When I take the generated $sys_cmd that was emailed to me in the earlier test, and run it from a telnet connection, it runs okay and the confirming email is delivered to my mailbox. This suggests wget is there and doing its job, and so is bounce.php.

So, it appears that system() in bounce.cgi is not doing its job, though I can't imagine why. I'm running Perl 5.6.1. Any ideas?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
BOUNCE.CGI not sending admin email on test
« Reply #7 on: December 13, 2004, 04:50:18 pm »
The last test I recommended should NOT have worked (and it didn't..).  I made a silly mistake.  Noone other than root can write to /root and the mailer is not root.  Try changing the test output file to /tmp/itworks
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

MagicStrategy

  • Posts: 13
    • View Profile
    • http://KillerSalesLetter.com
BOUNCE.CGI not sending admin email on test
« Reply #8 on: December 13, 2004, 08:57:28 pm »
This works. I set $sys_cmd = "cp /usr/local/etc/httpd/htdocs/sellbetter/sb1/cgi-bin/bounce.cgi /usr/local/etc/httpd/htdocs/sellbetter/sb1/cgi-bin/bb.txt" just before the system() call.

system() then copies bounce.cgi to bb.txt.

So maybe system() is working.

And if I run the email $sys_cmd with telnet it doesn't work, unless I do it without the
" > /dev/null 2> /dev/null"
at the end. Without that, I can get wget to call bounce.php and generate the email.

Either way, it won't run from the test button.

Do I need to say I'm frustrated?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
BOUNCE.CGI not sending admin email on test
« Reply #9 on: December 14, 2004, 09:55:28 am »
The dev null parameters are not really necessary, they just suppress output.

Try changing

> /dev/null 2> /dev/null

To

1> /dev/null 2> /dev/null

If that doesn't work I guess you should remove the parameters entirely.  It might be worth looking into whether or not /dev/null exists.  Though, I've never heard of that happening..  :?
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

MagicStrategy

  • Posts: 13
    • View Profile
    • http://KillerSalesLetter.com
BOUNCE.CGI not sending admin email on test
« Reply #10 on: December 17, 2004, 02:34:12 pm »
I tried all that, and still nothing.

No ideas from my hosting company.

I'm going to sleep on this a few days and see what I can do. If you think of anything else, I'm listening.