Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Auto Bounce Messages Management Details »»
Auto Bounce Messages Management
Version: 1.0.0.b.1, by Milad Milad is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.7.0 Rating:
Released: 06-07-2008 Last Update: 06-07-2008 Installs: 86
DB Changes Uses Plugins
Additional Files Is in Beta Stage  
No support by the author.

Brought to you by Syrian Medical Society & Milado

Introduction: quoted from wikipedia 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 VERP.
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 bounces@yourdomain.ext
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: <20080608103128.551e45224330@www.yourdomain.ext>
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:
bounce20080608103128.551e45224330@yourdomain.ext
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:
Attachment 81933

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):
Quote:
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. :up:

Show Your Support

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

Comments
  #112  
Old 08-25-2008, 12:28 PM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fatal1980 View Post
You dont send a "HELLO" email message. You just connect to the SMTP server for the domain name and send some regular SMTP commands to verify if the email exists.

Ill show you how it can be done manually.

Find the MX record

[comm@taco:/home/comm]> dig hotmail.com mx

;; ANSWER SECTION:
hotmail.com. 3600 IN MX 5 mx4.hotmail.com.
hotmail.com. 3600 IN MX 5 mx1.hotmail.com.
hotmail.com. 3600 IN MX 5 mx3.hotmail.com.
hotmail.com. 3600 IN MX 5 mx2.hotmail.com.

Connect the the one of the MX records (I've *** out my email address):

[comm@taco:/home/comm]> telnet mx2.hotmail.com 25
Trying 65.54.245.40...
Connected to mx2.hotmail.com.
Escape character is '^]'.
220 bay0-mc10-f11.bay0.hotmail.com Sending unsolicited commercial or bulk e-mail to Microsoft's computer network is prohibited. Other restrictions are found at http://privacy.msn.com/Anti-spam/. Violations will result in use of equipment located in California and other states. Fri, 22 Aug 2008 19:53:02 -0700
HELO test.example.com
250 bay0-mc10-f11.bay0.hotmail.com (3.6.0.91) Hello [64.40.106.55]
MAIL FROM: j***@gmail.com
250 j****@gmail.com....Sender OK
RCPT TO: n*****@hotmail.com
250 n****@hotmail.com
DATA
354 Start mail input; end with <CRLF>.<CRLF>
^]
telnet> Connection closed.

As you can see the mail was accepted after the DATA command. So this was successful.

Now lets see one thats failed on an address that didn't exist.

[comm@taco:/home/comm]> telnet mx2.hotmail.com 25
Trying 65.54.244.168...
Connected to mx2.hotmail.com.
Escape character is '^]'.
220 bay0-mc6-f8.bay0.hotmail.com Sending unsolicited commercial or bulk e-mail to Microsoft's computer network is prohibited. Other restrictions are found at http://privacy.msn.com/Anti-spam/. Violations will result in use of equipment located in California and other states. Fri, 22 Aug 2008 19:56:44 -0700
helo test.example.com
250 bay0-mc6-f8.bay0.hotmail.com (3.6.0.91) Hello [64.40.106.55]
MAIL FROM: ****@gmail.com
250 *****@gmail.com....Sender OK
RCPT TO: badmail1231233123@hotmail.com
550 Requested action not taken: mailbox unavailable
^]
telnet> Connection closed.

As you can see the SMTP session fails! Easy test and you don't need to send a message to the server or process bounce messages. This is the same process used in the following module that works very well:

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

Your wasting your time and resources on use a POP3 account, just use the above method. While your at it you can also re-create the above module for 3.7 since it hasn't been coded over to 3.7 and it would be fairly easy.
Sending a "hello" trial on every single message is more server intensive than retrieving only the bounced messages from a pop mail.
Reply With Quote
  #113  
Old 08-25-2008, 08:10 PM
fatal1980 fatal1980 is offline
 
Join Date: Jul 2006
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milad View Post
Sending a "hello" trial on every single message is more server intensive than retrieving only the bounced messages from a pop mail.
You're running a cron to process the messages from a pop account. Your method, takes more code, and more time to process messages. Your method works, however is inefficient and takes longer.

Instead you could have levels of verification. I'm assuming you're using the mail function to just blindly send the message along. Instead you could use sockets and make a connection to the mail server, try and send the message and if it doesn't go through then you don't need to generate an email. Otherwise you can just send the mail and process the bounce message. Also, you don't really need to use a POP Account. For linux users you could use a .forward file that pipes the mail to a script. Usually shared hosting providers have a mailbox setup on the local machine for each account, or for big boards that run VIPS or have a Dedicated Server.

Quote:
Originally Posted by TooTall52 View Post
This won't work accurately as many email servers out there accept all mail, process it then kick back bounces for the invalid ones. microsoft exchange works this way for example, may Lotus Notes as well.

so just because a helo passes does not mean it is valid address, the seperate pop account is probably more accurate.

TooTall52
Yes, another reason why bounce back spam invades mailboxes. A properly written or configured MTA would do checks at SMTP time. And reject messages that it doesn't relay for, and for non-existent email addresses.

If the MTA accepts the message, and generates a bounce back afterwards. Spammers could use a forged from address, and now your server is spamming. Bad. In any case, if you're making a add-on that is going to change or improve the vBulletin mail portion then you should consider all the factors in making it secure and not server intensive.

You must understand that I'm only discussing this with you as general feedback. I praise anyone that provides modules for free to the vbulletin community and I thank you for your effort.
Reply With Quote
  #114  
Old 09-12-2008, 12:18 AM
dtv100 dtv100 is offline
 
Join Date: Apr 2007
Location: in the south of the north
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it work on my forum but is nto moving members also from time to time when cron run i get a white page on forum home with info how many email are in bounce@mydomain.com
Reply With Quote
  #115  
Old 09-22-2008, 06:19 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod. I have a question...when the users register...is there a way to edit the registration text to let users know if they do not put a valid email address they will not receive the code to activate their account? I have a LOT of kids registering on my site using fake email addresses and am having to manually bounce the users with vbounce. Even if this mod automatically does it I'd like to know how to edit the registration text to let them know.
Reply With Quote
  #116  
Old 09-23-2008, 11:14 PM
testebr testebr is offline
 
Join Date: Jan 2004
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any ETA for next version?
Reply With Quote
  #117  
Old 10-14-2008, 12:12 PM
ryancooper ryancooper is offline
 
Join Date: Jul 2002
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting a message - 3 POP3 server greeting was not found When I test the pop connection. I am using gmail have pop turned on and am using the correct port?

Any ideas what this means?

EDIT - Needed POP Secure Connection set to ON
Reply With Quote
  #118  
Old 10-28-2008, 02:54 PM
dfe dfe is offline
 
Join Date: Oct 2006
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

Great mod! It seems to be working, well partly at least. It's appending the id's, logging in and retrieving the bounces, but at which point does it move the members to a different usergroup? (I have created a new group for that.)

Dirk
Reply With Quote
  #119  
Old 11-09-2008, 05:05 PM
mcyates mcyates is offline
 
Join Date: Jan 2003
Location: Middlesbrough, Cleveland
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dfe View Post
Hi

Great mod! It seems to be working, well partly at least. It's appending the id's, logging in and retrieving the bounces, but at which point does it move the members to a different usergroup? (I have created a new group for that.)

Dirk
Its not moving members for anyone. Seems to be a massive letdown!!!
Reply With Quote
  #120  
Old 12-15-2008, 01:19 PM
DebtFree's Avatar
DebtFree DebtFree is offline
 
Join Date: Dec 2008
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So has this mod died? It would seem a shame if it has because it appears that there are only minor bugs (if you can call not moving the members to the correct group minor :rofl: )
Reply With Quote
  #121  
Old 12-15-2008, 06:03 PM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It didn't die. I just have no time to continue the development. I've already started the beta 2.

If I have two projects, paid and non-paid. I would choose to work on the paid one for sure.

This mod doesn't get the support it needs, as members here refuse to post a back link to my website, and on the other side they ask for product improvements. I'm kind of disappointed by the community response.

So, this mod need to be sponsored by someone, as it's not on top of my priority list.

Regards
Reply With Quote
Reply


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:00 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.05396 seconds
  • Memory Usage 2,344KB
  • 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
  • (4)bbcode_code
  • (1)bbcode_php
  • (5)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