![]() |
vBouncer : Change thread subscribtion options for members with bouncing emails
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 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. |
Installed, but when I run it in test mode I get the message "Use of uninitialized value in string eq at ./vBouncer.pl line 49" - is that just because its in test mode?
:) |
Quote:
|
Quote:
|
Quote:
It will only list more info only if it found members with bounced emails greater than the limit set in the configuration section. If you have just created the account for "subscriber_notify", you might need to wait until it receives enough bounces from the outgoing emails. You may need to reduce the limit to 1 for testing. |
Quote:
|
You're welcome, glad you found it useful.
|
Now if only we could get this script in php for thoose of us who dont use perl.
|
This is an awesome idea. I may look into this.
|
This will be invaluable to me, especially when I run a forum which doesn't require email verification. :)
|
Quote:
|
Quote:
|
I love the idea of this hack, I am just worried about ticking off people who would loose threir subsriptions. I'm not sure this is even possible, but...
Instead of unsubscribing all the subscribed threads, would their be a way to temporarily move them into a usergroup called something like: Bad email address and have that usergroup recieve no e-mail? (besides account related e-mail, like lost password etc..) But keep the subcription info intact with no e-mail notification? And then have an option for them to update their e-mail address, once it is updated, have the script move their susbcription status back to previous usergroup? I hope that makes sense? Again, maybe this is not possible, but I think this would be a great addition if it was possible :) Thanks |
I know it would be an easy convert. Especialy since I can script in Perl as well. I just dont really have the time right now to do it. Im working on several projects at once right now.
|
Quote:
|
Tamarian,
OK, thanks for the clarification. |
This is awesome and I plan to use it (with around 500 bounces tp me a day), however, i am kinda dumb...
Do I need to run the file on a regular basis? Can I set a cronjob for it? I am terrible at backing up the db, let alone running this... Also, if i have several domains on my server, does that pose a problem? i notice there is no domain on the end of the email address user in the script? Sorry for the q's, thanks for any help. Christian |
I just realized I can't use this because my mail server is remote - the server does send the emails out, but return bounces go to another mail server.
|
Quote:
re: multiple domain: It should not be a problem, but if you have multiple vb forums, the script will only handle one of them, but it's possible to rename it and set it up for each forum. |
Quote:
|
Quote:
|
I do need this hack, as I don't verify email, and lots of emails do bounce back.
|
Quote:
Follow step 1 on the mail server. Follow steps 2, 3, 4 and 5 on the vBulletin server (where the database resides) Then wirte a small shell script to scp or ftp the bounce mail file from the mail server to the database server. In the vBouncer script, enter the location of the file in the $bouncefile line. When the script is run on the database server, it should pick up the bouncing members from the file. If you need any help with any of the steps, feel free to PM me. |
Quote:
i'll install it when i install VB3 Gold. |
if this script can be modify in a way to trace user's registration using invalid email account and immediately deletes away this new registration, that will be even better!
|
Any update for VB3 Gold? The code is different (by the looks) and I get bombarded with email! :)
Thanks! Christian |
wow didn't know this was ported to vb3, is their a php version out?
|
is there any alternative to this? I remember someone made a hack where you can have 2 email address. one for the board in general and the other is for error and so on or bounced emails.
|
Hmm... Does this need to be updated for VB3 gold? The code in /includes/functions.php doesn't seem to match the instructions...
:) |
Updated for vB3 gold, use step 2A. The old step 2 for beta is now step 2B
|
What app are you using to modify functions.php? I use Dreamweaver, Notepad, and wordpad but get parse errors on upload.
Chemo |
Hmm...:
error: Can't locate DBI.pm in @INC I guess I need some soft of perl DBI module or something? Just guessing... ? Thanks- |
Quote:
I think many windows users use TextPad, or PHPEdit. Basically any programming editor, and make sure you upload as ASCII, not binary when using FTP. |
Quote:
|
Many many thanks for this fantastic hack. No more 500MB bounced email boxes! :D Took me awhile to get the perl DBD module installed correctly (with the correct --cflags and -lib options to point to my mysql source install), but it's working like a charm now.
|
Anyone figure out how to port this for Exim?
|
if ($vboptions['needfromemail'])
{ @mail($toemail, $subject, $message, trim($header), "-f $vboptions[webmasteremail]"); } else { @mail($toemail, $subject, $message, trim($header)); } } <-- remove You need to take that extra code i have in bold out or else this script will give out some sort of functions error |
Quote:
First post updated. |
Hi,
i would like to use this script but only for one reason: I got round about 10 registrations per day and 5 of them use invalid email addresses. :disappointed: What i would need is a cron job which runs once a day one specific script which checks this bouncing emailaddress and afterwards deletes all invalid accounts from the usergroup "Awaing Email confirmation". :nervous: Environment: SuSe Linux 8.2, Perl 5.8.0, latest MySQL and latest Apach 1.x version and latest Qmail version mit POP3-before-SMTP installed. Any help would be appreciated. Cheers, |
Quote:
The search can be restricted to only the usergroup awaiting email activation: Change this qury: "SELECT userid, username from user where email='$theemail'" To: "SELECT userid, username from user where email='$theemail' AND usergroupid=3" And the unsubscribe query can be replaced with a user deletion query: Change: UPDATE subscribethread set emailupdate='$downgrade' where userid='$varname1'" To: DELETE from user where userid='$varname1' This is a rough idea of how it can be done.... |
All times are GMT. The time now is 04:49 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|