Home  |  Linux  | Mysql  | PHP  | XML
From:Graham Barr Date:Tue May 30 17:25:24 2006
Subject:Re: Net::POP3 detecting if a server does *not* support SASL authentication
On May 28, 2006, at 9:13 AM, Achim Grolms wrote:

> Hello,
>
> I am trying to use Net::POP3 to detect if a POP3 Server
> does *not* support SASL authentication.
>
> My idea is to use CAPA and check if SASL exists in servers answer:
>
> #------------------------------------------------------------------
> #! /usr/bin/perl -w
> use strict;
> use Net::POP3;
>
> my $targethost = 'pop.web.de';
>
> my $pop = Net::POP3->new( 'pop.web.de' ) || die "can not connect to
> $targethost ";
> my $capa = $pop->capa() || die '$pop->capa() failed';
>
> unless ( exists $capa->{'SASL'} ) {
>     print "\n I am sure the server does not support SASL\n";
> }
> #------------------------------------------------------------------
>
> My question is:
> Is this code doing what I want, or is it possible the Server
> supports a SASL mechanism (like GSSAPI), but does not answer the
> CAPA question with 'SASL'?
> (Then my code is wrong!)

What do you see if you turn on debug trace with $pop->debug ?

Graham.

Navigate in group perl.libnet at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants