Can you post complete logs from serveral successive downloads in which this
happens? The log snippet you posted earlier didn't include any of the blob
information.
The reason for Outlook storing a blob even when nothing is to be left on the
server is to deal with situations such as a connection to the server being
dropped before the POP3 session has completed. In that case, Outlook can't
issue the QUIT command, and the server thus is not allowed to delete any
messages. If Outlook didn't keep the blob, it would not know which messages
it had already downloaded and would just download everything again.
While I understand what you are saying there, POP3 servers are supposed to
do
their deletion thing upon seeing QUIT and before issuing +OK. Note that in
all
the cases I'm sending the +OK was sent by me and received/logged by OL2003.
Certainly if you don't see +OK (or -ERR) you can't be certain that the QUIT
was parsed and processed, but if you *do* see +OK you may be certain any
compliant server has done its deletions. See excerpt of RFC1939 way below.
I do not see any justification for retaining a message length after a +OK to
a
quit and using it as decision to discard a message from the mailbox in a
subsequent session, and certainly can see this leading to lost real
messages.
I would strongly urge that after getting +OK to a QUIT, OL should return to
the state wherein it believes that the mailbox is empty and that no
previously
read messages can possibly be there, at least when not using UIDL. Even
when
a +OK is not received, I'd personally rather receive a copy of a message
than
to lose a message just because it had an unfortunate length in sequence.
As to the strange behavior here is a fully logged example.
I'll just include the OPMLog.log content. In all cases it agrees with my
logs so
no need to be redundant.
Initial conditions: Mailbox is empty, and was previously seen empty by OL.
Outlook stopped and restarted. Send/receive of empty mailbox:
2004.01.20 00:52:49 <<<< Logging Started (level is LTF_TRACE) >>>>
2004.01.20 00:52:49 Bozo on left: Synch operation started (flags = 00000001)
2004.01.20 00:52:49 Bozo on left: UploadItems: 0 messages to send
2004.01.20 00:52:49 Bozo on left: Synch operation completed
2004.01.20 00:52:49 Bozo on left: Synch operation started (flags = 00000030)
2004.01.20 00:52:49 Bozo on left: DoPOPDownload(flags = 00000030, max msg =
ffffffff): full items
2004.01.20 00:52:49 POP3 (left.minerva.com): Begin execution
2004.01.20 00:52:49 POP3 (left.minerva.com): ========= Initial blob
=========
2004.01.20 00:52:49 POP3 (left.minerva.com):
===================================
2004.01.20 00:52:49 POP3 (left.minerva.com): Port: 110, Secure: no, SPA: no
2004.01.20 00:52:49 POP3 (left.minerva.com): Finding host
2004.01.20 00:52:49 POP3 (left.minerva.com): Connecting to host
2004.01.20 00:52:49 POP3 (left.minerva.com): Connected to host
2004.01.20 00:52:49 POP3 (left.minerva.com): <rx> +OK POP3
<
[email protected]>
2004.01.20 00:52:49 POP3 (left.minerva.com): Authorizing to server
2004.01.20 00:52:49 POP3 (left.minerva.com): [tx] USER left.minerva.com/bozo
2004.01.20 00:52:49 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:52:49 POP3 (left.minerva.com): [tx] PASS *****
2004.01.20 00:52:49 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:52:49 POP3 (left.minerva.com): Authorized to host
2004.01.20 00:52:49 POP3 (left.minerva.com): Connected to host
2004.01.20 00:52:49 POP3 (left.minerva.com): [tx] STAT
2004.01.20 00:52:49 POP3 (left.minerva.com): <rx> +OK 0 0
2004.01.20 00:52:49 POP3 (left.minerva.com): ==== Comparing server and local
blobs ====
2004.01.20 00:52:49 POP3 (left.minerva.com):
==========================================
2004.01.20 00:52:49 POP3 (left.minerva.com): Do deletions: LoS: no
2004.01.20 00:52:49 POP3 (left.minerva.com): Disconnecting from host
2004.01.20 00:52:49 POP3 (left.minerva.com): [tx] QUIT
2004.01.20 00:52:49 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:52:49 POP3 (left.minerva.com): Disconnected from host
2004.01.20 00:52:49 POP3 (left.minerva.com): ========= No blob changes
=========
2004.01.20 00:52:49 POP3 (left.minerva.com):
===================================
2004.01.20 00:52:49 POP3 (left.minerva.com): End execution
2004.01.20 00:52:49 Bozo on left: ReportStatus: RSF_COMPLETED, hr =
0x00000000
2004.01.20 00:52:49 Bozo on left: Synch operation completed
Now insert four messages into mailbox. Send/receive again:
2004.01.20 00:59:16 Bozo on left: Synch operation started (flags = 00000001)
2004.01.20 00:59:16 Bozo on left: UploadItems: 0 messages to send
2004.01.20 00:59:16 Bozo on left: Synch operation completed
2004.01.20 00:59:16 Bozo on left: Synch operation started (flags = 00000030)
2004.01.20 00:59:16 Bozo on left: DoPOPDownload(flags = 00000030, max msg =
ffffffff): full items
2004.01.20 00:59:16 POP3 (left.minerva.com): Begin execution
2004.01.20 00:59:16 POP3 (left.minerva.com): ========= Initial blob
=========
2004.01.20 00:59:16 POP3 (left.minerva.com):
===================================
2004.01.20 00:59:16 POP3 (left.minerva.com): Port: 110, Secure: no, SPA: no
2004.01.20 00:59:16 POP3 (left.minerva.com): Finding host
2004.01.20 00:59:16 POP3 (left.minerva.com): Connected to host
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> +OK POP3
<
[email protected]>
2004.01.20 00:59:16 POP3 (left.minerva.com): Authorizing to server
2004.01.20 00:59:16 POP3 (left.minerva.com): [tx] USER left.minerva.com/bozo
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:59:16 POP3 (left.minerva.com): [tx] PASS *****
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:59:16 POP3 (left.minerva.com): Authorized to host
2004.01.20 00:59:16 POP3 (left.minerva.com): Connected to host
2004.01.20 00:59:16 POP3 (left.minerva.com): [tx] STAT
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> +OK 4 9395
2004.01.20 00:59:16 POP3 (left.minerva.com): [tx] UIDL
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> -ERR UIDL Bad Command
2004.01.20 00:59:16 POP3 (left.minerva.com): Server does not support UIDL.
Falling back on TOP.
2004.01.20 00:59:16 POP3 (left.minerva.com): [tx] LIST
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> +OK 4 9395
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> 1 2965
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> 2 507
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> 3 3001
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> 4 2922
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> .
2004.01.20 00:59:16 POP3 (left.minerva.com): [tx] TOP 1 1
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> -ERR TOP Bad Command
2004.01.20 00:59:16 POP3 (left.minerva.com): ==== Comparing server and local
blobs ====
2004.01.20 00:59:16 POP3 (left.minerva.com):
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : new
2004.01.20 00:59:16 POP3 (left.minerva.com):
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : new
2004.01.20 00:59:16 POP3 (left.minerva.com):
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : new
2004.01.20 00:59:16 POP3 (left.minerva.com):
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : new
2004.01.20 00:59:16 POP3 (left.minerva.com):
==========================================
2004.01.20 00:59:16 POP3 (left.minerva.com): [tx] RETR 1
2004.01.20 00:59:16 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:59:17 POP3 (left.minerva.com): [tx] RETR 2
2004.01.20 00:59:17 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:59:17 POP3 (left.minerva.com): [tx] RETR 3
2004.01.20 00:59:17 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:59:17 POP3 (left.minerva.com): [tx] RETR 4
2004.01.20 00:59:17 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:59:17 POP3 (left.minerva.com): Do deletions: LoS: no
2004.01.20 00:59:17 POP3 (left.minerva.com): [tx] DELE 1
2004.01.20 00:59:17 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:59:17 POP3 (left.minerva.com): Disconnecting from host
2004.01.20 00:59:17 POP3 (left.minerva.com): [tx] QUIT
2004.01.20 00:59:17 POP3 (left.minerva.com): <rx> +OK
2004.01.20 00:59:17 POP3 (left.minerva.com): Disconnected from host
2004.01.20 00:59:17 POP3 (left.minerva.com): ========= Updates to blob
=========
2004.01.20 00:59:17 POP3 (left.minerva.com):
&BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2004.01.20 00:59:17 POP3 (left.minerva.com): ========= Final blob
=========
2004.01.20 00:59:17 POP3 (left.minerva.com):
&BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2004.01.20 00:59:17 POP3 (left.minerva.com):
===================================
2004.01.20 00:59:17 POP3 (left.minerva.com): End execution
2004.01.20 00:59:17 Bozo on left: ReportStatus: RSF_COMPLETED, hr =
0x00000000
2004.01.20 00:59:17 Bozo on left: Synch operation completed
Interesting, huh? We read all three but deleted only the first.
Try send/receive again with old messages 2, 3, 4 in mailbox as 1,2,3:
2004.01.20 01:02:07 Bozo on left: Synch operation started (flags = 00000001)
2004.01.20 01:02:07 Bozo on left: UploadItems: 0 messages to send
2004.01.20 01:02:07 Bozo on left: Synch operation completed
2004.01.20 01:02:07 Bozo on left: Synch operation started (flags = 00000030)
2004.01.20 01:02:07 Bozo on left: DoPOPDownload(flags = 00000030, max msg =
ffffffff): full items
2004.01.20 01:02:07 POP3 (left.minerva.com): Begin execution
2004.01.20 01:02:07 POP3 (left.minerva.com): ========= Initial blob
=========
2004.01.20 01:02:07 POP3 (left.minerva.com):
&BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2004.01.20 01:02:07 POP3 (left.minerva.com):
===================================
2004.01.20 01:02:07 POP3 (left.minerva.com): Port: 110, Secure: no, SPA: no
2004.01.20 01:02:07 POP3 (left.minerva.com): Finding host
2004.01.20 01:02:07 POP3 (left.minerva.com): Connected to host
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> +OK POP3
<
[email protected]>
2004.01.20 01:02:07 POP3 (left.minerva.com): Authorizing to server
2004.01.20 01:02:07 POP3 (left.minerva.com): [tx] USER left.minerva.com/bozo
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:02:07 POP3 (left.minerva.com): [tx] PASS *****
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:02:07 POP3 (left.minerva.com): Authorized to host
2004.01.20 01:02:07 POP3 (left.minerva.com): Connected to host
2004.01.20 01:02:07 POP3 (left.minerva.com): [tx] STAT
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> +OK 3 6430
2004.01.20 01:02:07 POP3 (left.minerva.com): Server does not support UIDL.
Falling back on TOP.
2004.01.20 01:02:07 POP3 (left.minerva.com): [tx] LIST
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> +OK 3 6430
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> 1 507
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> 2 3001
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> 3 2922
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> .
2004.01.20 01:02:07 POP3 (left.minerva.com): ==== Comparing server and local
blobs ====
2004.01.20 01:02:07 POP3 (left.minerva.com):
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : new
2004.01.20 01:02:07 POP3 (left.minerva.com):
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA : new
2004.01.20 01:02:07 POP3 (left.minerva.com):
==========================================
2004.01.20 01:02:07 POP3 (left.minerva.com): [tx] RETR 1
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:02:07 POP3 (left.minerva.com): [tx] RETR 3
2004.01.20 01:02:07 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:02:08 POP3 (left.minerva.com): Do deletions: LoS: no
2004.01.20 01:02:08 POP3 (left.minerva.com): [tx] DELE 1
2004.01.20 01:02:08 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:02:08 POP3 (left.minerva.com): [tx] DELE 2
2004.01.20 01:02:08 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:02:08 POP3 (left.minerva.com): Disconnecting from host
2004.01.20 01:02:08 POP3 (left.minerva.com): [tx] QUIT
2004.01.20 01:02:08 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:02:08 POP3 (left.minerva.com): Disconnected from host
2004.01.20 01:02:08 POP3 (left.minerva.com): ========= Updates to blob
=========
2004.01.20 01:02:08 POP3 (left.minerva.com):
&BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2004.01.20 01:02:08 POP3 (left.minerva.com): ========= Final blob
=========
2004.01.20 01:02:08 POP3 (left.minerva.com):
&BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2004.01.20 01:02:08 POP3 (left.minerva.com):
===================================
2004.01.20 01:02:08 POP3 (left.minerva.com): End execution
2004.01.20 01:02:08 Bozo on left: ReportStatus: RSF_COMPLETED, hr =
0x00000000
2004.01.20 01:02:08 Bozo on left: Synch operation completed
Now we retrieve messages 1 and 3 (both of which were retrieved before, 2 and
4 from the earlier
session) but for some reason we don't retrieve 2 (the old 3). Then for
equally mystifying reasons
we delete 1 and 2 but not 3. Once more:
2004.01.20 01:05:17 Bozo on left: Synch operation started (flags = 00000001)
2004.01.20 01:05:17 Bozo on left: UploadItems: 0 messages to send
2004.01.20 01:05:17 Bozo on left: Synch operation completed
2004.01.20 01:05:17 Bozo on left: Synch operation started (flags = 00000030)
2004.01.20 01:05:17 Bozo on left: DoPOPDownload(flags = 00000030, max msg =
ffffffff): full items
2004.01.20 01:05:17 POP3 (left.minerva.com): Begin execution
2004.01.20 01:05:17 POP3 (left.minerva.com): ========= Initial blob
=========
2004.01.20 01:05:17 POP3 (left.minerva.com):
&BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2004.01.20 01:05:17 POP3 (left.minerva.com):
===================================
2004.01.20 01:05:17 POP3 (left.minerva.com): Port: 110, Secure: no, SPA: no
2004.01.20 01:05:17 POP3 (left.minerva.com): Finding host
2004.01.20 01:05:17 POP3 (left.minerva.com): Connected to host
2004.01.20 01:05:17 POP3 (left.minerva.com): <rx> +OK POP3
<
[email protected]>
2004.01.20 01:05:17 POP3 (left.minerva.com): Authorizing to server
2004.01.20 01:05:17 POP3 (left.minerva.com): [tx] USER left.minerva.com/bozo
2004.01.20 01:05:17 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:05:17 POP3 (left.minerva.com): [tx] PASS *****
2004.01.20 01:05:17 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:05:17 POP3 (left.minerva.com): Authorized to host
2004.01.20 01:05:17 POP3 (left.minerva.com): Connected to host
2004.01.20 01:05:17 POP3 (left.minerva.com): [tx] STAT
2004.01.20 01:05:17 POP3 (left.minerva.com): <rx> +OK 1 2922
2004.01.20 01:05:17 POP3 (left.minerva.com): Server does not support UIDL.
Falling back on TOP.
2004.01.20 01:05:17 POP3 (left.minerva.com): [tx] LIST
2004.01.20 01:05:17 POP3 (left.minerva.com): <rx> +OK 1 2922
2004.01.20 01:05:17 POP3 (left.minerva.com): <rx> 1 2922
2004.01.20 01:05:17 POP3 (left.minerva.com): <rx> .
2004.01.20 01:05:17 POP3 (left.minerva.com): ==== Comparing server and local
blobs ====
2004.01.20 01:05:17 POP3 (left.minerva.com):
==========================================
2004.01.20 01:05:17 POP3 (left.minerva.com): Do deletions: LoS: no
2004.01.20 01:05:17 POP3 (left.minerva.com): [tx] DELE 1
2004.01.20 01:05:17 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:05:17 POP3 (left.minerva.com): Disconnecting from host
2004.01.20 01:05:17 POP3 (left.minerva.com): [tx] QUIT
2004.01.20 01:05:17 POP3 (left.minerva.com): <rx> +OK
2004.01.20 01:05:17 POP3 (left.minerva.com): Disconnected from host
2004.01.20 01:05:17 POP3 (left.minerva.com): ========= No blob changes
=========
2004.01.20 01:05:17 POP3 (left.minerva.com):
===================================
2004.01.20 01:05:17 POP3 (left.minerva.com): End execution
2004.01.20 01:05:17 Bozo on left: ReportStatus: RSF_COMPLETED, hr =
0x00000000
2004.01.20 01:05:17 Bozo on left: Synch operation completed
... so we delete message 3 from previous session, #4 from the original try
on these four
messages, which we should have deleted last session (not to mention the
first session).
I hope this is enough to set the hook and will be happy to run more
examples. BTW I've
never seen it delete more than two messages per session, even with 100
messages read. The
un-read messages have seemed to be only #1 or #2 of a mailbox in any case
that I have
observed... messages 3 and onward if present have always been read... and
re-read and re-read.
Thanks for taking an interest in this. Looking forward to some code
changes - Greg
Excerpt from RFC1939 in which it is clearly stated that POP3 servers do
their deletions
BEFORE replying to the QUIT command:
6. The UPDATE State
When the client issues the QUIT command from the TRANSACTION state,
the POP3 session enters the UPDATE state. (Note that if the client
issues the QUIT command from the AUTHORIZATION state, the POP3
session terminates but does NOT enter the UPDATE state.)
If a session terminates for some reason other than a client-issued
QUIT command, the POP3 session does NOT enter the UPDATE state and
MUST not remove any messages from the maildrop.
QUIT
Arguments: none
Restrictions: none
Discussion:
The POP3 server removes all messages marked as deleted
from the maildrop and replies as to the status of this
operation. If there is an error, such as a resource
shortage, encountered while removing messages, the
maildrop may result in having some or none of the messages
marked as deleted be removed. In no case may the server
remove any messages not marked as deleted.
Whether the removal was successful or not, the server
then releases any exclusive-access lock on the maildrop
and closes the TCP connection.
Possible Responses:
+OK
-ERR some deleted messages not removed
Examples:
C: QUIT
S: +OK dewey POP3 server signing off (maildrop empty)
...
C: QUIT
Jeff Stephenson
Outlook Development
This posting is provided "AS IS" with no warranties, and confers no rights
it clear
that
according