Commented out the call to Net::SMTP's verify() method and replaced it with a generic regexp sanity check. It appears that VRFY is not correctly implemented on all servers. (I may be mistaken on this; it might just be a bug somewhere in the PLIF code that is messing something up, but I couldn't find it if so.)

This commit is contained in:
ian%hixie.ch 2002-02-01 06:38:55 +00:00
Родитель 101821bcf0
Коммит 1c49734d21
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -89,9 +89,12 @@ sub output {
sub checkAddress {
my $self = shift;
my($app, $username) = @_;
$self->assert(defined($self->handle), 1, 'No SMTP handle, can\'t check address');
my $result = $self->handle->verify($username);
return $result;
return (defined($username) and $username =~ m/^[^@\s]+@[^@\s]+\.[^@.\s]+$/os);
# XXX this doesn't seem to be working:
# $self->assert(defined($self->handle), 1, 'No SMTP handle, can\'t check address');
# $self->assert(defined($username), 1, 'Internal error: no username passed to checkAddress');
# my $result = $self->handle->verify($username);
# return $result;
}
sub DESTROY {