Author Topic: Getting bounce.cgi to Work  (Read 2112 times)

steve

  • Posts: 78
    • View Profile
Getting bounce.cgi to Work
« on: October 14, 2005, 07:19:27 pm »
Dean and all,

I've been holding off on fixing this for a bit, and now I'm determined to get it to work. I'll provide all the information here and we'll see if we can get through it.

Host is ApolloHosting (damn good) and the control panel is hsp Control Panel.

Issue I'm having is that bounces are not getting removed from the active list. All other features (mailing, adding, editing) work fine.

My lists are just getting dirty with bad e-mail addresses so it's time to clean house.

Location of Files

My file structure has wget in...
bin/wget     - bin is a top level folder with boot, dev, etc, home ...
[edit: I just noticed that wget seems to also reside in usr/bin/]

I have placed bounce.cgi within...
home/username/website.com/cgi-bin/bounce.cgi

The actual HTML code for the site is located in...
home/username/website.com/html/

I have placed .procmailrc in...
home/username/website.com/

This was the suggested location in the instructions.

I have set up the cron to run dailymail, but I'm thinking that I do not need this feature. I just send mails manually, take registrations automatically through the Web site (not through e-mail address). Not even sure if the cron is working. I'm pretty certain that it is not since I'm not getting notifications that it is, OR that it is failing (strange).

bounce.cgi
Is written as follows:
$http_program = "/usr/bin/wget -O /dev/null " . $listmail_url . "/bounce.php";

Notice that this is the standard configuration. I've tried dropping the /usr part (reference structure above for wget) and I think I tried dropping /usr/ as well.

The /usr/ part confuses me since right from the IP level, I can see all of my folders via FTP - I guess you could say that I do have root access via ftp and my control panel interface.

Now that I look at it, I have a bin/ folder right at the top level (includes wget within) AND I have a usr/bin/ folder that includes wget.  Oh well, I think I've tried to target them both.

I have also tried referencing curl as I have seen in some posts.

.procmail
Is written as follows:

:0
* ^TO_bounce@domain.com
"|/home/username/domain.com/cgi-bin/bounce.cgi"

:0
* ^TO_signup12@domain.com
"|/home/username/domain.com/cgi-bin/signup-list1.cgi"

I have also tried what was in the instructions:
:0
* ^TO_bounce@yoursite.com
| /home/username/domain.com/cgi-bin/bounce.cgi

:0
* ^TO_signup@yoursite.com
| /home/username/domain.com/cgi-bin/signup-list1.cgi

Note that one version has quotes, the other does not. Also location of pipe.

Note
I had some issues with uploading this file before, I uploaded procmailrc.txt using ASCII and then renamed the file so it should be good. In the past I had an issue with spacing/characters/hard&soft returns with this file that caused issues. Somehow Dean fixed them but that was way back when I was on a shared server - now I'm on VPS.

I'm certain that the issue must be with the way I am setting up the "call" or relative/absolute reference to the filenames bounce.cgi and wget.

I'm getting the following when testing the mail servers...

Quote

Testing mail servers..

[Bounce Handling]
Is enabled?  Yes, Using bounce.cgi
Sending TESTBOUNCE email to bounce address.. Failed. Try manually sending an email to your bounce address with TESTBOUNCE in the subject line.

If you receive an email at your "Administrator Email Address" bounce.cgi is configured correctly.

[SMTP Server]
Is enabled?  Yes
Connecting to SMTP server.. Connected!
Sending test email to remote address.. Success!

If you receive an email at your "Remote Test Address" the SMTP server is configured correctly.


I'm getting e-mail to the remote test address, but nothing to the administrator e-mail address.

Any ideas?

Steve

steve

  • Posts: 78
    • View Profile
Getting bounce.cgi to Work
« Reply #1 on: October 14, 2005, 07:55:43 pm »
Dean and all,

Here is a reply that I got from ApolloHosting.

Quote

There are a few options to setting this up. The VPS system doesn't use procmail as an MDA, it goes through sendmail directly. However, you can alter the mailertable to setup procmail, but if you do this you will have to setup all the mail addresses manually. You may also have to empty the virtuserstable (and rebuild virtuserstable.db)

Alternatively, if the mailbox is setup on a system account, you can create a .forward file to invoke the script, or even to invoke procmail and have that invoke the script. There's also the possibility of entering this directly into the (or /etc/aliases file) virtuserstable, however that would be overwritten by the control panel software when used to manage mailboxes.

I think the best option is the .forward with a system user. It is the only configuration that would not conflict with the control panel.


Comments? Suggestions?

Steve

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Getting bounce.cgi to Work
« Reply #2 on: October 15, 2005, 02:46:33 am »
What you need to do seems similar to DreamHost:

http://listmailpro.com/help/cgi_dreamhost.html

You need a system user with SSH shell access and a bounce address set up to forward email to the system user.

You'll have to ask your host how exactly to accomplish this on your server.

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

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

steve

  • Posts: 78
    • View Profile
Getting bounce.cgi to Work
« Reply #3 on: October 15, 2005, 06:55:10 am »
Dean,

This might be a bit more than I asked for.

I realize that you suggest using bounce.cgi, but since my mailists include less than 1,500 users, do you think using an e-mail account processed by dailymail would be a reasonable option?

Steve

steve

  • Posts: 78
    • View Profile
Getting bounce.cgi to Work
« Reply #4 on: October 15, 2005, 07:44:31 am »
Having issues setting up the cron tab for dailymail now... I've put the text from my ticket request to ApolloHosting here for future reference. If you have any suggestions, let me know. I'll post the reply if they are able to help.

Quote
Hi,
I'm trying to install a cron job on the server using the VPS control panel.

The suggested syntax - wtihout the timing is ...

/usr/bin/wget -O /dev/null -T 0 /home/steve/domain.com/html/listmail/dailymail.php?pw=password 1> /dev/null 2> /dev/null

I want to run the script daily, but just to check the script I set it up to run every other minute and configure the cron to notify me via e-mail when it runs (using the configuration VPS control panel supplied).

Once enabled, I get nothing. No e-mail errors and the PHP script does not activate. I'm quite certain that the PHP script is correct and the password is configured properly.

From my understanding of the cron job syntax, the "-O /dev/null -T 0" parameters and the "1> /dev/null 2> /dev/null" parameters first tell wget not to output the Web page to a file as it would normally do, prevents wget from timing out and prevents unnecessary linux log messages.

With that in mind, I've cleared those parameters and tried...
/usr/bin/wget /home/steve/domain.com/html/listmail/dailymail.php?pw=password

I DO get an e-mail notification when that cron runs every other minute stating:
/home/steve/domain.com/html/listmail/dailymail.php?pw=password: Unsupported scheme.

Also checked the activity of the script and it does not run.

It seems as though this control panel and the configuration we have for VPS accounts seem to be so different then other configurations that my linux/php mentors are routinely having issues setting up scripting for me.

steve

  • Posts: 78
    • View Profile
Getting bounce.cgi to Work
« Reply #5 on: October 15, 2005, 08:03:39 am »
Okay, it looks like I've been able to get the cron job to work properly. I needed to change the syntax to:

Quote
/usr/bin/wget -O /dev/null http://domain.com/listmail/dailymail.php?pw=password 1> /dev/null 2> /dev/null


Let me know if there are any problems with the syntax above. It does not include the "-T 0" parameter and I think that is the only difference other than the absolute reference to teh PHP script.

Dean - just let me know about the list size issue. I get the impression that my lists (less than 1,500) would not have an issue using this bounce configuration.

Steve

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Getting bounce.cgi to Work
« Reply #6 on: October 15, 2005, 05:53:47 pm »
The mailbox method of bounce processing is not recommended if your lists are very large due to the fact that access to your "Inbox" becomes very slow when there are several thousand messages in it - it's a hard drive limitation.  With your very reasonably-sized list, however, it should not be a problem, as you will not receive the upwards of 5000-10000 bounces per day.

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