Closed Bug 245098 Opened 20 years ago Closed 20 years ago

Messages deleted locally are deleted from POP server, even if pref is "leave messages on server"

Categories

(MailNews Core :: Networking: POP, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha2

People

(Reporter: beanladen, Assigned: Bienvenu)

References

Details

(Keywords: dataloss, regression)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a1) Gecko/20040522
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a1) Gecko/20040522

Although I have 'leave messages on server' with no time limit, and no other
expiration switches on, most mails I received from the server are deleted,
but not all. Some are left there, with no obvious rule, some deleted and 
left mails where received at about the same time. Since I counted on mails
being left on the server, I deleted them at home => mails where lost !


Reproducible: Always
Steps to Reproduce:
1.Download mails with 'Leave messages on server' (SSL connection)
2.Maybe delete some mails locally
3.Compare with what's left on the server (e.g., download again from another 
  location)

Actual Results:  
Most mails where deleted on server, but some where left for no obvious reason.


Expected Results:  
Leave ALL messages on server when told to do so.


I have two mail POP accounts, both are using SSL connection over port 995 with no 
authentication.
This is a regression from 1.7rc1 (I don't know if this is already present in 
1.7rc2, but I suspect that's specific to the trunk).
I sometimes have the impression that it uses 'delete when I'm deleting locally'
(although this is not switched on), but I've not confirmed that now.
Since this is a dataloss regression, it should block at least the final 1.8.
Keywords: dataloss, regression
How about "Until I delete or move mails from Inbox" setting?

Similar situation was reported for Thunderbird/Linux.
>Bug 236704
> Thunderbird under Linux deletes messages from POP3 server even with Leave
Messages on Server checked
Following is same comment to Bug 236704.

Protocol log is usualy required to analyze problem by developers.
See http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#pop and
attach protocol log for POP3.
Please do not forget to change SPR_LOG_MODULES=IMAP:5 to POP3:5 when pop3.

Attached is sample pop3 log when "Leave messages on server" is OFF.
If "Leave messages on server" is ON,
"RETR n" and/or "DELE n" is issued based on UIDLs passed by UIDL command and
UIDLs saved in popstate.dat during previous mail receive.
What does your pop protocol log say?

(Sample pop3 log)
> SEND: STAT
> RECV: +OK 3 4943
>
> SEND: LIST
> RECV: +OK 3 scanlists follows.
> RECV: 1 1639
> RECV: 2 1652
> RECV: 3 1652
> RECV: .
>
> SEND: UIDL
> RECV: +OK 3 unique-id follows.
> RECV: 1 cd3cd1bd97ebe132d4060ac8da7a44bf
> RECV: 2 2da189de6d46d0bab4d9e40a509e2e96
> RECV: 3 e0468bc2bf886b980f2170ba5eacd7d7
> RECV: .
>
> SEND: RETR n
> RECV: +OK Message 1 follows.
>       (Receive data of n-th mail)
> SEND: DELE n
> RECV: +OK Message 1 has been deleted.
>
> (Repeat RETR n/DELE n for all mails)
>
> SEND: QUIT
Ehm, how do I log a SSL connection ??
Ok,Ok, I see, settings also log SSL...
Here's the log, it contains a SEND: DELE 2 on retrieve if I received messages
before (it always seems to be 2) (authentication edited): 
1024[8075488]: Entering NET_ProcessPop3 87
1024[8075488]: POP3: Entering state: 1
1024[8075488]: POP3: Entering state: 2
1024[8075488]: POP3: Entering state: 4
1024[8075488]: RECV: +OK Microsoft Exchange 2000 POP3 server version 6.0.6487.0
(xxxxxxxxx) ready.
1024[8075488]: POP3: Entering state: 31
1024[8075488]: SEND: CAPA
1024[8075488]: Entering NET_ProcessPop3 75
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK Capability list follows
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: TOP
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: USER
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: PIPELINING
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: EXPIRE NEVER
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: UIDL
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: .
1024[8075488]: POP3: Entering state: 33
1024[8075488]: POP3: Entering state: 5
1024[8075488]: SEND: USER xxxxx
1024[8075488]: Entering NET_ProcessPop3 5
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK
1024[8075488]: POP3: Entering state: 34
1024[8075488]: POP3: Entering state: 6
1024[8075488]: Logging suppressed for this command (it probably contained
authentication information)
1024[8075488]: Entering NET_ProcessPop3 18
1024[8075488]: POP3: Entering state: 1
1024[8075488]: POP3: Entering state: 2
1024[8075488]: POP3: Entering state: 4
1024[8075488]: RECV: +OK Hello there.
1024[8075488]: POP3: Entering state: 31
1024[8075488]: SEND: CAPA
1024[8075488]: Entering NET_ProcessPop3 111
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK Here's what I can do:
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: TOP
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: USER
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: LOGIN-DELAY 10
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: PIPELINING
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: UIDL
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: IMPLEMENTATION Courier Mail Server
1024[8075488]: POP3: Entering state: 32
1024[8075488]: RECV: .
1024[8075488]: POP3: Entering state: 33
1024[8075488]: POP3: Entering state: 5
1024[8075488]: SEND: USER beanladen
1024[8075488]: Entering NET_ProcessPop3 34
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK User successfully logged on.
1024[8075488]: POP3: Entering state: 34
1024[8075488]: POP3: Entering state: 7
1024[8075488]: SEND: STAT
1024[8075488]: Entering NET_ProcessPop3 24
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK Password required.
1024[8075488]: POP3: Entering state: 34
1024[8075488]: POP3: Entering state: 6
1024[8075488]: Logging suppressed for this command (it probably contained
authentication information)
1024[8075488]: Entering NET_ProcessPop3 12
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK 2 4017
1024[8075488]: POP3: Entering state: 8
1024[8075488]: POP3: Entering state: 9
1024[8075488]: SEND: LIST
1024[8075488]: Entering NET_ProcessPop3 31
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK 2 4017
1024[8075488]: POP3: Entering state: 10
1024[8075488]: RECV: 1 2348
1024[8075488]: POP3: Entering state: 10
1024[8075488]: RECV: 2 1669
1024[8075488]: POP3: Entering state: 10
1024[8075488]: RECV: .
1024[8075488]: POP3: Entering state: 11
1024[8075488]: SEND: UIDL
1024[8075488]: Entering NET_ProcessPop3 16
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK logged in.
1024[8075488]: POP3: Entering state: 34
1024[8075488]: POP3: Entering state: 7
1024[8075488]: SEND: STAT
1024[8075488]: Entering NET_ProcessPop3 80
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK
1024[8075488]: POP3: Entering state: 12
1024[8075488]: RECV: 1 AAQCDSWAAAQEQ52suUoHHKUV3hVoApVo
1024[8075488]: POP3: Entering state: 12
1024[8075488]: RECV: 2 AAQIDSWAAAQEQ52suUoHHKUV3hVoApVo
1024[8075488]: POP3: Entering state: 12
1024[8075488]: RECV: .
1024[8075488]: POP3: Entering state: 15
1024[8075488]: POP3: Entering state: 15
1024[8075488]: POP3: Entering state: 20
1024[8075488]: SEND: DELE 2                     <============!!!!!!!!!!!!!!
1024[8075488]: Entering NET_ProcessPop3 9
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK 0 0
1024[8075488]: POP3: Entering state: 8
1024[8075488]: POP3: Entering state: 22
1024[8075488]: SEND: QUIT
1024[8075488]: Entering NET_ProcessPop3 5
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK
1024[8075488]: POP3: Entering state: 21
1024[8075488]: POP3: Entering state: 15
1024[8075488]: POP3: Entering state: 22
1024[8075488]: SEND: QUIT
1024[8075488]: Entering NET_ProcessPop3 14
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK Bye-bye.
To comment #2:
> If "Leave messages on server" is ON,
> "RETR n" and/or "DELE n" is issued based on UIDLs passed by UIDL command and
> UIDLs saved in popstate.dat during previous mail receive.
Do I understand that right ? DELE is send even if 'leave' is ON ? Why ?? It
shouldn't delete any messages, if I understand that option correctly.
There are at least three deletion options ;
[Serever Settings] 
 (1) For at most N days
 (2) Until I delete or move them from Inbox
[Message Filter]
 (3) Delete from POP server
And you said "2.Maybe delete some mails locally".

Since you said "with no time limit, and no other expiration switches on",
I think no above settings are checked or requested.
But clarifying your settings is important for problem analysis by developers.
(Q1) Question again. What is your settings of (2) ?

Other questions.

(Q2) Can you find mail for "2 AAQIDSWAAAQEQ52suUoHHKUV3hVoApVo", to which "DELE
2" was issued?   
     See your Inbox folder file and search "X-UIDL:
AAQIDSWAAAQEQ52suUoHHKUV3hVoApVo".
     Are there multiple mails of same X-UIDL header?

(Q3) Can you see entry for above UIDL in popstat.dat?

(Q4) Are there duplicate UIDLs?
     See response to UIDL command in POP3 protocol log.
- Nothing set except 'Leave messages on server'. Checked also via about:config.
  Definitely off. But my second account (different server) does not have 
  'Leave' checked. Possible mixup of configuration settings ?
- Yes, XUID can be found ONCE in Inbox, and it's not on the server anymore.
- UID not found popstate.dat (but I used and restarted Mozilla today after 
                              the log)
  But there are several new entries with a preceding 'd'. Does that mean
  these were illegally deleted ?
  d AAwbDSWAAAQEQ52suUoHHKUV3hVoApVo 1086125311
  d AAAcDSWAAAQEQ52suUoHHKUV3hVoApVo 1086125311
  d AAgcDSWAAAQEQ52suUoHHKUV3hVoApVo 1086125312
  d AAQcDSWAAAQEQ52suUoHHKUV3hVoApVo 1086125312
  d AAAdDSWAAAQEQ52suUoHHKUV3hVoApVo 1086125312
  d AAwcDSWAAAQEQ52suUoHHKUV3hVoApVo 1086125312
  d AAQdDSWAAAQEQ52suUoHHKUV3hVoApVo 1086125313

- no duplicate UIDs in popstate.dat, nor in Inbox (as far as I can see),
  but excerpt from POP3 log shows this (tracing the mentioned UID):
1024[8075488]: POP3: Entering state: 12
1024[8075488]: RECV: 1 AAQCDSWAAAQEQ52suUoHHKUV3hVoApVo
1024[8075488]: POP3: Entering state: 12
1024[8075488]: RECV: 2 AAQDDSWAAAQEQ52suUoHHKUV3hVoApVo
1024[8075488]: POP3: Entering state: 12
1024[8075488]: RECV: 3 AAQIDSWAAAQEQ52suUoHHKUV3hVoApVo  <===
1024[8075488]: POP3: Entering state: 12
1024[8075488]: RECV: .
1024[8075488]: POP3: Entering state: 15
1024[8075488]: POP3: Entering state: 15
1024[8075488]: POP3: Entering state: 20
1024[8075488]: SEND: DELE 2                   <== first deletes 2 AAQDDSW..
...........
1024[8075488]: SEND: RETR 3                   <=== retrieves AAQIDSW..
1024[8075488]: Entering NET_ProcessPop3 1024
1024[8075488]: POP3: Entering state: 3
1024[8075488]: RECV: +OK
1024[8075488]: POP3: Entering state: 19
1024[8075488]: Opening message stream: MSG_IncorporateBegin  <== downloads it
........... until next mail retrieval
1024[8075488]: POP3: Entering state: 12
1024[8075488]: RECV: 1 AAQCDSWAAAQEQ52suUoHHKUV3hVoApVo
1024[8075488]: POP3: Entering state: 12
1024[8075488]: RECV: 2 AAQIDSWAAAQEQ52suUoHHKUV3hVoApVo      <===
1024[8075488]: POP3: Entering state: 12
1024[8075488]: RECV: .
1024[8075488]: POP3: Entering state: 15
1024[8075488]: POP3: Entering state: 15
1024[8075488]: POP3: Entering state: 20
1024[8075488]: SEND: DELE 2                      <===== and here it's deleted
1024[8075488]: Entering NET_ProcessPop3 9

So no duplicate here, but an unwanted DELE.
I think "d" in popstat.dat means "Already Downloaded".

Last question from me :
 Do you use "Delete from POP server" in Message Filter?
 Check your Message Filter definition and Filter log.

By the way, why always "DELE 2"? 


I've been getting dupes of this in Thunderbird. A very recent regression.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → mozilla1.8alpha2
maybe I broke this when I did the global inbox support - if that's true, it
would only be on the trunk builds, not in aviary or 1.7 builds. I'll go look.
yes, my bad, very sorry - fix upcoming.
Assignee: sspitzer → bienvenu
Status: ASSIGNED → NEW
Attached patch proposed fixSplinter Review
check if we're supposed to delete msgs from server on delete
Comment on attachment 149800 [details] [diff] [review]
proposed fix

this will need to be tweaked somewhat because I just noticed that pop3 delete
filters only work if you've set to delete msgs from server when deleted
locally...but I want to fix this first.
Attachment #149800 - Flags: superreview?(mscott)
Attachment #149800 - Flags: superreview?(mscott) → superreview+
Note: I've no message filters set except Junk filter (delete from Junk after 2 
days).
Is bug 244942 a dupe of this?
*** Bug 244942 has been marked as a duplicate of this bug. ***
yes, dup. Bug 245337 filed on pop3 delete action filters...this is fixed and fix
will be in tomorrow's builds.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Summary: Messages randomly deleted from POP server → Messages deleted locally are deleted from POP server, even if pref says not to.
Product: MailNews → Core
*** Bug 236704 has been marked as a duplicate of this bug. ***
Product: Core → MailNews Core
Summary: Messages deleted locally are deleted from POP server, even if pref says not to. → Messages deleted locally are deleted from POP server, even if pref is "leave messages on server"
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: