Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
vBouncer: reduce server load by unsubscribing bouncing members from threads Details »»
vBouncer: 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.5.1 Rating:
Released: 06-20-2005 Last Update: 10-04-2005 Installs: 118
Uses Plugins
Additional Files  
No support by the author.

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.

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:
o Manual or auto processing option
o Collect logs via IMAP/POP or mail spool file
o Custom filters to match patterns in bounced emails
o Uses vB's cron files (Scheduled tasks)
o Uses encrypted header for authentication (suggested by Paul M).
o Stats on members with bouncing emails, and error codes
o Tuning options
o Verbose cron logs for diagnostics
o Option to send PM warning prior to reaching the limit
o Option to send PM notifications after reaching the limit
o Option to change the member's subscription default
o Option to all thread subscriptions to "no email"
o Option to all forum subscriptions to "no email"
o Option to move offenders to a different primary usergroup
o 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 => includes)
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. Import and activate the plugin file through the plugin manager.
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)
6. If you are using vB's SMTP email option, make sure to also enable the "-f" option.

Change log:

- August 12, 2005 v1.3 Update to the cron files to match new changes in vB's cron/tasks. To upgrade, just re-upload the contents of includes/cron.

- 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 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.5 Added custom header setting option, for re-written headers.

- June 26, 2005 v0.4 Found a way to make it work as a plugin, without code edits (thanks to Paul M)

- June 26, 2005 v0.3 No changes, just removed the plugin

- June 25, 2005 v0.2 Added NDR/Reply code errors to stats, and option to act upon 5.0.0/550 (user unknown)

- June 21, 2005: v 0.1 Initial release. Marked beta, but it's working fine on PostFix and SendMail. Need to hear from those who tried on QMail and Exim

Show Your Support

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

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

This post will be used for an updated FAQ and How-To's

How it works
1. vBouncer makes your forum send emails with a modified "Return-Path" header including the vBouncer emaila ddress, so most ISP's will send bounce notices to that email (instead of the webmaster email).
2. When ISP's send the bounced notices, those notice emails are stored in the mail spool of vBouncer. Most will tag those notices with a "Final-Destination" header stating the email address that bounced.
3. The vBouncer cron task (vBouncer-collect.php) checks the spool file and extracts all email adresses that are bouncing, and store them into a database table, if they belong to a forum member. It wil then empty the spool file.
4. If you selected auto processing, the vBouncer cron task (vBouncer-clean.php) reads the table and stats, and executes the options you chose to apply in your vBouncer settings. The database table will pruned from any old data.

Email setup: For vBouncer to work, you need to:
1. Create a new email account on your server, and that email account has to be unique, and only used for this purpose, collecting bounced emails.
2. This account should not be POP'ed or deleted by any user, only vBouncer should delete them.
3. The vBouncer emails should be in a regular spool file (text file). This is standard on SendMail and PostFix. Not sure about Qmail, Exim or Windows, but they should able to do it. (Anyone with experience in those systems, please let me know)
Please check with your server admin how to accomplish this.

Tips:

If you can't make your mail server spool to a single text file, you may want to try the (dot)forward file method:
http://publib16.boulder.ibm.com/pser...es/forward.htm
See post #3 below for further details on mail servers.

IMAP settings
You may need to add "notls" in the IMAP string, if you encounter problems:
Quote:
Originally Posted by TraumTeam
A short help from me for users with the problems of imap/pop access:

I the access does not work and all settings are correct try:
{127.0.0.1:110/pop3/notls}INBOX

There could be a certificate failure with the internal IMAP Access on the server.

Perhaps its interesting for the FAQ ...

Rob
vBouncer Settings The comments on the vBouncer settings page are verbose, but here are the important ones with additional comments.

Post notification sender email
This is the email vBouncer will use to send new reply notification. You need to create a unique email address for this. Bounced emails will be returned to this email address on your site/server domain. This email account should not be downloaded, and must be left waiting, vBouncer will pick it up.
Example: subscriber_notify@mydomain.com

Full path to email spool file
This is the full path to where the mail spool file resides. This is where bounced email notifications are sent back to the post notification email.
Example: /var/spool/mail/subscriber_notify
(Use the diagnostics option to sure the file is readable and writable)

Maximum unique members to process per run

Processing the mail log file will stop when this limit is reached. If your logs repeatedly excede this number, it is better to run the scheduled vBouncer collect task more frequently, instead of making this limit too high, for performance reasons. Example 100

Auto processing mode?
You have the option to either let vBouncer automaticly change subscription levels for members with bouncing emails, or choose no if you prefer to simply decide based on the stats of bouncing emails.
Yes No
(Choose no, if you just want to monitor the stats)

Bounce limit
If you selected auto-processing, how many bounced email notices should be acted upon?. (Only works in auto mode) Example: 50

Bounce limit period
Enter the number of days in which the bounce limit set above will be applied. (Only works in auto mode) Example: 7

The above two options results in setting a limit of X email bouncer per Y days period.

Send Notification PM
PM Sender ID
PM Sender Username
Send PM warning
Warning Limit
Change default subscription level to no email
Change subscribed threads to no emails
Change subscribed forums to no emails
Change usergroup for bouncing members?
Destination usergroup
Protected usergroups
Untouchable usergroups
These options control what actions to do with members who excede the set limits.
Reply With Quote
  #3  
Old 06-21-2005, 03:04 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Note: If you use vBouncer's IMAP/POP method, you do not need to follow the instructions here. This is only for those who prefer to use mail spool files.

Spool files How-To

This post addresses the location and setup of spool files on different mail server software. You will only need it if you can't find your mail spool file, or don't have one.

Sendmail: Sendmail by default spools the emails for each email address into a text file. Usually found in /var/spool/mail/account_name (account_name is the account in the email address, like subscriber_notify, for example)


Postfix: Postfix, like Sendmail, spools the emails for each email address into a text file. Usually found in /var/spool/mail/account_name (account_name is the account in the email address, like subscriber_notify, for example)

QMail: (Thanks to Merk for testing and providing the information) QMail, by default stores emails in Maildir format, new file for each email. In order to spool emails to a single file, you need to do the following steps:

In the home directory of the user account (subscriber_notify), create a file called .qmail the content of that file should be a single line indicating the file path where you want the emails to be stored:

/var/spool/mail/subscriber_notify

Or any path you choose. The file needs to exist, so we can first create it by using the touch command:

touch /var/spool/mail/subscriber_notify

And it needs be readable and writable by PHP, so use the chmod command:

chmod 666 /var/spool/mail/subscriber_notify


Vpopmail+QMail: (Thanks to Merk for testing and providing the information) For vpopmail, a user doesnt have a home directory, and it dosent go into the users virtual mail directory either, it sits just below that in the domain's "root" directory. /home/vpopmail may be different for some users.

/home/vpopmail/domains/domain.com/.qmail-subscriber_notify for subscriber_notify@domain.com (contents as above)

The contents of the .qmail file are still the same described above for QMail. You just need to follow the same steps to create .qmail file and the file to spool the emails too.



Exim+cPanel: (thanks to Paul M for this tip)

Note, before you do this, check this post:

https://vborg.vbsupport.ru/showpost....&postcount=101

It may be best to avoid changing the config of Exim, and just use the IMAP/POP option in vBouncer.


In the exim config file ( /etc/exim.conf ), near the bottom is a section that begins with virtual_userdelivery: - in that section is a line which says mode = 0660 - change this to mode = 0666

In your cpanel account, for address rejects@domain.com

The path needs to be " /home/<cpaccount>/mail/domain.com/rejects/inbox "

The mail, domain.com & rejects folders all need chmod'ing to 755.

The mailbox file can then be set to 666, and it will work.


Windows Mail Servers: Still waiting for testers and information


----------------------------

If your server is running Exim or a Windows mail server, please post here:

https://vborg.vbsupport.ru/showthread.php?t=83407

Once the information is provided (in that thread), and we get you up and running, the instructions for those specific mail servers will be posted here.

Note that it may actually work out of the box even if you don't have SendMail or PostFix. If you have a text file on your server that can store the emails for a specific account, then you're all set. It's just that I have no experience with those systems, so I don't know.
Reply With Quote
  #4  
Old 06-21-2005, 04:00 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This looks quite interesting, I might put this on our test server, we run exim, but I'm not sure how it works ....
Reply With Quote
  #5  
Old 06-21-2005, 05:15 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A new zip has been uploaded, there was a bug in the user group demotion option (hardcoded 1, instead of the chosen destination groupid)

Paul, I look forward to some good news It would be nice to know how to setup Exim, Qmail or Windows, so this would work for all.
Reply With Quote
  #6  
Old 06-21-2005, 05:51 PM
pagekeeper pagekeeper is offline
 
Join Date: Sep 2003
Location: London, UK
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

coool - just what i mod requested for
Reply With Quote
  #7  
Old 06-22-2005, 04:49 AM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will be using this on a live system when a qmail system has been tested.

I am willing to provide a server to test it on, if needs be.
Reply With Quote
  #8  
Old 06-22-2005, 07:47 AM
JamesFrost JamesFrost is offline
 
Join Date: Feb 2003
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by merk
I will be using this on a live system when a qmail system has been tested.

I am willing to provide a server to test it on, if needs be.
Great work.
Reply With Quote
  #9  
Old 06-22-2005, 08:14 AM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good idea.
Reply With Quote
  #10  
Old 06-22-2005, 10:09 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems like this saves on resources like bandwidth and storage, rather than server load...

Also this does not seem too applicable to users who are in a shared hosting enviroment...
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 02:10 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.05116 seconds
  • Memory Usage 2,311KB
  • Queries Executed 23 (?)
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
  • (2)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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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