Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #132  
Old 10-12-2005, 03:09 PM
Dave-ahfb Dave-ahfb is offline
 
Join Date: Mar 2002
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to make this work with the community bulletin hack? Currently bounced emails bounce to the root email address. I changed the settings(temp) to collect from the root mailbox and it only forund 16 out of over 2000 bounced emails.

1- need to make comm-bull bounce to the specified bounce addy
2- need to make it recognize comm-bull bounces

Dave
Reply With Quote
  #133  
Old 10-12-2005, 03:37 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave-ahfb
Is there a way to make this work with the community bulletin hack? Currently bounced emails bounce to the root email address. I changed the settings(temp) to collect from the root mailbox and it only forund 16 out of over 2000 bounced emails.

1- need to make comm-bull bounce to the specified bounce addy
2- need to make it recognize comm-bull bounces

Dave
Just took a look, and I think it can be done this way (you need to test it to make sure, just send to a new group with bogus emails)

Find these two lines:
PHP Code:
mail($user[email],$subject,$HTML_mailbody,$htmlEmailHeader);

mail($user[email],$subject,$mailbody,"From: \"$bbtitle Mailer\"<$webmasteremail>"); 
Replace each respective line with:
PHP Code:
mail($user[email],$subject,$HTML_mailbody,$htmlEmailHeader'-f' $vboptions['vbouncer_spool_account']);

mail($user[email],$subject,$mailbody,"From: \"$bbtitle Mailer\"<$webmasteremail>"'-f' $vboptions['vbouncer_spool_account']); 
Reply With Quote
  #134  
Old 10-12-2005, 05:05 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't you need a space between -f and the email address? Just a minor point.
Reply With Quote
  #135  
Old 10-12-2005, 05:24 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by buro9
Don't you need a space between -f and the email address? Just a minor point.
I don't think so. I've been doing it this way since 2.x with no problems
Reply With Quote
  #136  
Old 10-12-2005, 07:31 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tamarian
I don't think so. I've been doing it this way since 2.x with no problems
That's good I'm never sure but thought as the devil is always in the detail I should ask.

Ho hum...

* wanders off *
Reply With Quote
  #137  
Old 10-16-2005, 09:10 AM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by buro9
That's good I'm never sure but thought as the devil is always in the detail I should ask.

Ho hum...

* wanders off *
Is there a 3.5 version :$?

Quote:
Screenshots from 3.5 beta, but it looks the same on 3.0.7...
Reply With Quote
  #138  
Old 10-16-2005, 04:17 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Eagle Creek
Is there a 3.5 version :$?
Yes: https://vborg.vbsupport.ru/showthrea...threadid=83486
Reply With Quote
  #139  
Old 12-03-2005, 11:53 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed as per the instructions and got
Quote:
Parse error: parse error, unexpected T_CLASS, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/sites/avforums/public_html/forums/includes/mail.php on line 79
Noticed that my existing (working) version of the hack didn't have the
Quote:
if ($vboptions['vbouncer_header_return_key'])
$headers .= 'X-Return-ID: ' . md5($vboptions['vbouncer_header_return_key'] . $toemail) . "\n";
bit in it, so I took it out.
Are you aware that your code is broken? And what do the extra 2 lines do? Are they important?
Reply With Quote
  #140  
Old 12-03-2005, 12:41 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spinball
Noticed that my existing (working) version of the hack didn't have the

bit in it, so I took it out.
Are you aware that your code is broken? And what do the extra 2 lines do? Are they important?
Not broken, but you may have ran the old installation script with the new code, so you have a mismatch and you're missing a couple of settings in the admincp. Download the zip, run uninstall from the new installation script, then re-install.
Reply With Quote
  #141  
Old 12-03-2005, 06:13 PM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uninstalled and reinstalled and still got the same problem.
The error is indicative of a missing '}'.
E.g.
Quote:
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, $message, trim($headers), '-f' . $vboptions['vbouncer_spool_account']);
}
else
$this->success = @mail($toemail, $subject, $message, trim($headers), "-f $fromemail");
should be
Quote:
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, $message, trim($headers), '-f' . $vboptions['vbouncer_spool_account']);
} else {
$this->success = @mail($toemail, $subject, $message, trim($headers), "-f $fromemail");
}
don't see how the code could work otherwise. Very confused.
Reply With Quote
Reply

Thread Tools

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 05:24 AM.


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.05978 seconds
  • Memory Usage 2,345KB
  • 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
  • (6)bbcode_php
  • (11)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
  • (4)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