I still have to disagree with you on this. My qpopper daemon, doesn't allow the use of retrying (as used with the previous example).

# first try, without calling quits $ telnet *host* 110 Trying *host*... Connected to *host*. Escape character is '^]'. +OK Qpopper (version 4.0.5) at *host* starting. <76162.1072222944@*ho +st*> user *user* +OK Password required for *user*. pass invalidpass -ERR [AUTH] Password supplied for "*user*" is incorrect. +OK Pop server at *host* signing off. Connection closed by foreign host. # second try, now calling quit $ telnet *host* 110 Trying *host*... Connected to *host*. Escape character is '^]'. +OK Qpopper (version 4.0.5) at *host* starting. <76181.1072223079@*ho +st*> user *user* +OK Password required for *user*. pass invalidpass -ERR [AUTH] Password supplied for "*user*" is incorrect. quit +OK Pop server at *host* signing off. Connection closed by foreign host.

The daemon allows some time for a quit command, before dropping the connection. So far I have tested 4 POP3 daemons:

All of the above allow some time before they disconnect (if they do it at all). Unfortunally, POP3 daemons are allowed to drop the connection straight after an invalid password, according to RFC1939:

"After returning a negative status indicator, the server may close the connection."

So, I'm affraid the OP is dealt some wrong cards. In general, would it be bad to "quit" a connection, even if there's a bad login? Based on my testing experiences, I tend not to believe that.

--
b10m

In reply to Re: How to check number of messages using Net::POP3? by b10m
in thread How to check number of messages using Net::POP3? by BjoernD

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.