Your expectations do not match those of the module's author:
return _result(CU_SMTP_UNREACHABLE,
'Cannot connect SMTP servers: ' .
join(', ', @mservers));
...
sub _result($$) {
my($code, $reason) = @_;
my $ok = 0;
$ok = 1 if $code == CU_OK;
$ok = 1 if $code == CU_SMTP_UNREACHABLE;
...
The module's author apparantly decided not to assume a bad address if the server cannot be reached. You'll need to add your own test, i.e.
if (Mail::CheckUser::last_check()->{code} == CU_SMTP_UNREACHABLE) {
# can't reach server
...
}
|