At 11:52 AM +0300 10/24/99, Mikko H�nninen wrote:
>Jon Rust <[EMAIL PROTECTED]> wrote on Sat, 23 Oct 1999:
>> The Net:POP3 login method expects to get a message count back after a
>> successful login. Qmail's pop3d does not provide a message count, so
>> it's impossible to tell if login succeeded (-> login() always returns
>> as a "fail"). Is there a patch available to qmail's pop3d to return
>> the number of messages after a successful login?
>
>I haven't actually verified this in practice, but it looks like the
>Net::POP3 module will return <undef> if the login (or pass) command
>fails. If the login is successfull, it will return either 0 or the
>number of messages, if that was given in the password reply.
>
>So you don't need to look for patch to pop3d, instead in the perl
>script you should be checking for a return value of <undef> instead
>of non-zero to indicate login failure. Not doing this will give you
>a "failed login" even on servers which do give the message count, but
>the mailbox just happened to be empty.
You are correct. My bad. Thanks for the assist.
jon