Mail::OpenRelay::Simple - check if a mail server runs as an open relay.
use Mail::OpenRelay::Simple; my $host = "127.0.0.1"; my $scan = Mail::OpenRelay::Simple->new({ host => $host, timeout => 5, from_email => "test\@foobar.com", rcpt_email => "test\@foobar.com", banner => 0, debug => 0 }); print "$host open relay\n" if $scan->check;
This module permit to check if a mail server runs as an open relay.
Note: this module provides only a simple test. No email message is sended.
The constructor. Given a host returns a Mail::OpenRelay::Simple object:
my $scan = Mail::OpenRelay::Simple->new({ host => "127.0.0.1" });
Optionally, you can also specify :
remote port. Default is 25;
default is 8 seconds;
default is test\@foobar.com;
0 (none), 1 (show mail server banner). Default is 0;
0 (none), 1 (show all requests). Defualt is 0;
Checks the target.
$scan->check;
http://en.wikipedia.org/wiki/Open_mail_relay
Matteo Cantoni, <mcantoni@cpan.org>
You may distribute this module under the terms of the Artistic license. See Copying file in the source distribution archive.
Copyright (c) 2006, Matteo Cantoni
To install Mail::OpenRelay::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::OpenRelay::Simple
CPAN shell
perl -MCPAN -e shell install Mail::OpenRelay::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.