Re: Mailserver reports two login/logouts

  • From: Frank Schruefer <frank@siteforum.com>
  • To: issues@javamail.kenai.com
  • Subject: Re: Mailserver reports two login/logouts
  • Date: Wed, 21 Oct 2009 15:50:15 +0200
  • Organization: SITEFORUM

> Hi Frank.  I honestly have no idea what the purpose of the "issues"
> mailing list is for Kenai projects.  These questions are probably
> better sent to the "users" mailing list, or to one of the JavaMail
> forums.

Sorry, my dictionary wasn't clear on this, so I thought 'issues' means
something like problems :-)

> 
>> Im checking mail with javamail 1.4.2 on a pop3 mailserver.
>> The mailserver logs say that two logins/logouts are made:
>>
>> Oct 14 17:02:32 sfmail01 pop3d: Connection, ip=[::ffff:91.66.207.201]
>> Oct 14 17:02:32 sfmail01 pop3d: LOGIN,
>> user=webmail.demo@siteforum.com, ip=[::ffff:91.66.207.201]
>> Oct 14 17:02:32 sfmail01 pop3d: LOGOUT,
>> user=webmail.demo@siteforum.com, ip=[::ffff:91.66.207.201], top=0,
>> retr=0, rcvd=18, sent=49, time=0
>> Oct 14 17:02:32 sfmail01 pop3d: Connection, ip=[::ffff:91.66.207.201]
>> Oct 14 17:02:32 sfmail01 pop3d: LOGIN,
>> user=webmail.demo@siteforum.com, ip=[::ffff:91.66.207.201]
>> Oct 14 17:02:32 sfmail01 pop3d: LOGOUT,
>> user=webmail.demo@siteforum.com, ip=[::ffff:91.66.207.201], top=0,
>> retr=0, rcvd=6, sent=30, time=0
>>
>>
>> while the connectionlistener only reports two logins/logouts (Printed
>> the Events to System.err):
>>
>> javax.mail.event.ConnectionEvent[source=pop3://helpdesk.demo%40siteforum.com@mail.siteforum.com]:
>> opened.
>> javax.mail.event.ConnectionEvent[source=pop3://helpdesk.demo%40siteforum.com@mail.siteforum.com]:
>> closed.
>>
>>
>> Any idea why there's a second login/logout happening or how I can
>> debug this further?
> 
> Did you see the debugging tips in the JavaMail FAQ?

Thanks, that helped to shed some light what is going on:
The second connection is obviously opened when the getFolder("INBOX") method
is called.

This is ok for an IMAP connection as these messages here explain:
http://forums.sun.com/thread.jspa?threadID=5377355

But I'm using POP3 which doesn't have the concept of folders so the second
connection would probably be pure overhead.
And as you can see it's basically just a login/logout with no command in
between (if I'm reading this right).


Here's the log with debug enabled (i also printed out the various events):
DEBUG: getProvider() returning 
javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, 
Inc]
DEBUG: getProvider() returning 
javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, 
Inc]
DEBUG POP3: connecting to host "mail.siteforum.com", port 110, isSSL false
S: +OK Hello there.
C: USER webmail.demo@siteforum.com
S: +OK Password required.
C: PASS xxxxxxxx
S: +OK logged in.
C: STAT
[DEBUG-MAIL] Connection opened 
(javax.mail.event.ConnectionEvent[source=pop3://webmail.demo%40siteforum.com@mail.siteforum.com]).
S: +OK 0 0
[DEBUG-MAIL] Connection opened 
(javax.mail.event.ConnectionEvent[source=INBOX]).
C: NOOP
S: +OK Yup.
C: QUIT
S: +OK Bye-bye.
[DEBUG-MAIL] Connection closed 
(javax.mail.event.ConnectionEvent[source=INBOX]).
DEBUG POP3: connecting to host "mail.siteforum.com", port 110, isSSL false
S: +OK Hello there.
C: USER webmail.demo@siteforum.com
S: +OK Password required.
C: PASS xxxxxxxx
S: +OK logged in.
C: QUIT
S: +OK Bye-bye.
[DEBUG-MAIL] Connection closed 
(javax.mail.event.ConnectionEvent[source=pop3://webmail.demo%40siteforum.com@mail.siteforum.com]).


BTW: It would be a good idea if the debug trace would come with some kind of 
connection id as
this all seems to be a bit mixed up (at least in combination with the events).

-- 
Thanks,
   Frank


Mailserver reports two login/logouts

Frank Schruefer 10/15/2009

Re: Mailserver reports two login/logouts

Bill Shannon 10/15/2009

Re: Mailserver reports two login/logouts

Frank Schruefer 10/21/2009

Re: Mailserver reports two login/logouts

Bill Shannon 10/21/2009

Re: Mailserver reports two login/logouts

Frank Schruefer 10/22/2009

Re: Mailserver reports two login/logouts

Bill Shannon 10/22/2009
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close