cormanaz has asked for the wisdom of the Perl Monks concerning the following question:

Good day Monks. When running the following code (in which the parameters have been changed or replaced with * to protect the innocent):
use strict; use Mail::POP3Client; my $pop = new Mail::POP3Client( USER => "uid", PASSWORD => "pw", HOST => "mail.*****.com" ); print join("\n",@{ $pop->{'tranlog'} }); $pop->Close();
I get the following tranlog output and error message:

+OK <281**.1103124993@pop03.****.******.net> APOP uid 431b9d95123c88179f74489d3549f4** -ERR authorization failed CAPA USER uid Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Mail/POP3Client.pm line 1008, <GEN1> line 2.

When per suggestion of the FAQ I add AUTH_MODE => 'PASS' to the constructor, I get:

+OK <121**.1103125459@pop02.****.******.net> USER uid +OK PASS pw -ERR authorization failed

uid and pw are known good. Any ideas what I am doing wrong?

Many thanks in advance....

Steve

2004-12-15 Janitored by Arunbear - changed pre tags to code tags around error messages

Replies are listed 'Best First'.
Re: POP3Client connection problems
by redhotpenguin (Deacon) on Dec 15, 2004 at 16:38 UTC
    It's possible that the server is configured to only support a specific auth method such as CRAM-MD5. You may want to try using AUTH_MODE => 'BEST' instead of PASS, which will cycle through several auth methods and try each.
      I believe 'BEST' is the default, so that's what I got on the fist try. When it attempts the second method it throws the error shown at the end of the first output. Steve
Re: POP3Client connection problems
by traveler (Parson) on Dec 15, 2004 at 17:37 UTC
    How about running a packet capture program such as Ethereal on a host while using a working client and watching the traffic to see what happens? Then compare that to what Mail::Pop3 is sending.
Re: POP3Client connection problems
by zentara (Cardinal) on Dec 16, 2004 at 12:33 UTC
    I may be missing something here, but the perldocs for Mail::POP3Client says:
    AUTH_MODE - pass 'APOP' to force APOP (MD5) authorization. (default is + 'BEST') #so you should use AUTH_MODE => 'APOP',

    I'm not really a human, but I play one on earth. flash japh