--Adrian Caneva wrote on 12.02.2002 16:58 -0300:
>> The mysql-query-log would log each connect and query.
>
> The strange thing is that mysql.log is not showing any connection nor query
> from courier daemons.
I observed this problem several times, after changing everything
back and forth and restarted a couple of times it starts working
out of the blue and will never make troubles again...
Maybe it gets the wrong version of libmysql, check the binary
with `ldd authdaemond.mysql` for libmysqlclient, and if you have
several of them on your disk.
> Utilities authtest and authinfo that you mentioned seem not to be included
> in Debian packages. Is there a way to compile only those tools ?
They will be compiled with the source, but dont get installed.
This perl-script is similar to authtest, but works only with
authdaemon.
File authdaemontest.pl, adjust the $prefix:
#!/usr/bin/perl
my $prefix = '/usr/lib/courier';
my $authsock = $prefix.'/var/authdaemon/socket';
(-S $authsock) or die "no socket: $authsock";
my $user = $ARGV[0];
my $pass = $ARGV[1];
print "# $0 $user $pass\n";
use Socket;
socket(SOCK, PF_UNIX, SOCK_STREAM, 0);
connect(SOCK, sockaddr_un($authsock)) or die "$authsock: $!";
if($pass)
{ my $authstring = "login\nlogin\n$user\n$pass";
my $authlength = length($authstring);
send SOCK, "AUTH $authlength\n$authstring\n", 0 or die "$authsock: $!";
}
elsif($user)
{ send SOCK, "PRE . login $user\n", 0 or die "$authsock: $!";
}
else
{ print "Socket OK: $authsock\n";
print "Usage: $0 loginname [password]\n";
exit(3);
}
my @data = <SOCK>;
close SOCK;
# if ( $data[0] =~ /FAIL/ )
if ( @data =~ /FAIL/ )
{ print "*** AUTH FAILED ***\n";
exit(2);
}
print @data;
if ( !$pass ) { exit(1); }
exit(0);
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users