Back to vBulletin 3.7 Add-ons

Auto Bounce Messages Management
Mod Version: 1.0.0.b.1, by Milad

This modification is in the archives.
vB Version: 3.7.0 Rating: (6 votes - 5.00 average) Installs: 86
Released: 09 Jun 2008 Last Update: 09 Jun 2008 Downloads: 340
Not Supported DB Changes Uses Plugins Additional Files Is in Beta Stage  

Brought to you by http://www.syrianmeds.net/ & http://www.milado.net/

Introduction: quoted from https://en.wikipedia.org/wiki/Variable_envelope_return_path with adaptation.
Any long-lived forums is going to eventually contain addresses that can't be reached. Addresses that were once valid can become unusable because the person receiving the mail there has switched to a different provider (possibly as a result of changing jobs or schools). In another scenario, the address may still exist but be abandoned, with unread mail accumulating until there is not enough room left to accept any more.

The presence of invalid addresses in the forums results in bounce messages being sent to the owner of the forums. If the mailing list is small, the owner can read the bounce messages and manually remove the invalid addresses from the forums. With a larger forums, this is a tedious, unpleasant job, so it is desirable to automate the process.

In short: This hack automates handling of the bounce messages.


Requirements:
  • vBulletin 3.7.1
  • catch-all email address, with POP3 access. (I use Google app (Gmail))

Features:
  • Auto Bounce Messages Management.
  • Uses POP3 protocol to retrieve messages from your catch-all email box.
  • On bounce detection the user will be moved to bounce usergroup (you can set which usergroup).
  • Works according to https://en.wikipedia.org/wiki/Variable_envelope_return_path.
A note:
I believe there is no need to delete the user subscriptions. because once a user got moved to the "Awaiting email confirmation" usergroup, he / she won't be sent any additional emails.

How Does It Work?
You have your catch-all email box, that will be used to receive the bounce messages. Of course we must have a POP3 access to retrieve messages from it.
Let's suppose that your catch-all email address is email
After we set it properly, it will work as described below:
1) By default: On every single message being sent, vBulletin generates a unique Message-ID for it, example:
Code:
Message-ID: <email>
This ID is generated By using the following code in /includes/class_mail.php:
PHP Code:
$msgid '<' gmdate('YmdHis') . '.' substr(md5($message microtime()), 06) . vbrand(100000999999) . '@' $http_host '>'
I take the red portion from the unique Message-ID, and the red portion from the domain name of the catch-all address:
Code:
Message-ID: <20080608103128.551e45224330@www.yourdomain.ext>
Code:
bounces@yourdomain.ext
The result will be:
Code:
bounceemail
Now every single message has its own unique envelope-from address. so if it gets returned as a bounce, I will recognize it easily.
So every message will be recorded in the database. each record consists of : toemail, bounceemail (the one we generated) and the timeline (for sake of pruning.)
2) A cron job runs every ten minutes to retrieve bounce messages from the catch-all email box.
If the message sent to something similar to the bounceemail we generate, it will update the appropriate record in the database to be marked as returned. and delete the message from the POP3 server.
3) Another cron job runs once an hour, reads the bounced emails from the database and moves their owners to an usergroup which is determined by the admin from the settings.
4) Yet another cron job, will run once daily, to prune the records that haven't returned bounces in a settable period of time (30 days by default).

Did I miss something here?
Yeh, right. this is the first beta, I believe the core is almost done. but there may be some functions to add, and few things to tweak.
I'm all opened to your suggestions. So feel free to dream!

Installation & Upgrade:
1) Have your own catch-all email with POP3 access. I don't have the time to write a how-to article for this please do it yourself, you'll be luckily if someone explains it to others.
2) Upload files from the /upload/ folder in the package to their appropriate locations.
3) Install the xml product file: product-bounce_management.xml, of course choose yes to override when upgrading.
4) Refresh your AdminCP. you will see at the navigation side, above the Users tab, a new tab called "Bounces Management"
5) At that tab, go to the settings: Set your POP server settings, your "Bounce Usergroup" and "Exclude Usergroups".
6) At the same tab you will find a link called "Test POP Connection" to test the connection with your POP server.
7) Enjoy! Click install to let me enjoy too!

Settings:

Know issues:
- In rare situations, a vacation reply may returned via the bounce path rather than the webmaster path.


Change log:
  • 1.0.0.b.1 first public release, on June, 8 2008.
Support:
The product marked as not supported, but that doesn't mean you won't see me again here.
So please try to help each other.

License & Credits:
1) I use the pop3_class from Manuel Lemos, Copyright (c) 1999-2005 to retrieve messages from the POP server, so all the credits regarding this go to him.
Here is his license (included in the package too):
Copyright (c) 1999-2005, Manuel Lemos
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Manuel Lemos nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Click install to receive updates.
You like it? nominate it. I'm looking forward to enter the Mod Of The Month competition.
I depend on you.
Also donations will help me to improve the product.

Download

This modification is archived, downloads are still allowed.

File Type: %1$s Auto Bounce Messages Management.zip (13.4 KB, 356 downloads)

Screenshots

Click image for larger version
Name:	20080608_233132.jpg
Views:	1453
Size:	68.8 KB
ID:	81933  


vblts.ru supports vBulletin®, 2022-2024