Re: Can JavaMail detect a non-existant email address?
View Single Post
Sudsy <(E-Mail Removed)> wrote in news:3FAE7D10.8000702
> There's no guaranteed way to validate the username of the claimed
> sender. There's the VRFY command in RFC821 but it's no longer
> reliable, primarily because of the spammers. What you CAN do is
> verify the originating domain using JNDI. Following is a small
> program which effectively does 'nslookup -type=MX <host> | wc -l'
> but in Java. Note that an exception will be thrown if the lookup
> fails (no DNS records for hostname).
One thing to remember about this approach is the some companies write
to you from a domain that has no MX record. I think Fidelity
Investments does this (or did). Consequently if a spam test is based on
a MX record not existing you may get a unwanted false positives. Better
to also include a test for an 'A' record. By doing this you are
effectively rejecting falsified hosts.