Abstract In this article, we’d like to discuss the problem of accuracy of email address existence verification. We will understand why simple verification command (VERIFY) does not work properly, and learn another command to be used instead – the command RCPT TO. We’ll check possible responses to RCPT TO command and their interpretations. Finally, we discover a special trick to check if the responded server provides a trustful reply. Dealing with sending amounts of email, the accuracy of email validation is of vital importance for you at least for two reasons: 1) your reputation; 2) waste of your time and budget. What is the problem of accuracy in email addresses verification? Let’s check the situation when we have a specific email address we need to check. Suggest that we passed all the first needed stages of communication with a destination server according to SMTP protocol. We could connect to the server, got replied to HELO command, we sent our address by MAIL FROM. Now we decided simply to VERIFY if the email address we are checking exist. If there is such a command as VERIFY in the SMTP protocol itself – why shall not we just use it and receive an immediate response to our question? After all, the command VERIFY was intended to provide us the information if the email exists or not. Unfortunately, as we can learn from our vast experience in this area, there are nearly no servers today that will provide a trustful response to VERIFY command. Thus the positive respond to VERIFY does not mean necessarily that the email address interesting to us ever exists. So the most evident and simple way to check the existence of an email does not work properly. How can we do verify the email existence? Instead of using VERIFY command, we should use another command from SMTP protocol. We send RCPT TO command which includes the recipient address – the address we need to verify. Let’s understand how to work correctly with RCPT TO. By sending RCPT TO command to the server we notify the requested server where exactly we want to send an email. To send our mail to the requested address, this address has to exist on the server. The servers will return the error “550” if this specific address does not exist. So, receiving this error can we be sure that the address does not exist? To be sure that this is the true answer to our question? But, unfortunately, some servers will return a positive response “250”, indicating that your request has been accepted although the email address possibly does not exist. Other responses to the RCPT TO command interpreted: Code Description 250 Requested mail action okay, completed 251 User not local; will forward to <forward-path> 421 <domain> Service not available, closing transmission channel 450 Requested mail action not taken: mailbox unavailable 451 Requested action aborted: local error in processing 452 Requested action not taken: insufficient system storage 500 Syntax error, command unrecognized 501 Syntax error in parameters or arguments 503 Bad sequence of commands 521 <domain> does not accept mail [rfc1846] 550 Requested action not taken: mailbox unavailable 551 User not local; please try <domain> 552 Requested mail action aborted: exceeded storage allocation Let’s check some of the possible responses. If the given email address is full and cannot receive an email at the moment, the server returns “552” error. Error “450” can appear if a specific email address is not available at this moment temporarily, which does not mean necessarily that the given address does not exist at all. Other negative responses should be considered to make a decision whether or not an email address exists. Another moment should be taken into the account before coming to the decision whether the email address exists or not – it is the exact purpose of your check. E.g. code 552 - “the email address is full” can be evidently interpreted as the email address exists. But if you intend to send an email immediately to this specific address – this action is useless. Several conclusions. The negative response “550” to the RCPT TO command or any other response that you consider as negative brings you to conclusion that the requested email address does not exist. Positive response "250" cannot be surely interpreted as a proof that the requested email address exists. To understand more precise the behavior of the server in case of "250" positive response you can do the next trick. Before you start to check a specific email address you are interested in, run a check of a number of emails obviously not existing. In case of “250” positive response to a request for a non-existing email address indicates that the server does not perform authentication of any email address at this stage, thus, never returning a negative response “550” at this point. However, if the server returns a negative response about a dummy email address, it indicates that a positive response “250” will be trustful as well. Returning to the accuracy problem. Please note that verification is correct at a specific moment. New email servers will appear permanently, as well as existing now ones will disappear. The DNS is updated all the time and now existing domain can cease to exist at every moment. The same can happen to the existing email address. The email can be deleted at any time and then be restored again. To ensure your email address database is updated constantly, it is advisable to run its verification: (1) constantly, and especially (2) the shortest time before emailing. Understanding the problems now, you can organize the mail address verification by yourself, or use our expert services.
Related Articles -
email validation, how to verify email address, address validation,
|