Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBouncer (PHP): reduce server load by unsubscribing bouncing members from threads Details »»
vBouncer (PHP): reduce server load by unsubscribing bouncing members from threads
Version: 1.2, by tamarian tamarian is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 06-25-2005 Last Update: 08-28-2005 Installs: 19
Code Changes Additional Files  
No support by the author.

There's also a vB 3.5 version: https://vborg.vbsupport.ru/showthrea...threadid=83486

vBouncer is a handy tool for busy forums (or those that do not require email verification) to control the amounts of bogus emails sent from and to your server. This was initially released for vB 2.x and vB 3.0.x as a Perl script, and is now fully integrated with vB as scheduled tasks with admin panel control.

What vBouncer does: vBouncer monitors your mail spool file, and identifies members responsible for large amounts of bounced emails. It then issues a PM warning, and when the unsubscribe threshold is met, it will will unsubscribe them for all threads, and sets them to the "no email" subscription level.

After a couple of runs, this should significantly reduce your server load.

Features:
Manual or auto processing option
Collect logs via IMAP/POP or mail spool file
Uses vB's cron files (Scheduled tasks)
Custom filters to match patterns in bounced emails
Encryption header to authenticate bounces.
Stats on members with bouncing emails, and error codes
Tuning options
Verbose cron logs for diagnostics
Option to send PM warning prior to reaching the limit
Option to send PM notifications after reaching the limit
Option to change the member's subscription default
Option to all thread subscriptions to "no email"
Option to all forum subscriptions to "no email"
Option to move offenders to a different primary usergroup
Option to process 5.0.0/550 errors (email unknown) upon a single email, isntead of observing the bounce limit

Installation:
1. Extract the files into the corresponding directories (admincp => admincp, includes/cron => includes/cron)
2. Run the installation script in the admincp
3. Fill out the settings menu in the vBouncer section of the admin panel (see the how-to post below)
4. Edit includes/mail.php
Find:
PHP Code:
if ($minusf)
        {
            
$this->success = @mail($toemail$subject$messagetrim($headers), "-f $fromemail");
        }
        else
        {
            
$this->success = @mail($toemail$subject$messagetrim($headers));
        } 
Replace with:
PHP Code:
global $vboptions;
                if (
is_valid_email($vboptions['vbouncer_spool_account'])) {
                        if (
$vboptions['vbouncer_header_return_key'])
                                
$headers .= 'X-Return-ID: ' md5($vboptions['vbouncer_header_return_key'] . $toemail) . "\n";
                        
$this->success = @mail($toemail$subject$messagetrim($headers), '-f' $vboptions['vbouncer_spool_account']);
                }
                else
                        
$this->success = @mail($toemail$subject$messagetrim($headers), "-f $fromemail"); 
In admincp/index.php, find:
PHP Code:
                                  if (can_administer('canadmincron')) 
Add before::
PHP Code:
                          if (can_administer('canadmincron'))
    {
        
construct_nav_option('vBouncer Settings''options.php?do=options&dogroup=vBouncer''|');
        
construct_nav_option('Stats''vbouncer.php?do=stats''<br />' );
        
construct_nav_option('Diagnostics''vbouncer.php?do=diag''<br />');
        
construct_nav_group('vBouncer');
    } 
5. Once ready, add the cron scripts to your scheduled tasks: vbouncer-collect.php (should be run daily, or more frequently) and vbouncer-clean.php (weekly, equal to Bounce limit period)

Change log:

- July 11, 2005 v1.2 Bug fix for some server/PHP setups; resolve aliases for return keys, otherwise some aliases would be considered forged.

- July 5, 2005 v1.1 Bug fix in standard report pattern matching

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

- July 3, 2005 v0.9.1 added fixed a bug preventing IMAP/POP log collection.

- July 2, 2005 v0.9 added IMAP/POP option and custom filters file vbouncer.ini

- June 27, 2005 v0.51 for 3.0.7 Corrected installer file.

- June 27, 2005 v0.5 for 3.0.7 Add setting for custom header strings.

- June 26, 2005 v0.2 for 3.0.7 Initial release No changes, just removed the plugin

Screenshots from 3.5 beta, but it looks the same on 3.0.7...

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 06-26-2005, 09:10 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by buro9
The symlink didn't work. I set the permission for both the file and the link as 666. Diagnostics still failed.

I've also tried disabling the open_basedir setting for PHP within httpd.conf but that fails.

How much effort do you reckon for creating a PHP POP3 variant of this hack for those who have trouble reaching the spool file?
I'd consider that option, but first we need to know why the file can't be read. What are the apache error logs showing?
Reply With Quote
  #13  
Old 06-26-2005, 09:46 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tamarian
I'd consider that option, but first we need to know why the file can't be read. What are the apache error logs showing?
Not a thing unfortunately. It's not logged as an error in Apache.

The vBulletin scheduled task log says this for the Collect task though:
Quote:
Status: Mail spool file not found, exiting.
Reply With Quote
  #14  
Old 06-27-2005, 01:02 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

version 0.5 released: Option to use custom header strings to identify bouncers. (Example, some Exim users may need to enter 'X-Failed-Recipients:'.

To upgrade: uninstall, then re-install
Reply With Quote
  #15  
Old 06-27-2005, 02:42 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I posted this in the 3.5 thread, but maybe soemone here can test it:

---

I would like someone using Exim+Cpanel to test the .forward (dot-forward) file method

Here's how it works:

1. Create a file somewhere in your public_html directory /path/to/forum/admincp/subscriber_notify
this file should be readable/writable (666)

2.In your (subscriebr_notify) user home directory, create a .forward file. The .forward file should have one line in it:
/path/to/forum/admincp/subscriber_notify

The theory is that Exim will start forwarding emails to that file.

Not sure what Exim considers "home" directory, so you may need to try creating it in different directories for that user account (subscriber_notify) to test which directory is the right place for .forward

Send an email to subscriber_notify, and check if it was copied to that file. Exim manual states that this should work, so let's keep our fingers crossed.
Reply With Quote
  #16  
Old 06-27-2005, 04:28 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another request for Cpanel+Exim users. I'm writing a POP maodule as an option instead of reading files. I'll need to test my code (from my home server) with your bouncer email box. If you'd like to volunteer please PM me the new account's (subscriber_notify) POP username and password.
Reply With Quote
  #17  
Old 06-27-2005, 04:32 PM
psico psico is offline
 
Join Date: Oct 2001
Location: Buenos Aires, Argentina
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
- June 27, 2005 v0.5 for 3.0.7 Add setting for custom header strings.
I don?t see that option...
Reply With Quote
  #18  
Old 06-27-2005, 04:50 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by psico
I don?t see that option...
My bad. Updated zip 0.51 should have it.
Reply With Quote
  #19  
Old 06-27-2005, 05:12 PM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am moving servers, so I am going to wait. but it will still be cpanel.
Reply With Quote
  #20  
Old 06-27-2005, 06:56 PM
|Jordan|'s Avatar
|Jordan| |Jordan| is offline
 
Join Date: Nov 2004
Posts: 479
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When i run the install file it says:

Fatal error: Call to a member function on a non-object in **********/public_html/forums/admin_cp/vbouncer_install.php on line 20

And line 20 is $vbulletin->input->clean_array_gpc('r', array(

And when i uncomment that line i get an error; Any ideas what's wrong?

And im using 3.0.6 with security fix from 3.0.7
Reply With Quote
  #21  
Old 06-27-2005, 07:20 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MyIS_Jordan
When i run the install file it says:

Fatal error: Call to a member function on a non-object in **********/public_html/forums/admin_cp/vbouncer_install.php on line 20

And line 20 is $vbulletin->input->clean_array_gpc('r', array(

And when i uncomment that line i get an error; Any ideas what's wrong?

And im using 3.0.6 with security fix from 3.0.7
I made the 0.51 update, but forgot to upload the file. Get the new zip, and let me know how it goes.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.15806 seconds
  • Memory Usage 2,337KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete