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

Reply
 
Thread Tools
Check E-mail Address Before Registration Details »»
Check E-mail Address Before Registration
Version: 1.00, by echamberlain echamberlain is offline
Developer Last Online: Mar 2017 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.5 Rating:
Released: 04-10-2007 Last Update: 04-10-2007 Installs: 265
Uses Plugins
 
No support by the author.

This mod checks that the user supplied e-mail address is a real address before allowing registration to continue.

Even though we use Verify Email address in Registration, I still get tired of cleaning up bad e-mail addresses.

This mod integrates with the user registration process and performs the following tasks:
  1. Syntax checking (configurable) to make sure what was entered is an e-mail address.
  2. Looks up the MX records for the e-mail address.
  3. Cycles through the mail servers by connecting to each mail server and tries to verify that the e-mail address is a valid address. The cycling stops as soon as a mail server returns a valid or invalid user.
Installation

Install the attached xml product file. The product is active at installation and most sites should run fine with the default settings.

If you run the default configuration, e-mail addresses will be rejected when:
  • Syntax doesn't look like an e-mail address
  • MX record or A record does not exist for the e-mail domain
  • A mail server reports that the e-mail address is invalid
If you run the default configuration, e-mail address will pass when:
  • Syntax looks like an e-mail address
  • MX record or A record exists for the e-mail domain
  • All mail servers timeout or a mail server reports that the e-mail address is valid.
Configuration

This mod is managed from the vBulletin Options -> User Registration Options page. The following options are added to the page:
  • Validate Registration E-mail Addresses - Enter a regular expression to use when validating e-mail addresses. Leave the field blank to disable validation. The recommendation is to use the default value.
  • Treat E-mail Address As Valid If All Mail Hosts Timeout - If all the mail hosts timeout, should the e-mail address be treated as valid?

    NOTE: Changing this to no will reject valid users when your hosting provider doesn't allow fsockopen calls or when the timeout value is too short. The SMTP RFC's allow for a connection request response wait time of up to minues, since this test is real-time with a waiting user, waiting minutes is impractical. Just because a host timesout doesn't mean the host is not there.
  • Mail Host Timeout Value (Seconds) - Length of time to wait when trying to open a session with a mail host.

    NOTE: Don't set this value too large, if a domain has more than one MX record, the user will have to wait for each connection attempt.
  • Does This Host Support fsockopen? - A PHP fsockopen call is used to try and connect to the remote mail servers. Some systems may not support or block these calls. With the value set to Yes, the connection attempts will timeout. GoDaddy's Shared Hosting is an example of a hosting provider that blocks outbound connection attempts.

    With this value set to no, the system will try to look up the MX records, but will not attempt to connect to each mail server.

Show Your Support

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

Comments
  #12  
Old 04-12-2007, 01:43 AM
echamberlain's Avatar
echamberlain echamberlain is offline
 
Join Date: Aug 2006
Location: San Francisco
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hornstar1337 View Post
Just one question tho what happens if the mail server is temporary down?
If you are running the default configuration, and there are no other mail servers listed in the MX record, the e-mail address will be accepted. If there are other mail servers, they will be tried.

Note that sometimes backup mail servers will accept mail for any user *@domain.com, so this method is not perfect.

But it should catch the fake hotmail, yahoo, and gmail accounts.

I installed this mod in my production environment right before I posted it and my bounced activation mail is already down 80%.
Reply With Quote
  #13  
Old 04-12-2007, 03:30 AM
popowich popowich is offline
 
Join Date: Jun 2004
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack. How about making the "contact us" a link in the error message?

-Raymond
Reply With Quote
  #14  
Old 04-12-2007, 06:30 AM
MaestroX MaestroX is offline
 
Join Date: Aug 2006
Location: UK
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice, thankyou
Reply With Quote
  #15  
Old 04-12-2007, 10:14 AM
Barakat's Avatar
Barakat Barakat is offline
 
Join Date: Nov 2004
Location: Jerusalem
Posts: 571
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks a lot
Reply With Quote
  #16  
Old 04-12-2007, 01:02 PM
msimonds msimonds is offline
 
Join Date: Aug 2003
Location: Dallas, Texas
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this and tried to register with a fake email address from my own domain and it still allowed me to register

I thought that it validated emails to see if they were good before allowing registration?
Reply With Quote
  #17  
Old 04-12-2007, 01:12 PM
msimonds msimonds is offline
 
Join Date: Aug 2003
Location: Dallas, Texas
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also tried again to register with an invalid yahoo account and it is not working
Reply With Quote
  #18  
Old 04-12-2007, 02:53 PM
bitdefuser bitdefuser is offline
 
Join Date: Mar 2007
Location: C:\WINDOWS
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yea, if you enter a valid domain such as yahoo.com, it lets it go. However, if you enter something like 1210@adsasdasd.com , it's invalid.

It's still a nice product though. (I think it lets it go because of the '2' seconds setting in the options. It said that if it timed out, it lets the registration go.)
Reply With Quote
  #19  
Old 04-12-2007, 10:09 PM
echamberlain's Avatar
echamberlain echamberlain is offline
 
Join Date: Aug 2006
Location: San Francisco
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by popowich View Post
Nice hack. How about making the "contact us" a link in the error message?

-Raymond
I was thinking about adding that. I haven't written any mods that pass variables to error phrases, so I would need to do some research.
Reply With Quote
  #20  
Old 04-12-2007, 10:15 PM
echamberlain's Avatar
echamberlain echamberlain is offline
 
Join Date: Aug 2006
Location: San Francisco
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by msimonds View Post
I installed this and tried to register with a fake email address from my own domain and it still allowed me to register

I thought that it validated emails to see if they were good before allowing registration?
Acording to the forum, you don't have it installed.

As I listed in the instructions, whether an e-mail address is rejected or not depends on a lot of factors that are outside of the controll of vBulletin.

Some things to check would be:

1. Does the host running vBulletin support fsockopen?
2. Check if your mail server has an answer delay that exceeds the mod timeout.
3. Check if your mail server is configured to reject mail as soon as an invalid user is specified in the MAIL TO field or if it will still accept the message.
Reply With Quote
  #21  
Old 04-13-2007, 01:07 AM
Phooey Phooey is offline
 
Join Date: May 2004
Location: Wisconsin, USA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome. *clicks install*
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 07:21 PM.


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.15247 seconds
  • Memory Usage 2,310KB
  • 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
  • (3)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
  • (3)pagenav_pagelink
  • (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