Author Topic: bounce.cgi issues  (Read 4239 times)

listmailmanager

  • Posts: 7
    • View Profile
bounce.cgi issues
« on: February 17, 2005, 12:04:44 pm »
I have configured bounce.cgi and the test says it worked fine. I added some bogus users in the database, and then sent emails to that mailing list. I set listmail to delete users if they get 2 bounces in 1 day. After sending a few emails to the list however, none of the bogus users get deleted nor are they placed in the bounced table. I also set up a bounce account and used procmail to redirect to the script, however that did not work either. If I set listmail to send me email of bounces it does send them. I do not see any entries in the logs that bounce.cgi is in fact being called. If i use an email account with forwarding to the script I am getting traffic in the maillog, but I am still not getting bounces.

The signup works fine btw.

Any help would be greatly appreciated as I'm kind of running out of ideas :)

-Cos

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
bounce.cgi issues
« Reply #1 on: February 17, 2005, 02:28:43 pm »
The script may not work with a mailbox created.  This is common.

What I would suggest that you do first is figure out if you are testing with bona-fide bouncing addresses.  First, send a message using your email client (ie. Outlook) to the test addresses and make sure they return a "mailer-daemon" failure/bounce message.
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

listmailmanager

  • Posts: 7
    • View Profile
bounce.cgi issues
« Reply #2 on: February 17, 2005, 03:09:46 pm »
i did test that and they do return a bounce message. I set listmail to not do anything but email the administrator and i received an email bounicing the bogus address.

-Cos

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
bounce.cgi issues
« Reply #3 on: February 18, 2005, 03:28:21 am »
If you receive a "bounce.cgi: Success" message at your Admin Email when you hit "Test Mail Settings" then it would seem everything is set up properly.  You state that the test is successful.  If this is true you should definitely see something in the logs. bounce.cgi successfully received and relayed the message to ListMail.  Also, your users should be processed correctly.

If the test is failing, what happens when you send an email manually, using Outlook or other email client, to the bounce address with TESTBOUNCE in the subject?  This is the same as hitting "Test Mail Settings", so it should generate a success mesage.  If it doesn't, it might return a bounce giving you more information.

If the test is successful but users are not processed correctly there could be an issue with ListMail.  I would be willing to check it out.

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

listmailmanager

  • Posts: 7
    • View Profile
bounce.cgi issues
« Reply #4 on: February 18, 2005, 07:10:00 am »
Ok. So the Test on the listmail page always returns successful. The problem was that the address wasn't being forwarded properly. Now it is. The other problem is that i get a success email AND a return message. Here's the return message:

  ----- The following addresses had permanent fatal errors -----
|/usr/bin/perl /var/www/cgi-bin/bounce.cgi
    (reason: Service unavailable)
    (expanded from: <bounce@blah.net>)

   ----- Transcript of session follows -----
smrsh: "bounce.cgi" not available for sendmail programs (stat failed)
554 5.0.0 Service unavailable

Initially I didn't pipe it through perl, but I had the same error. If I run the script through perl (perl bounce.cgi) it works (as in doesn't error out). However, if I just want to run it (./bounce.cgi) it does not work (: bad interpreter: No such file or directory).

Here are the first few lines of bounce.cgi:

#!/usr/bin/perl
# ListMail bounce.cgi - Place this in your cgi-bin directory!

# set this! NO trailing slash

Now../usr/bin/perl does exist, so that's not the problem. /usr/bin is in my path, so it should be in smrsh's path also. I wrote a little cgi script and it worked fine (./test.cgi). I get the same problem if I run ./signup-list1.cgi, however, I have no problems with that.

-Cos

listmailmanager

  • Posts: 7
    • View Profile
bounce.cgi issues
« Reply #5 on: February 18, 2005, 07:11:37 am »
Oops...sorry, I pasted you the header with bounce.cgi removed from smrsh.

Here's the message when it bounced:

   ----- The following addresses had permanent fatal errors -----
|/usr/bin/perl /var/www/cgi-bin/bounce.cgi
    (reason: 126)
    (expanded from: <bounce@svr04.learnwell.net>)

   ----- Transcript of session follows -----
/bin/sh: /etc/smrsh/bounce.cgi: /usr/bin/perl
: bad interpreter: No such file or
directory
554 5.3.0 unknown mailer error 126

-Cos

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
bounce.cgi issues
« Reply #6 on: February 18, 2005, 09:46:50 am »
It looks like you know what you're doing.  Try adding a symlink to /usr/bin/perl from /etc/smrsh

cd /etc/smrsh
ln -s /usr/bin/perl

I don't really have any other ideas.  I'm not sure why your server is saying "bad interpreter' when the path and perl exists..  :?
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

listmailmanager

  • Posts: 7
    • View Profile
bounce.cgi issues
« Reply #7 on: February 18, 2005, 09:50:38 am »
That has nothing to do because it won't run from command line either (./bounce.cgi gives the same bad interpreter error), but I did try your suggestion anyways...same result ;)

Any other suggestions?

-Cos

listmailmanager

  • Posts: 7
    • View Profile
bounce.cgi issues
« Reply #8 on: February 18, 2005, 12:29:02 pm »
Well, at least for a temporary basis I found a temporary solution.

bounce will forward to a shell wrapper script that will in turn call the bounce.cgi script.

I shouldn't be doing this, so if any of the developers wants to look into this further, email me at casper@camelot.homelinux.com.

-Cos

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
bounce.cgi issues
« Reply #9 on: February 18, 2005, 02:26:42 pm »
Well I'm glad you found a workaround..

One of the best things you can do with /etc/smrsh is simply symlink to /usr/bin/perl and set up procmail to always call:

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

This method, calling perl before the cgi script, is good because you only need a single symlink and can set up multiple CGIs.

Of course, I'm sure you've tried it this way so this probably doesn't help.

I wish I had more suggestions for you.  :oops:
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

dane

  • Posts: 16
    • View Profile
How does bounce.cgi work
« Reply #10 on: February 18, 2005, 09:42:47 pm »
De,

Can you walk me step by step through how the bounce.cgi and the redirect script to the bounce.cgi works?

What does the bounce.cgi actually doing to catch a bounce mail and process it?

Thanks.

-Dane

 
Quote from: "DW"
Well I'm glad you found a workaround..

One of the best things you can do with /etc/smrsh is simply symlink to /usr/bin/perl and set up procmail to always call:

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

This method, calling perl before the cgi script, is good because you only need a single symlink and can set up multiple CGIs.

Of course, I'm sure you've tried it this way so this probably doesn't help.

I wish I had more suggestions for you.  :oops:

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
bounce.cgi issues
« Reply #11 on: February 18, 2005, 11:30:38 pm »
Dane,

To use bounce.cgi the server mail software must be directed, via an "Email Alias" or "Email Forwarder" to not send email to a mailbox, but to a script instead.  The process can vary greatly across different server configurations / mail software, so it's usually the trickiest part of installation.

Once caught, bounce.cgi processes the email and updates the ListMail database.

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

dane

  • Posts: 16
    • View Profile
Deliverable
« Reply #12 on: February 19, 2005, 03:16:43 pm »
Dean,

I was revewing a marketing system by Mach90 recently and they have the ability to detect and display users that have been emailed BUT were "not delivered".

1.  Generally, is this "not delivered" status the same as a bounced email?  Is there another way to determine that an email has not been delivered except by using a bounce check?

2.  Using listmail:  If, for a given group of emails/email list, one wanted just to see which were deliverable (not bounced), couldn't you just:

a. Set your config bounce number to 1
b. Use the send mail feature for your list
c. Quickl send 2 blank mails in row to the list and wait fo the bounces to be processed
d. go to the user database and select "active" at the bottom of the list to view non-bouncd email addressed

To get a list of "delivered" addresses?

5.  How long do you have to wait to get all the results back from he bounced messages and have the reults updated into the listmail list?

-Dane


 
Quote from: "DW"
Dane,

To use bounce.cgi the server mail software must be directed, via an "Email Alias" or "Email Forwarder" to not send email to a mailbox, but to a script instead.  The process can vary greatly across different server configurations / mail software, so it's usually the trickiest part of installation.

Once caught, bounce.cgi processes the email and updates the ListMail database.

Regards!

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
bounce.cgi issues
« Reply #13 on: February 20, 2005, 10:24:00 pm »
Dane,

Quote
1. Generally, is this "not delivered" status the same as a bounced email? Is there another way to determine that an email has not been delivered except by using a bounce check?

I believe this is similar to ListMail's detection.  On sendmail systems it appears the SMTP server might check if an address exists before sending to it, reporting it via SMTP instead of a bounce. I have yet to work in detection/action on this, but have been thinking about it.

Quote
2. Using listmail: If, for a given group of emails/email list, one wanted just to see which were deliverable (not bounced), couldn't you just:

a. Set your config bounce number to 1
b. Use the send mail feature for your list
c. Quickl send 2 blank mails in row to the list and wait fo the bounces to be processed
d. go to the user database and select "active" at the bottom of the list to view non-bouncd email addressed

Yes, this should give you the results you expect.

Quote
How long do you have to wait to get all the results back from he bounced messages and have the reults updated into the listmail list?

If using bounce.cgi and your server is not under load bounce will be processed as soon as the destination email server sends them.

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

dane

  • Posts: 16
    • View Profile
bounce.cgi issues
« Reply #14 on: February 20, 2005, 10:31:51 pm »
Dean-

Just to verify:

Currently LM has only one setting for number of bounces to receive before removing a user correct?

Are there any plans to have that #bounces confi option attached to a list (insead of global) so the number can be chaged per list?

Thanks.