use strict;
use warnings;
our $VERSION = '5.50';
package Mail::Toaster::Ezmlm;
use Params::Validate ':all';
use Pod::Usage;
use English qw( -no_match_vars );
use lib 'lib';
use parent 'Mail::Toaster::Base';
sub authenticate {
my $self = shift;
my %p = validate ( @_, {
'domain' => SCALAR,
'password' => SCALAR,
$self->get_std_opts,
},
);
my ($domain, $password ) = ( $p{domain}, $p{password} );
my %args = $self->get_std_args( %p );
return $p{test_ok} if defined $p{test_ok};
$self->util->install_module( "vpopmail", %args );
require vpopmail;
if ( vpopmail::vauth_user( 'postmaster', $domain, $password, undef ) ) {
$self->audit( "authenticated postmaster\@$domain (ok)", %args);
return 1;
}
print "AUTHENTICATION FAILED! (dom: $domain, pass: $password)
";
print "if you are certain the authentication information is correct, then
it is quite likely you cannot authenticate because your web server is running as
a user ($UID) that lacks permission to run this script. You can:
a: run this script suid vpopmail
b: run the web server as user vpopmail
c: use suEXEC
Mail::Toaster::Ezmlm
$Mail::Toaster::VERSION -
© The Network People, Inc. 1999-2010