Closed Bug 89463 Opened 23 years ago Closed 23 years ago

When I send a message I get a copy of the message in my temp directory

Categories

(MailNews Core :: Composition, defect, P2)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.3

People

(Reporter: msanz, Assigned: naving)

References

Details

(Whiteboard: [PDT+])

Attachments

(2 files)

Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.2) Gecko/20010705 Netscape6/6.1 
using POP
When I send a message, I get a copy of it in my temp directory. My preferences
are set to store a copy in my sent folder, not to temp.
.
Assignee: mscott → ducarroz
Component: Mail Back End → Composition
QA Contact: esther → sheelar
using build id:  2001070604 
I see this problem on win98 too. Every message sent and received leaves a copy 
in the windows temp folder. This is including a text mssg, mssg sent with 
attachment too.  Temp folder might really get too big very soon. There should be 
no need to keep a copy of the message that gets sent in the temp folder.  
There was a bug regarding forwarding emails with attachments did not clean up 
temp folder which was fixed a while ago. But now it could be even a simple text 
message too.  
I did not see anything getting created when sending from an imap account and 
only in pop.
Sounds to me that this would be cause a security issue.
Cavin, could you look into this since you solved a number of the other temp
message bugs.
Assignee: ducarroz → cavin
I see this leak only when you have a copy to a local folder set in the account
manager. The problem wont occur if you turn of the copy of set a copy to an imap
folder.
Yes, this happens only when the sent folder is on local.  I figured out where 
the problem is:

In nsMsgLocalMailFolder::EndCopy(),

  copyService->NotifyCompletion(srcSupport, this, rv);

doesn't get called if 'listener' is set. As a result, the refcnts for some of 
the objects are not decremented, especially the one for nsMsgComposeAndSend 
because we remove temp files in the destructor of nsMsgComposeAndSend.

Navin, I remeber you changed the code to fix bug #75936 (I think) initially and 
we had to change it to the way it's now to fix bug #85921 (save draft to local 
doesn't work). Now it seems like that the fix breaks this case again, so let's 
talk about it tomorrow to come out with a solution which would fix all 3 
scenarios.
Navin and I have come out with a fix for all 3 scenarios. Need more testing 
before checking in the code.  Reassign it to Navin.
Assignee: cavin → naving
adding nsbranch as a possiblity.
Keywords: nsBranch
Priority: -- → P2
Target Milestone: --- → mozilla0.9.3
Attached patch proposed fixSplinter Review
So I have tested online stuff from 3 pane and search window for move/copy 
from menus and D&D where destination is imap and src is news imap and local.
Also cavin has tested all compose scenarios. Offline stuff yet to be tested. 

The fix is to remove the copyService use from the compose code and directly 
call copy on destFolder. Also remove mCopylistener from the imapMailFolder and 
use the copy of listener in copyState, because this introduces a leak and tmp 
files are not deleted. cc bienvenu for review. 
If you get the reviews, it would be great to get it on the trunk in time for
tomorrow's build.  Then we really need to test this!
r=bienvenu, but really only testing will determine if this fix works. I think
even things like compacting offline stores will need to be tested here, as well
as offline copy, etc.
fix checked on trunk. 
checked offline imap copy and compactofflineStores still works. 
Keywords: vtrunk
*** Bug 89776 has been marked as a duplicate of this bug. ***
*** Bug 90713 has been marked as a duplicate of this bug. ***
Things Sheela and I have tested for (Sheela tested Win98, I tested Mac OS 9.1
and RedHat Linux 7.1):

On all of these operations, we tested Copy and Move, seperately:

News -> IMAP, News -> Local, IMAP -> Local, IMAP -> IMAP, File Carbon Copy to
Local, FCC to IMAP, Templates (local/IMAP), Drafts (local/IMAP).  Navin says
this code won't affect POP, but Offline I still need to test.

We used context menus, File menus, and Drag & Drop.

Builds we used were:

Mac OS 9.1 - 2001-07-13-09
RedHat 7.1 - 2001-07-13-08
Windows 98 - 2001-07-13-04

I believe we also need to explicitly test now for Offline & the presence/absence
of the Temp files.  

Those will be in:

Windows - C:\<OS install dir>\Temp or C:\<OS install dir>\ TMP (or, user defined)

Linux - /home/username/tmp (and possibly in sub-dirs)

Mac OS - Probably in the user's profile?  I'm not sure though.
Okay, going offline, doing a copy, and then going back online and reading the 
message works fine on the builds/platforms mentioned above.
OK, we making this trunkverified
pdt+ per pdt email.
navin, when you mark this fixed, please remove the vtrunk keyword. Thanks.
Whiteboard: [PDT+]
Can this be checked in on the branch today?
Whiteboard: [PDT+] → [PDT+] patch ready
sure, I will do it today. 
fix checked in. 
Status: NEW → RESOLVED
Closed: 23 years ago
Keywords: vtrunk
Resolution: --- → FIXED
Whiteboard: [PDT+] patch ready → [PDT+]
Cool.  This is fine so far (haven't tested Mac yet).  No temp files exist in:

C:\WINNT\temp  on Windows 2000 using build 2001-07-17-05-0.9.2
/home/stephend/tmp on RedHat Linux 7.1 using build 2001-07-07-04-0.9.2

Any ideas on how to check Macintosh?  Aren't they invisible files or something?
 (Have to check using some Sherlock 2 foo, I'm sure.)
On the mac, the "temporary items" folder is automatically flushed when the computer start. The only way to check 
with Sherlock, is to now part of the filename you are looking for.
That linux build above should've been: 2001-07-17-04-0.9.2

Is that even possible to test, since we salt temp file names? 
Verified FIXED using the 2001-07-23-03-0.9.2 branch build on JFD's machine
(which was setup to view temp files). 
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: