On Mon, May 22, 2006 1:27 pm, Achim Grolms wrote: > On Monday 22 May 2006 19:50, Dennis Putnam wrote: >> Doesn't work. Nothing is in '$!' but the POP log says "badlogin". > > Try if this works:
I would not expect it to, as-is. The structure is right, but it needs authentication details to be added. But my knowledge of how GSSAPI works and what parameters are needed for it to validate is very limited. Graham. > > #------usage example-------------- > use strict; > > use Authen::SASL 2.10 qw(Perl); > use Net::POP3; > > my $pop3host = 'pop3host'; > > my $sasl = Authen::SASL->new( mechanism => 'GSSAPI' ); > 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-------------- > >