On Monday 22 May 2006 20:50, you wrote:
> Thanks. No joy. The error is:

Dennis, 
I have attached an example with more debugging output.
Please test and send back output.

Achim


#------usage example--------------
use strict;

use Authen::SASL 2.10;
use Net::POP3 2.28;

#----Adjust to your environment------
my $pop3host = 'moerbsen.grolmsnet.lan';
#----/Adjust to your environment------

my $sasl = Authen::SASL->new( mechanism => 'GSSAPI' )
     || die 'cannot create SASL object';

#----Just debugging, not needed-----
my $client = $sasl->client_new( 'pop3', $pop3host );
$client->client_start();
print $sasl->error();
#----/Just debugging, not needed-----

my $pop = Net::POP3->new( $pop3host ) || die "can not connect to $pop3host ";
if ( $pop->auth($sasl) ) {
    my $msgnums = $pop->list; # hashref of msgnum => size
    foreach my $msgnum (keys %$msgnums) {
        my $msg = $pop->get($msgnum);
        print @$msg;
    }
}
else {
   die "\n Authentication error from SASL: \n",
       $sasl->error,
}
$pop->quit;
#------end of usage example--------------

Reply via email to