develooper Front page | perl.libnet | Postings from May 2006

Re: Net::POP3 detecting if a server does *not* support SASL authentication

Thread Previous
From:
Graham Barr
Date:
May 30, 2006 16:25
Subject:
Re: Net::POP3 detecting if a server does *not* support SASL authentication
Message ID:
D2409C75-7AB8-41F4-93D9-3F97DDFFED08@pobox.com

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.


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About