The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
I was getting sick of going in and deleting 15 to 20 spam users per day in my pending accounts section. Leaving them there really makes helping people who are having trouble registering a chore. I was also getting sick of getting several bounced emails in my mailbox from bogus forum registrations. I already have the bandomains mod installed and that cut back on some, but I was still getting way too many spam registrations. So here it is in all it's glory..
This mod uses a "donationware" asp component that actually takes an email address and validates it at the remote server. If the email is rejected, the registration process is halted. If the mail server MX lookup fails, the email is rejected.
To install, first download and install the ASP component at:
http://www.internext.co.za/stefan/aspmx/
Drop the guy a few clams while you're there...
Next create a file called inc_validate_email.asp and copy and paste the following code into it:
Next go to about line 290 in register.asp.. You're looking for:
Or something very similar to that. Add the following lines after the first "end if".
So your code now looks like this:
That's it... Pretty simple.. A couple caveats... You must have remote desktop access to the server to install the ASP component. If you don't you will have to ask your host to install it. Some may, some may not. Second, if the server that the spammer uses accepts all email as valid to the domain and then later rejects it (because of a gateway or some other device), you will still get spam users from that domain. I tested it with AOL, hotmail, and Gmail to name a few and they all rejected a bad email address. So you should be ok.
I've been running this mod for a couple days now and haven't had any problems. Let me know if you have any questions.
**** spammers!!.. Do they really think pissing people off gets them business?<
This mod uses a "donationware" asp component that actually takes an email address and validates it at the remote server. If the email is rejected, the registration process is halted. If the mail server MX lookup fails, the email is rejected.
To install, first download and install the ASP component at:
http://www.internext.co.za/stefan/aspmx/
Drop the guy a few clams while you're there...
Next create a file called inc_validate_email.asp and copy and paste the following code into it:
Code:
<%
Dim DNSMX
Dim A
Set DNSMX = Server.CreateObject("ASPMX.Resolver")
DNSMX.TimeOutValue = 30
DNSMX.Sender = strSender
A = DNSMX.ValidateEMail(Request.Form("Email"))
If Len(A) = 0 Then
'do nothing email appears to be valid
Else
Err_Msg = Err_Msg & "<li>We were unable to validate your email address! Choose another email address.</li>"
Err_Msg = Err_Msg & A & "<BR>"
'############# Un comment out the below lines to see the full SMTP session for troublshooting.
'A = DNSMX.ViewConversation()
'A = Replace(A,vbcrlf,"<BR>")
'Err_Msg = Err_Msg & "The error might be due to an "
'Err_Msg = Err_Msg & "SMTP error. The last "
'Err_Msg = Err_Msg & "conversation went as follows:"
'Err_Msg = Err_Msg & "<BR>" & A
End If
Set DNSMX = Nothing
%>Next go to about line 290 in register.asp.. You're looking for:
Code:
If strAutoLogon <> 1 then
if Request.Form("Email") = "" then
Err_Msg = Err_Msg & "<li>You Must give an e-mail address</li>"
end if
if Request.Form("Email") <> Request.Form("Email3") then
Err_Msg = Err_Msg & "<li>Your E-mail Addresses didn't match.</li>"
end if
Or something very similar to that. Add the following lines after the first "end if".
Code:
%>
<!--#INCLUDE FILE="inc_validate_email.asp" -->
<%
So your code now looks like this:
Code:
If strAutoLogon <> 1 then
if Request.Form("Email") = "" then
Err_Msg = Err_Msg & "<li>You Must give an e-mail address</li>"
end if
%>
<!--#INCLUDE FILE="inc_validate_email.asp" -->
<%
if Request.Form("Email") <> Request.Form("Email3") then
Err_Msg = Err_Msg & "<li>Your E-mail Addresses didn't match.</li>"
end if
That's it... Pretty simple.. A couple caveats... You must have remote desktop access to the server to install the ASP component. If you don't you will have to ask your host to install it. Some may, some may not. Second, if the server that the spammer uses accepts all email as valid to the domain and then later rejects it (because of a gateway or some other device), you will still get spam users from that domain. I tested it with AOL, hotmail, and Gmail to name a few and they all rejected a bad email address. So you should be ok.
I've been running this mod for a couple days now and haven't had any problems. Let me know if you have any questions.
**** spammers!!.. Do they really think pissing people off gets them business?<