The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vBouncer : Change thread subscribtion options for members with bouncing emails Details »» | ||||||||||||||||||||||||||||
vBouncer : Change thread subscribtion options for members with bouncing emails
Developer Last Online: Nov 2023
Update April 5th: Step 2A for vBulletin 3 Gold added.
What vBouncer does vBouncer will reduce your server load, bandwidth, and your forum admin in-box, by unsubscribing members who keep bouncing their emails back to your forum admin email, which may bomb your mail box if you have a busy forum with many members who subscribe to many threads, but their emails are either invalid, inbox full, or have ISP problems. Screen shots None, this is a command line script, with some changes in functions.php Who may want to use this? 1. Very busy sites, with thousands of notifications a day. 2. Your admin box gets too many bouncing emails 3. You use Postfix or Sendmail. I'm not sure how this works on other mail servers, please let me know if this works with QMail, or Exism. Caution This may drive some of your members mad If their email bounces a lot, this script will modify their subscriptions from their favourite threads. They will have to fix their email account, and then modify their subscribtion manually to each thread again... This may not be due to bad emails, just ISP-side problems. Use at your own risk. I'm sharing this since some indicated interest at vBulletin.com in this thread: http://www.vbulletin.com/forum/showt...threadid=71496 I'd be glad to help answer questions, but as with most hacks, it is your responsibility.... Installation 1. Create a unique email address on your server, dedicated to catch bouncing emails. Do not use adminemail, or any other existing email that you want to receive through a POP account. This email will be used only to catch bouncing emails. Recommended name (makes for less editing): subscriber_notify 2. For vB 3.0.3 (older versions below, steps 2a or 2b) I have yet to upgrade to 3.0.3, so this is contributed by ScottA: Quote:
2a. For vB3 gold Edit functions.php Find: PHP Code:
PHP Code:
2b. For older, vB3 beta versions Edit functions.php Find: PHP Code:
PHP Code:
3. Copy vBouncer.pl.txt to a directory on your server above apache level. vBouncer.pl.txt is attached below. Rename it to vBouncer.pl by typing: mv vBounver.pl.txt vBouncer.pl Make it executable by typing: chmod +x vBouncer.pl 4. Edit the configuation section of vBouncer.pl Code:
#! /usr/bin/perl -w # # USAGE: ./vBouncer.pl -bounce : to unsubscribe threads from members with bouncing email # ./vBouncer.pl : with no parameters to see (test) who will be unsubscribed # # Config: my $bouncelimit = 10; # how many bounced emails are allowed, before taking actions my $downgrade = 0; # What subscription level you will assign to bouncing members? # 0 = No email, member will check subscribed thread through usercp # 1 = Instant email, bad choice! # 2 = Daily # 3 = Weekly my $clearmailfile = 1; # delete the mail file for bounced email when done (only deletes when -bounce option is used) my $bouncefile = "/var/spool/mail/subscriber_notify"; # the path/to/bouncing emails file. "subscriber_notify is the email name, you need # to change it to the email name you chose for bouncing emails. my $db="database"; # mysql database name my $db_host="localhost"; # mysql host my $db_username="username"; # mysql username my $db_password="password"; # mysql password # end of config To run the script in test mode, type: ./vBounver.pl To run the script in bouncer mode, type: ./vBounver.pl -bouncer To clear the mail box, use: cat /dev/null > subscriber_notify (or set the option in the script to do it) Changes Feel free to modify and post changes here or as new hacks, no credir or permission required. I may eventually add some features when I have the time. Notes 1. The script assumes that Perl is installed @ /usr/bin/perl If you have Perl installed elsewhere, you just need to update the first line of the script with the cirrect path: #! /usr/bin/perl -w 2. You need to login to your server with a username that has write access to the mail spool, like a root/admin level user. 3. When run in test mode, ignore the warning "Use of uninitialized value in string eq at ./vBouncer.pl line 49" It just means you did not pass a parameter. Show Your Support
|
Comments |
#42
|
||||
|
||||
Ok. Looks not too heavy. But how should i configure your script in terms of the email account ? I have created now an account with your given name and i have defined that all bouncing emails should go there. In your script i have to give the path to his maildirectory. Which is the right one ?
With vpopmail and qmail i have the following structure: /home/vpopmail/domains/domainname/subscriber_notify/Maildir In this directory i have 3 subdirectories: - cur - new - tmp Which directory should i put into your script please ? Cheers, |
#43
|
|||
|
|||
Quote:
I use postfix, and the bounced emails go to /var/spool/mail/boxname |
#44
|
||||
|
||||
I have found the following in a forum:
__________________________________________________ _____________________ Set up a .qmail file for bounces (e.g. .qmail-bounces) and put a pipe to a program inside it, like this: | /usr/bin/process_bounce.pl Now when bounces@yourhostname.com receives an email, the script /usr/bin/process_bounce.pl will receive a copy of this email on standard input, so you can extract the relevant parts of it (e.g. the "To" field) __________________________________________________ ____________________ If i would do this then your script would get the data via standard input and the use of your filedefinition would not be necessary any more. But i guess that your script does not accept any input from standard in yet ? Cheers, |
#45
|
|||
|
|||
I'm not sure how this would work, due to my lack of knowledge with qmail.
Does qmail use spool files? Check what's there in your /var/spool/mail. If not, does qmail allow .forward files? If so, have the .forward create a spool file example of .forward contents ~/home/myuser/mail/bounces With this, you create your own spool file, and use it in the script. (warning: make sure you regularly clean this file, as bounce spools can get very large, very quickly with many forum users) These are just off the top of my head, as I don't know how qmail works, I'm a postfix user. |
#46
|
|||
|
|||
let me be the first to say that this hack dont work.
Hopefully someone can work on an alternative that will work. Not to be rude or anythign but this script dont do nothing. It dont even stop bounce mail. I still get them daily.. the same amount |
#47
|
||||
|
||||
Any comment on this last post from the hack developer ?
Cheers, |
#48
|
|||
|
|||
Quote:
|
#49
|
||||
|
||||
Ok. One more unhappy person because it is not working for him.
Regardless of his problem i can tell you that it did not work for me either but this is due to qmail. I have no idea to set it up to work with qmail and due to this i have to cancel this. I tried to set up a .qmail file in the mailbox dir of the subriber_notify account to run a specific script but this did never start any script after receiving an email. This is clearly a qmail problem and not related to your hack. If i find out someday how i can run a script on an email receive i will try again to pass the info to your script. Until then i have to wait. Cheers, |
#50
|
||||
|
||||
Hi,
now i received help from qmail gurus. Now i set up qmail to run a specific script every time an email is received. The problem i have now is the following: Let's assume a member of our community sends out an email. So for every email one user sends out our database will be queried if an user with this emailadress exists and if this user is in usergroupid 3. Can you image how many queries this will produce just by sending out an email ? This is too heavy. Cheers, |
#51
|
|||
|
|||
Quote:
Their are ways to accomplish what you want, the best of which is using the vB cron scripts, to accomplish this pruning of unconfirmed registrations. But in any case, none of this functionality relates to the vBouncer and what it was designed for (thread unsubscription of members who bounce emails). So my recommendation is to start a new thread in the hack request forum. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|