ASP Programming "Passing the Error Message to the Human!"

Here's my new message: 

Update: 2-4-2015

This post offers a bit of ASP Classic code but is also for those that are hosting their own SmarterMail email on IIS 7.x running their internal CDO SMTP server from the ASP Classic Code. (Say that all in reverse 3 times.)

The issue is with some of these lazy administrators. 
I moved my server and had to be reasigned new IP's. I inherited the old IP's from the Lottery website. What a joke that is, I can tell you any time during the day what groups visited that site and IP block very often looking, poking, hoping.... Anyway, 

Yahoo.com and the dang 554 error, learn to respond with something you can work with or what we are doing may be on your next board member review. Why deal with email services that don't work correctly? Is my Transaction Failed due to something on your end? 

According to the worlds spam sites I'm 0 or 50% depending on who you read. Cisco thinks I'm 0 while Watchguard thinks I'm a 50%. It means I do no harm but I'm not a paid subscriber to anything so they don't rate me over and I don't spam so I'm not below 0 or 50%. 

Now, the issue is clear, the databases show I'm neutral so it's the Administrators settings. If you think neutral is a risk then I can suggest GMail or Hotmail and I do in my code to hundreds of people that see these lazy admin errors. 500 errors are Internal Server Errors please use the proper error coding. 

Last part of this update is Hotmail and Google. Good Job People!

Authentication-Results: hotmail.com; spf=pass (sender IP is 98.175.x.xxx) (That's Me)

smtp.mailfrom=me@xxx.com; dkim=none header.d=xxx.com; x-hmca=pass header.id=me@xxx.com X-SID-PRA: me@xxx.com X-AUTH-Result: PASS X-SID-Result: PASS X-Message-Status: n:n X-Message-Delivery:

Received: from mail.xxx.com ([98.175.x.xxx]) by BAY004-MC6F10.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751);

It's 50% match from my count, I don't use dkim, but nothing else is out of wack... 
Even my TLS works perfect. 

This is just one example of why not all free email services are the same. Listen to your webmasters and others that know. (My Aunt even gets it and she's 70+, she's on my personal domain email server.)

Let's face it, if

gmail-smtp-in.l.google.com

returns the same test results as 

mail.xxx.com 

you would think all is good.

Right?

Resource: http://mxtoolbox.com/SuperTool.aspx?action=mx%3agmail-smtp-in.l.google.com&run=toolpage#

 

Password reset

Already registered? Click Sign In to login your account.

YOUR EMAIL XYZ@XYZ.COM WILL NOT WORK HERE!!!!

Your email server responded with an error that we can not help with. 
PLEASE READ THIS: 
Failed Recipient: XYZ@XYZ.com 
Reason: Remote host said: 550 Requested action not taken: mailbox unavailable 

That means your email server thinks your email doesn't work. 
PLEASE, OH PLEASE use a DIFFERENT EMAIL ACCOUNT. Try GMail.Com or Hotmail.com because your email doesn't work. 
SERIOUSLY!! This happens a few times each year from xyz.com 
Until we hear from you this email xyz@xyz.com you are using will be considered unavailable or out of service. 

Why do I need to create custom errors?

Because being Human we all make mistakes. Some of us learn from them quickly while others need to be reminded.

The Email issue is one of those that I have to remind them over and over at times. I get 2 to 3 each year and thought this year I'm going to handle it without lifting a figure.

When I get

Delivery Failure

Could not deliver message to the following recipient(s):

Failed Recipient: xyz@xyz.com
Reason: Remote host said: 550 Requested action not taken: mailbox unavailable

I often get 2 or more mails from the same person using my internal contact form with the same email asking me to email them. It's like talking to a wall in the dark. (I just added the dark for fun)

So now I have my Password Reset do my work for me. 

I have found that some very lazy network administrators setup their spam filters with this same message. I would like for you to think about what you are doing. 

1. You're telling the other admin your member isn't in your server. 

2. Your member thinks the other admin is not smart because they are using the email address with others just fine. 

3. The other admin tells the member to contact you. 

4. Wasted time on both ends. 

Now, if you are using mailbox unavailable response 550 for spam you are seriously out of tune with IT. If you think spam is going to read the proper Error Code for spam which by the way doesn't seem to exist, you're dreaming. 

How about adding a message with a 4xx error: I would personally suggest a 400 and then spell out Denied - you're on the spammer's list or whatever you want to tell the admin on the other side.

https://www.ietf.org/rfc/rfc2505.txt

When making use of the options/"knobs" described in this memo there are a few things to consider: For some events, like "Denied - you're on the spammer's list", 5xx may be the correct Return Code, since it terminates the session at once and we are done with it (assuming that the spammer plays by the SMTP rules, which he may decide not to do - in fact he can put the mail back on queue or turn to some other host, regardless of Return Code). However, a 5xx mistake in a configuration may cause legitimate mail to bounce, which may be quite unfortunate. Therefore, we suggest 4xx as the Return Code for most cases. Since that is a non fatal error, the mail gets re-queued at the sender and we have at least some time to discover and correct configuration errors, rather than have mail bounce (typically this is when we refuse to Relay for domains that we actually should accept since we are on their MX list). A 4xx response also makes the spammer's host re-queue the mail and if it really is his own host who gets to do this it is probably a good thing - fill up his disks with his own spam. If, on the other hand, he is using someone else as Relay Host, all the spam mail being queued is a fairly strong evidence that something bad is going on and should cause attention at that Relay Host. However, 4xx Temporary Errors may have unexpected interaction with MX-records. If the receiving domain has several MX records and the lowest preference MX-host refuses to receive mail with a "451" Response Code, the sending host may choose to - and often will - use the next host on the MX list.

 

So we have all kinds of ways to handle this issue and my way is to alert the human about the lazy admin's system. 

If you reject email from my little email server that's had the same domain for 18 years because you think it's spam then good for you. 

I just don't deliver to your server and send a human notice to the user to use GMail.Com or Hotmail.Com and if you're one of those "Transaction Failed 554" errors which we all know are not really setup correctly. If you're saying you are looking for a "Reattempt" at sending the email the email servers of the world are seeing the 500 error and not doing what your help guide states. (It's been about a year so I hope this has been updated.)

The idea you're sending a 500 error of any type is not correct. I know you can setup custom rules, try the "Deferring" which is like a grey list if you must, My servers will attempt 3 times if you tell it to delay for 20 minutes or 20 hours it will listen. 

But 500 is 500 and it's a 500 error you're using so I send a message to the human to change email services. 

Simple. 

Now for the code: 

I use a membership database so I can change the status of the email account to display this message each and every time they attempt to use a feature that depends on email to communicate.

Other times like in a "Bad Email List" or banned domains you can setup something like this quick and easy.

strEmaill = Request.Form("email")

strEmailDomain = Right(strEmaill, Len(strEmail) - InStr(strEmail, "@"))

Function CheckEmailDomain( str )
Dim strBadDomains,strBadDomains1,strCounter
strBadDomains = "xyz.com|xyz.net|xyz.org|xyz.edu"
strCounter = 0
strBadDomains = split(strBadDomains,"|")
For i = 0 to UBound(strBadDomains)
strBadDomains1 = Trim(strBadDomains(i))
If Trim( str ) = Trim(strBadDomains) Then
Response.Write("<p>Email Domain: "&str&" is listed as unreliable and recommend you use a different email provider.</p>")
Exit Function
End If
strCounter = strCounter + 1
Next
End Function

If you're really sick of having to try to deal with a very low percentage of SMTP administrators that just don't get it this type of notice does do the trick. 

Everyone that I had last year (3 of them) switched to GMail.com from their EDU and all three were Staff, students didn't have the issue. The School was monitoring the Staff email accounts and restricting them more without paying attention to the level of restriction and they missed the point of "Response Message" . 

Guess not all SMTP server administrators read the Error Code Reasons they send. 

554 and 550 are the ones I do not even deal with, Yahoo.com is bad with this, Hotmail.com a couple of years ago was just as bad but they cleaned up the responses. 

If you're an SMTP admin download the text document and read it, released in 1999 which would have been my 3rd year running my email servers. We have been doing this stuff for a long time, 18 years and today you're saying I sent spam? You must be related to SpamCup'er or something.

 

Have you ever wanted to get a message to a person that repeats over and over the same thing causing your inbox to flood with "Why isn't your website working?" Huh? My Website? Let me make this very clear, your typing the wrong name and it's not my website that's redirecting you because you use a search toolbar from My Smile's or something. Not just that, when you need to tell a person their email is not going to work and you're done with it