vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Administrative and Maintenance Tools - Auto Bounce Messages Management (https://vborg.vbsupport.ru/showthread.php?t=181936)

Milad 06-07-2008 10:00 PM

Auto Bounce Messages Management
 
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:

Milad 06-08-2008 08:34 PM

/ * reserved

DanceGavinDance 06-08-2008 08:36 PM

First install, woot :]

Zachery 06-08-2008 08:36 PM

Looks nice, though personally I won't run it as I don't like providing back links to others websites.


READ THIS!

Milad 06-08-2008 08:46 PM

Quote:

Originally Posted by Zachery (Post 1544428)
Looks nice, though personally I won't run it as I don't like providing back links to others websites.

Hi Zachery,

I understand you. Actually, I want something in return for my time and efforts.

Best regards

Milad 06-08-2008 08:49 PM

Quote:

Originally Posted by DanceGavinDance (Post 1544427)
First install, woot :]

That quick? woot :)

shofolofo 06-08-2008 09:31 PM

very nice

thanks milad

Alfa1 06-08-2008 09:47 PM

Many thanks Milad! I am looking forward to future versions.

Please consider to add:
  • different responses to different error codes / Custom filters to match patterns in bounced emails. i.e. permanent error, mailbox full, etc should get a different response. Not many webmasters want their members account inactivated when a mailbox is full.
  • Stats on members with bouncing emails, and error codes
  • Turns on Popup Notification of new Private Messages for bouncing member
  • Automatically send a notification PM to bouncing Member (customizable message)
  • Return members to their original usergroup when the member updates & confirms their new email.

Hornstar 06-08-2008 10:01 PM

I'll have to give this a try, because I have around 200 000 members and many of them will be bouncing.

Alfa1 06-08-2008 10:09 PM

Please let us know how that goes. Are you planning to do a mass emailing?

A very nice forum BTW!

Zachery 06-09-2008 12:33 AM

Quote:

Originally Posted by Milad (Post 1544433)
Hi Zachery,

I understand you. Actually, I want something in return for my time and efforts.

Best regards

Thats nice, but I won't run it or recomend it to anyone because of the back link. Or the copyright text in general, since this is completely a backend feature that a normal user will never see.

Not that i have a problem with copyrights, or authors wanting to benifit from their work.

Dilmah 06-09-2008 01:12 AM

Quote:

Originally Posted by Zachery (Post 1544559)
Thats nice, but I won't run it or recomend it to anyone because of the back link. Or the copyright text in general, since this is completely a backend feature that a normal user will never see.

Not that i have a problem with copyrights, or authors wanting to benifit from their work.

Agreed. Why would I put your copyright on the frontend of my site when it's a backend feature?

Seems like you just want to cash in on big forums linking to you.

Milad 06-09-2008 02:01 AM

Guys, you discourage me!

I'm disappointed that simpler mods have got attention more than this one.

ahayat 06-09-2008 05:51 AM

Quote:

Originally Posted by Milad (Post 1544611)
Guys, you discourage me!

I'm disappointed that simpler mods have got attention more than this one.

mate, he didnt mean to discourage you.
but how many copyrights we gonna put on forumhome ?
i have already three huh.

anyway Best ever hack for 3.7.0 :up:
:D

RedTrinity 06-09-2008 06:25 AM

Quote:

Originally Posted by Zachery (Post 1544559)
Thats nice, but I won't run it or recomend it to anyone because of the back link. Or the copyright text in general, since this is completely a backend feature that a normal user will never see.

Not that i have a problem with copyrights, or authors wanting to benifit from their work.

Sorry but I have to agree as well, having a compulsory copyright is a big turnoff for me to use this feature since it is back-end. I can understand a major front-end feature having one (like VBCredits points system for example, which I agreed to having in my footer) but not something like this. If most/all authors decided to copyright their work like this, then the footers of forums would be extremely unattractive since they would be essentially full of spam links.

SO I have much respect for authors who understand this issue and give users the option to display the copyright or not from the ACP, and chances are I would be more obliged to do so knowing that its not being forced.

Don't mean to discourage either, just hope that you reconsider this decision because it really is a great feature that shouldn't be burdened with something which makes it less attractive to install/use.

Otherwise well done on great work :)

Cheers :)

testebr 06-09-2008 06:39 AM

Quote:

PM is sent to Member notifying them of bounced email & asking them to update email address
Can you add this same resource from the mod EZ Bouced Email Management?

Devices 06-09-2008 07:18 AM

Thanks a lot, This is a great starting point for a great addon. I do think that it needs the features Alfa1 suggested making it more like VBouncer. Also a catch-all address can be hard for a lot of users. I get hundreds, usually 200 - 300 a day of attempted spams to non existant addresses. These will all now not be refused and dump all the spams into the catch-all.

renep 06-09-2008 07:51 AM

Quote:

Originally Posted by Devices (Post 1544782)
I get hundreds, usually 200 - 300 a day of attempted spams to non existant addresses. These will all now not be refused and dump all the spams into the catch-all.

Yes, it's a better idea to use an MTA with VERP support (that sends only bounces with the VERP address pattern to a bounce mailbox), instead of a catch-all address.

That would require this add-on to actually use VERP (mailbox+memberid@ourdomain), rather than a proprietary pattern similar to VERP :(

Devices 06-09-2008 08:51 AM

Quote:

Originally Posted by renep (Post 1544791)
Yes, it's a better idea to use an MTA with VERP support (that sends only bounces with the VERP address pattern to a bounce mailbox), instead of a catch-all address.

That would require this add-on to actually use VERP (mailbox+memberid@ourdomain), rather than a proprietary pattern similar to VERP :(

I agree. My MTA calls it + addressing I think. If the format was changed slightly to mailbox+messageid@domain.com then people could use a compatible MTA or if they do not have one they could use a catch-all. I think the messageid idea is good to verify the bounce is not a fake bounce causing havoc to your members.

Milad 06-09-2008 09:47 AM

Quote:

Originally Posted by Devices (Post 1544782)
Thanks a lot, This is a great starting point for a great addon. I do think that it needs the features Alfa1 suggested making it more like VBouncer. Also a catch-all address can be hard for a lot of users. I get hundreds, usually 200 - 300 a day of attempted spams to non existant addresses. These will all now not be refused and dump all the spams into the catch-all.

For me, I use Gmail. it handles the spam very well. Spam messages go to the spam box, and the bounce messages will be returned to me.

This is very easy and nice.

Milad 06-09-2008 09:50 AM

Quote:

Originally Posted by renep (Post 1544791)
Yes, it's a better idea to use an MTA with VERP support (that sends only bounces with the VERP address pattern to a bounce mailbox), instead of a catch-all address.

That would require this add-on to actually use VERP (mailbox+memberid@ourdomain), rather than a proprietary pattern similar to VERP :(

If you have a better pattern to suggest, go on.

Milad 06-09-2008 09:56 AM

mailbox+memberid@ourdomain won't be a good approach, because it can be abused by members. someone may send a fake email to kick someone else. so we can't use a simple pattern.

mailbox+messageid@domain.com is a good idea. I use bouncemessageid@domain.com not too different. I can alter it to mailboxmessageid@domain.com if you will get benefit from it.

Milad 06-09-2008 09:57 AM

Quote:

Originally Posted by Devices (Post 1544818)
I think the messageid idea is good to verify the bounce is not a fake bounce causing havoc to your members.

Exactly. I'm not leaving this mod for kids to play with it. it got to be secure. for sure.

Devices 06-09-2008 10:01 AM

Quote:

Originally Posted by Milad (Post 1544848)
For me, I use Gmail. it handles the spam very well. Spam messages go to the spam box, and the bounce messages will be returned to me.

This is very easy and nice.

Our own spam filters do a very good job at actually catching the spam. The main one is refusing connections for non existing accounts. Mail that does get through to real addresses will then be tagged if they are spam and passed to the MTA and moved by the MTA to the spam folder. By using a catch-all I increase the load on the MTA that the spam filters are currently releiving it of.

If you add a + sign in between the mailbox name and the message id then I think from what I have read about VERP you will be compatible. Then people can still use catch-all if they have no other choice. I am not an expert in VERP but this is how i understand it.

Devices 06-09-2008 10:07 AM

Quote:

Originally Posted by Milad (Post 1544854)
mailbox+memberid@ourdomain won't be a good approach, because it can be abused by members. someone may send a fake email to kick someone else. so we can't use a simple pattern.

mailbox+messageid@domain.com is a good idea. I use bouncemessageid@domain.com not too different. I can alter it to mailboxmessageid@domain.com if you will get benefit from it.

Yes, Then an account named bounce will catch all email to bounce+(anything)@domain.com but will not catch anything that does not start bounce+. This will definatly help in my situation and as i understand it any VERP compatible MTA.

Milad 06-09-2008 10:22 AM

Quote:

Originally Posted by Devices (Post 1544858)
If you add a + sign in between the mailbox name and the message id then I think from what I have read about VERP you will be compatible. Then people can still use catch-all if they have no other choice. I am not an expert in VERP but this is how i understand it.

Would you please give me a link to what you've read?

Regards

Milad 06-09-2008 10:45 AM

I think it's acceptable to use + or =

Devices 06-09-2008 12:15 PM

Quote:

Originally Posted by Milad (Post 1544897)
Would you please give me a link to what you've read?

Just the info in wikipedia.

Quote:

Originally Posted by Milad (Post 1544897)
I think it's acceptable to use + or =


I can use one of four characters + - _ or %.

On wikipedia the = sign is used as an example to replace the @ if you are adding the users full email address in the return address.

Jase2 06-09-2008 12:27 PM

Looks good, but as others have said, the copyright on FORUMHOME is completely unnecessary. So, for that reason, I'm not installing.

woostar 06-09-2008 12:53 PM

Quote:

Originally Posted by Jase2 (Post 1544942)
Looks good, but as others have said, the copyright on FORUMHOME is completely unnecessary. So, for that reason, I'm not installing.

Same here.

Quote:

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.
If we help each other can we request homepage links too :p

Milad 06-09-2008 01:56 PM

The copyright is my only method to get back what I spend of time and efforts.
I'm sorry, this is not commercial product, but it requires a lot of work. you wouldn't do it for free.

You're free not to use it.

Best regards

Milad 06-09-2008 01:57 PM

I'm thinking about making it as a pattern. every webmaster will change it according to his/her needs.

Zachery 06-09-2008 02:44 PM

Quote:

Originally Posted by Milad (Post 1545009)
The copyright is my only method to get back what I spend of time and efforts.
I'm sorry, this is not commercial product, but it requires a lot of work. you wouldn't do it for free.

You're free not to use it.

Best regards

Alot of us spend time working on things, we do it because we feel our own sites need it, or we wanted to help out.

If you coded this purely for wanting to attract attention to your website... I really don't have anything more to say then.

PoetJA-1975 06-09-2008 07:59 PM

Not only that - but the vast majority of sites that will be using the Auto Bounce Messages Management hack are English-only sites, which would totally defeat the purpose of showing that ridiculous backlink anyway :D

Jacquii.

Jase2 06-09-2008 08:02 PM

Quote:

Originally Posted by Milad (Post 1545009)
The copyright is my only method to get back what I spend of time and efforts.
I'm sorry, this is not commercial product, but it requires a lot of work. you wouldn't do it for free.

You're free not to use it.

Best regards

Everyone who makes hacks here are in the same boat, myself included. Just seems to me that you want to get a lot of backlinks to your site.

Greek76 06-09-2008 10:57 PM

A great mod but just like the rest I will not install because of the copyright. I agree with Zachery you just want the backlinks.

Milad 06-09-2008 11:27 PM

OK, never mind. I'm sorry for that. I'm going to make the copyright optional.

Thus, I appreciate if you post a backlink to my site. when you announce the automation to your members.

Regards

ahayat 06-10-2008 02:03 AM

Quote:

Originally Posted by Milad (Post 1545461)
OK, never mind. I'm sorry for that. I'm going to make the copyright optional.

Thus, I appreciate if you post a backlink to my site. when you announce the automation to your members.

Regards

Great thanks, as i have a non-english community so it wont work for back linking to you :D

Milad 06-10-2008 02:26 AM

Please let's just concentrate on the mod!

dtv100 06-10-2008 02:35 AM

is there any way to know who was move because email bounce ?


All times are GMT. The time now is 05:23 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
  • Page Generation 0.01477 seconds
  • Memory Usage 1,863KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete