This code does not work and WILL RETURN FALSE POSITIVES AS CODED.
The comparator code for a valid response with substr() is coded wrong and also checks the wrong response it appears. The defaults for the below init seem to guarantee a false positive.
EDIT: I see the reason now for the false positive, but I don't like that idea. We need all or nothing. This is like a false sense of security as is. This can be great however and should be!
Code:
$b_user_valid = $vbulletin->options['os_email_host_timeout_valid'];
Sets this positive to start. I'm pretty sure that should be the opposite for sanity. In my testing and simple knowledge anyway.
It can work as far as I can tell with my own testing and modifications, so far. I tested it against my sever and yahoo with my fixes as working. But I don't want to get ahead of myself. There may be more pitfalls I missed in my simple debugging.
EXCELLENT IDEA YOU GOT HERE!