vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBouncer (PHP): reduce server load by unsubscribing bouncing members from threads (https://vborg.vbsupport.ru/showthread.php?t=91119)

tamarian 07-02-2005 02:01 PM

Quote:

Originally Posted by 7thgenCivic.Com
so what is the status with Exim? I moved servers, but it still doesn't work. I have an 853kb inbox file if you want to look at it. But i don't think that is the issue. permissions is the problem.

If the inbox file is full of bounced emails, yes, I'd like to see it :)

I'll post a new release later today, that should work fro those with Exim and control panels. It allows using POP/IMAP access instead of files, and custom filters.

ImportPassion 07-02-2005 02:53 PM

here u go. have fun :)

tamarian 07-02-2005 06:05 PM

Version 0.9 is out. New features added:

o Collect logs via IMAP/POP or mail spool file
o Custom filters to match patterns in bounced emails

To upgrade, uninstall, then reinstall through the installation script.

tamarian 07-02-2005 08:51 PM

The 0.9 zip file has been updated. There was a typo, caught by Paul M, that will cause an error if you enable usergroup changes. Download the file again to fix it.

psico 07-02-2005 10:03 PM

This is one of the most useful hacks ever!!!!

tnx dude!

ImportPassion 07-03-2005 02:29 AM

I am trying to use POP, when I go to diagnostics, I get this error

Fatal error: Call to undefined function: imap_open() in /home/xxxxx/public_html/forums/admincp/vbouncer.php on line 141

ImportPassion 07-03-2005 02:34 AM

also, it keeps failing on the POP test. are we supposed to type it in exactly like u have it?

{localhost:110/pop3}INBOX

D

tamarian 07-03-2005 02:34 AM

Quote:

Originally Posted by 7thgenCivic.Com
I am trying to use POP, when I go to diagnostics, I get this error

Fatal error: Call to undefined function: imap_open() in /home/xxxxx/public_html/forums/admincp/vbouncer.php on line 141

This means your PHP was built/compiled without IMAP support.

tamarian 07-03-2005 02:36 AM

Quote:

Originally Posted by 7thgenCivic.Com
also, it keeps failing on the POP test. are we supposed to type it in exactly like u have it?

{localhost:110/pop3}INBOX

Yes, if it's local, that should do it. Just make sure your PHP has IMAP support built/compiled in.

ImportPassion 07-03-2005 03:04 AM

recompiling now. see how it goes soon.

ImportPassion 07-03-2005 03:31 AM

ok, got it work. i ran the cron and it said this

Processed 292 emails No bounced emails found.

They are all bounced emails in there.

tamarian 07-03-2005 03:39 AM

Quote:

Originally Posted by 7thgenCivic.Com
ok, got it work. i ran the cron and it said this

Processed 292 emails No bounced emails found.

They are all bounced emails in there.

This would mean either:

1. Those emails don't belong to any of your forum members, or
2. They do not match any of the patterns defined in vbouncer.inc

Check the emails to confirm they are forum notification bounces. If they are, then you will need to define a pattern in vbouncer.inc to capture them. If you're not familiar with ReEx patterns, post samples of those emails here or send me a copy.

ImportPassion 07-03-2005 03:46 AM

they are the exact same ones in the zip i posted above earlier.

tamarian 07-03-2005 04:07 AM

Quote:

Originally Posted by 7thgenCivic.Com
they are the exact same ones in the zip i posted above earlier.

And you have uploaded the vbouncer.inc to includes/cron? Is the stats page empty?

If you want, send me the subscriber_notify POP access info by PM, and I'll test them to see why the patterns don't work on them, or if a new pattern is needed.

ImportPassion 07-03-2005 11:52 AM

yes, it is there and yes the stats is empty.

Sending the info now.

tamarian 07-03-2005 12:20 PM

Quote:

Originally Posted by 7thgenCivic.Com
yes, it is there and yes the stats is empty.

Sending the info now.

Got the info, and found a bug :)

Open vbouncer-collect.php and find:
PHP Code:

CombThrough($Header$Body); 

Replace with:
PHP Code:

CombThrough($eMailHdr$eMailBody); 


ImportPassion 07-03-2005 12:37 PM

working now!

I had to change this

$imgpath = '../' . $stylevars['imgdir_poll'];

to this

$imgpath = $stylevars['imgdir_poll'];

for the images to show up. that cause I have the full path in my images

tamarian 07-04-2005 08:59 PM

- July 4, 2005 v1.0 Added encrypted header for authentication (suggested by Paul M).

To upgrade, uninstall, then re-install, and re-upload all files.

jb605 07-05-2005 02:56 AM

Does this hack support secure pop? Is yes, how should I configure it?

Thanks a lot

tamarian 07-05-2005 03:00 AM

Quote:

Originally Posted by jb605
Does this hack support secure pop? Is yes, how should I configure it?

Yes. Just configure the connection string in the settings menu.

Here's a link with differnt setups:

http://ca.php.net/manual/en/function.imap-open.php

It from the PHP manual, so ignore the code, just look at the example strings like:

{localhost:993/imap/ssl}INBOX
{localhost:995/pop3/ssl/novalidate-cert}

jb605 07-05-2005 03:43 PM

Quote:

Originally Posted by tamarian
Yes, if it's local, that should do it. Just make sure your PHP has IMAP support built/compiled in.

Maybe this is not so relative, but I seem not able to find an instruction on how to compile php with imap, a simple --with-imap (--with-imap=shared) and --with-imap-ssl won't work.

Can anybody share some experience?

Thanks.

tamarian 07-05-2005 04:00 PM

Quote:

Originally Posted by jb605
Maybe this is not so relative, but I seem not able to find an instruction on how to compile php with imap, a simple --with-imap (--with-imap=shared) and --with-imap-ssl won't work.

Can anybody share some experience?

Thanks.

There maybe some dependencies missing. Check the error log from the compilation to what it complains about..

jb605 07-05-2005 06:51 PM

I read the php document, looks like it says it needs something called c-client library. I thought php would have imap and pop support built-in, but seems it is more complicate than that. Also, after I tried the c-client library, looks like it is more of a pop/imap daemon than a client. I have my email service on another cpanel server, so I really just need php to be able to read imap mailbox. I am a little bit confused here.

BTW, if I choose to use email forward and now I can read the file locally, how would I update the stats manually?

Thanks.

tamarian 07-05-2005 08:32 PM

Quote:

Originally Posted by jb605
I read the php document, looks like it says it needs something called c-client library. I thought php would have imap and pop support built-in, but seems it is more complicate than that. Also, after I tried the c-client library, looks like it is more of a pop/imap daemon than a client. I have my email service on another cpanel server, so I really just need php to be able to read imap mailbox. I am a little bit confused here.

I'm not familiar with cPanels, but I thought they can be easily configured to encorporate additional modules easily. Let's see if one of the cPanel users here has any tips for you.

Quote:

BTW, if I choose to use email forward and now I can read the file locally, how would I update the stats manually?.
If the file is on your server, just enter the path in the vBouncer settings.

jb605 07-05-2005 09:57 PM

Quote:

Originally Posted by tamarian
I'm not familiar with cPanels, but I thought they can be easily configured to encorporate additional modules easily. Let's see if one of the cPanel users here has any tips for you.

My cpanel server has imap service running fine. But for my forum to be able to retrieve email via pop, I need to compile php with imap support myself (my web server customized php installation). I have some problems following the instructions on php.net about enabling imap support in php (I assume it means php as imap client to access imap service), because following the instructions, it tells me how to run imap/pop daemon service. I am confused. It is required to run imap/pop daemon service on the same server for php to be able to compile with imap support?

Quote:

Originally Posted by tamarian
If the file is on your server, just enter the path in the vBouncer settings.

I have this setting in place. I set it to not do it automatically, but don't know how to actually start the bounce email collection process manually?

Thanks.

tamarian 07-05-2005 10:05 PM

Quote:

Originally Posted by jb605
My cpanel server has imap service running fine. But for my forum to be able to retrieve email via pop, I need to compile php with imap support myself (my web server customized php installation). I have some problems following the instructions on php.net about enabling imap support in php (I assume it means php as imap client to access imap service), because following the instructions, it tells me how to run imap/pop daemon service. I am confused. It is required to run imap/pop daemon service on the same server for php to be able to compile with imap support?

No, you don't need to run a client. You just need to build PHP with IMAP support. Once you have that, you can POP emails from the other server, if that other server has a POP server.

Quote:

I have this setting in place. I set it to not do it automatically, but don't know how to actually start the bounce email collection process manually?
That's fine. Set it to not do it automatically, but install the vbouncer-collect.php as a cron job to run daily or whatever you prefer. It will collect the stats for you on the intervals you provide. You can test it by using the scheduled task manager, clicking "run now". You can run the collection task manually or automatically, and it will still not touch bouncing members, if the vBouncer is not in auto-mode.

jb605 07-05-2005 10:49 PM

Quote:

Originally Posted by tamarian
No, you don't need to run a client. You just need to build PHP with IMAP support. Once you have that, you can POP emails from the other server, if that other server has a POP server.

My problem is with building php with imap support. The documentation says I need to compile PHP with --with-imap=DIR. What do I specify for the DIR here? And what do I need to install for that DIR option?

Quote:

Originally Posted by tamarian
That's fine. Set it to not do it automatically, but install the vbouncer-collect.php as a cron job to run daily or whatever you prefer. It will collect the stats for you on the intervals you provide. You can test it by using the scheduled task manager, clicking "run now". You can run the collection task manually or automatically, and it will still not touch bouncing members, if the vBouncer is not in auto-mode.

Thanks.

tamarian 07-05-2005 10:59 PM

Quote:

Originally Posted by jb605
My problem is with building php with imap support. The documentation says I need to compile PHP with --with-imap=DIR. What do I specify for the DIR here? And what do I need to install for that DIR option?

You may not need the dir, if the liberary is in the lib path.

I'd just install the c-client first as the docs say, then configure --with-imap and --with-imap-ssl and read the error report, if any. If that doesn't work, check with the host or sys admin.

Paul M 07-05-2005 11:22 PM

Quote:

Originally Posted by tamarian
I'm not familiar with cPanels, but I thought they can be easily configured to encorporate additional modules easily. Let's see if one of the cPanel users here has any tips for you.

On Cpanel it's just a tick box when you build/update apache/php.

jb605 07-05-2005 11:48 PM

Quote:

Originally Posted by tamarian
You may not need the dir, if the liberary is in the lib path.

I'd just install the c-client first as the docs say, then configure --with-imap and --with-imap-ssl and read the error report, if any. If that doesn't work, check with the host or sys admin.

Since my server has imap and pop binary and can be started via xinet.d, I figured that imap and pop is actually installed on my server, but might only as binary, no library?

The documentation on php.net sugguested installing c-client, which might install both the binary and the library, while they should actually suggest the user install it only to get the library, not to install it as a daemon service.

I tried to compile PHP directly with compilation option --with-imap and --with-imap-ssl, but got this error:

configure: error: Cannot find rfc822.h. Please check your IMAP installation.

Looks like it is missing the header file. Not sure if I install c-client will resolve it. I am a little hesitate to install c-client because the installation file tells me it is a daemon service, but my server already has imap and pop daemon service.

tamarian 07-06-2005 12:22 AM

Quote:

Originally Posted by jb605
I tried to compile PHP directly with compilation option --with-imap and --with-imap-ssl, but got this error:

configure: error: Cannot find rfc822.h. Please check your IMAP installation.

Looks like it is missing the header file. Not sure if I install c-client will resolve it. I am a little hesitate to install c-client because the installation file tells me it is a daemon service, but my server already has imap and pop daemon service.

You can install c-client, but you don't have to run it.

jb605 07-06-2005 12:44 AM

Quote:

Originally Posted by tamarian
You can install c-client, but you don't have to run it.

I am trying to install c-client. I have ran the make command (I am on linux)

make slx

But after that, I cannot find a make install command. And the rest part of the README file really deals with installing the binaries as a daemon service, nothing really about library installation.

If I went ahead to compile php with --with-imap=/usr/local/imap-2004e (which is the folder i created following instructions from php.net), then I got the above error:

configure: error: Cannot find rfc822.h. Please check your IMAP installation.

jb605 07-06-2005 12:51 AM

Quote:

Originally Posted by jb605
I am trying to install c-client. I have ran the make command (I am on linux)

make slx

But after that, I cannot find a make install command. And the rest part of the README file really deals with installing the binaries as a daemon service, nothing really about library installation.

If I went ahead to compile php with --with-imap=/usr/local/imap-2004e (which is the folder i created following instructions from php.net), then I got the above error:

configure: error: Cannot find rfc822.h. Please check your IMAP installation.

Just found that the following tips helped me to get rid of this compilation error:

Code:

cp c-client/c-client.a /usr/local/lib/libc-client.a
chmod 644 /usr/local/lib/libc-client.a
cp c-client/c-client.h c-client/rfc822.hc-client/mail.h \
    c-client/linkage.h /usr/local/include/
chmod 644 /usr/local/include/c-client.h /usr/local/include/rfc822.h \
    /usr/local/include/linkage.h /usr/local/include/mail.h

Found at http://dovecot.org/pipermail/dovecot...ly/004281.html

tamarian 07-06-2005 01:03 AM

Good to hear jb605 :up:

jb605 07-08-2005 04:40 PM

I did a mass email, and there are a large amount of bounced emails. I didn't notice that 50 count limit, so vbouncer went ahead and processed 50 unique emails, and deleted all the others. This is really bad because I do need all those bounced emails and need to process them all. Now they are gone, even if I raise the limit, I don't have those bounced emails anymore.

Also, vbouncer seems to delete emails that it cannot identify as returned error etc. It probably should leave those emails there, because I need to modify the vouncer.inc based on the patterns on those bounced emails. I guess it might be better if vbouncer only deletes emails it has read (in imap mode). I am not sure if it is possible with system file based method or pop mode.

tamarian 07-08-2005 05:11 PM

vBouncer must delete the emails after processing, otherwise it will count them as duplicates on the next run. If you get too many bounced emails on every run, just increase the frequency of the collection task, as explained in the first post. If you really need to save copies of your bounced emails, just create a cron job to copy the file for you.

jb605 07-08-2005 11:24 PM

Quote:

Originally Posted by tamarian
vBouncer must delete the emails after processing, otherwise it will count them as duplicates on the next run. If you get too many bounced emails on every run, just increase the frequency of the collection task, as explained in the first post. If you really need to save copies of your bounced emails, just create a cron job to copy the file for you.

Thanks. That's what I am doing. I just created another account, which gets a copy of all the emails coming, so that when I see some patterns that my configuration cannot catch, I can just go back and modify the pattern according to it, then copy the emails from the backup account to re-process it.

Currently, I have a large amount of emails being processed but vbouncer claims no bouncing emails found. I checked the code, and find the following code kind of confusing:

PHP Code:

 if (preg_match('/^Final-Recipient:/m'$Body$matches)){ 

This is checked in function CombThrough($Header, $Body) and again in function Process_Std_Report($Header, $Body). I looked at my emails, none of them has this pattern in it, which explains why I get more than a thousand bounced email in a batch mass email, but vbouncer claims no bouncing emails found. So, I guess I will have to modify this code, right? However, in most of my bounced email, I do see this:

X-Failed-Recipients: adfasdfl@yhaoo.com

Is it safe for me to remove the above search for ^Final-Recipient?

Thanks.

tamarian 07-08-2005 11:52 PM

Quote:

Originally Posted by jb605
I looked at my emails, none of them has this pattern in it, which explains why I get more than a thousand bounced email in a batch mass email, but vbouncer claims no bouncing emails found. So, I guess I will have to modify this code, right?

No, you don't have to modify the code (but it's GPL, so you may, if you want to)

vbouncer.inc allows you to add the proper patterns that match your usual bounced emails without modifying the code.

vbouncer.inc currently holds 4 patterns that match the samples people here sent me so far, but you can add your own patterns to it as new cases.

Not sure if you are using an old version without vbouncer.inc (it was added recently), you might want to click install to get the latest updates.

jb605 07-09-2005 12:54 AM

My fault. I should add that pattern into vbouncer.inc instead of modifying the code. Adding it to vbouncer.inc does the same thing.

Thanks.

Also, maybe you didn't expect, but I have a few thousands of bounced email addresses, and my stats page takes a long time to load. A pagination will probably solve that problem.

Fallback 07-14-2005 05:25 PM

I have this installed but it will not display any bounced emails in the stats screen and the

"Last run with results" portion of the same screen shows "19:00, 31st Dec 1969" as the last run date even though I ran the cron script myself manually in the admincp to test it. Im using the IMAP mode. What could be set wrong?


All times are GMT. The time now is 11:53 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01488 seconds
  • Memory Usage 1,862KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (25)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete