[FEATURE] Empty Trash on Exit for POP3 and IMAP



20 years ago
11 years ago


(Reporter: laurel, Assigned: jefft)


Firefox Tracking Flags

(Not tracked)


(Whiteboard: [nsbeta2+][5/16]?? days -- stuck, need a service ensure imap empty trash finished prior shutdown)


(1 attachment)



20 years ago
The current Account Setup spec indicates POP mail server panel will have a pref
for Empty Trash on Exit.   Via comments in bug #14087 alecf indicated this will
indeed be implemented at some point in seamonkey. This is a tracking bug.

The pref was in 4.x only for IMAP servers, not available in POP prefs.
The pref is located in the mail server panel, 4.x in prefs dialog and seamonkey
in Account Setup dialog.


20 years ago
Target Milestone: M15

Comment 1

20 years ago
Assign to jefft, cc bienvenu and mscott. Not a B1 feature, so setting M15.


20 years ago
Assignee: phil → jefft


20 years ago
Doesn't work for me with IMAP either. Per the alecf's comment, I assume, it

isn't implemented at all. Am I correct? If yes, we should change the summary.

*** Bug 29783 has been marked as a duplicate of this bug. ***


19 years ago
Summary: [FEATURE] Empty Trash on Exit for POP3 → [FEATURE] Empty Trash on Exit for POP3 and IMAP


19 years ago
Priority: P3 → P2
Whiteboard: ETA 04/07/00


19 years ago
QA Contact: lchiang → huang

Comment 4

19 years ago
jglick, do we have a pref design for Empty Trash On Exit for Pop3 accout?

Comment 5

19 years ago
move to M16.  Not M15 stoppers
Target Milestone: M15 → M16

Comment 7

19 years ago
Empty trash on exit for Imap seems not that easy to do because of the nature of 
the asynchronous operation plus the connection caching. I thought I could empty 
the trash prior the account manager close down all cached connections. However, 
this is not working at the moment. Although I implemented the nsIUrlListner for 
nsImapIncomingserver. OnStartRunningUrl and OnStopRunningUrl never get hit.

Comment 8

19 years ago
Hey Jeff, if you aren't seeing the on start and on stop calls for the url
listener you implemented, maybe it isn't getting attached to the url you are
interested in? What url is getting run that you want to be a listener on? I
maybe be able to help you debug this part if you need it.

Comment 9

19 years ago
I am sure that the url listener is getting added correctly to the url listener 
manager. I'll look into more.

Comment 10

19 years ago
As I understand it, Jeff is running this url as the app is exiting. Highly 
unlikely that it gets to run.

Comment 11

19 years ago
Oh dear. I see. Yes in that case there's a strong chance the url isn't getting
run so we wouldn't see the on stop and on start calls.

Comment 12

19 years ago
Created attachment 7492 [details] [diff] [review]
A partial fix.

Comment 13

19 years ago
I am basically stocked on this one. I need to find a way to ensure that the 
async imap empty trash to finish prior shutting down the app. Low priority for 
the feature now...
Priority: P2 → P4
Whiteboard: ETA 04/07/00 → ETA 04/07/00 -- stocked, need a service ensure imap empty trash finished prior shutdown

Comment 14

19 years ago
Jeff - P4 priority means that the feature won't be in the product when it ships. 
Will this feature make it?  
Whiteboard: ETA 04/07/00 -- stocked, need a service ensure imap empty trash finished prior shutdown → ETA 04/07/00 -- stuck, need a service ensure imap empty trash finished prior shutdown

Comment 15

19 years ago
I don't know. The workaround is manually doing it. This is sort of an 
architeture issue. I don't have a solution yet.
> The workaround is manually doing it.

That's a workaround for beta quality, but not for a final product. Without this
feature, the Trash delete model is useless. (Compare Windows Explorer: I always
delete and immediately empty trashcan - *very* annoying.)

I understand the problem, but we should make sure, it is resolved for final. Who
is the relevant developer, so I can bug him (or dance on his head, if necessary
;-) )? Is there a bug filed on that?

Comment 17

19 years ago
No, there is no bug filed and it's not a final decision yet. dp would be 
the person to start with.

Comment 18

19 years ago
I can file a bug on DP, but I don't know what it should say.  Then, we can make 
this bug dependent on that one.  Ben - want to file the bug?


19 years ago
Depends on: 35704


19 years ago
Whiteboard: ETA 04/07/00 -- stuck, need a service ensure imap empty trash finished prior shutdown → ?? days -- stuck, need a service ensure imap empty trash finished prior shutdown
beta2 nomination (not sure, if [FEATURE] implies that)
Keywords: nsbeta2

Comment 20

19 years ago
I've talked about this issue with bienvenu - I don't think we need anything from 
DP on this - I think we need to be notified when the last mail window goes away, 
which we should know from the mail session, which tracks nsIMsgWindows.

Comment 21

19 years ago
I am afraid this won't work if the user quits from the browser window. It works 
only when we still have the browser window open.

Comment 22

19 years ago
if that's not working them something in our architecture is broken. It should 
not matter what window you quit from.

When the user quits, all windows should all close, and the onunload handlers 
should all fire. Each unload handler in each mail window should unregister the 
associated nsIMsgWindow object. When that list reaches zero, we should have some 
sort of notification system which tells us that everything has shut down.

Comment 23

19 years ago
The problem is really asynchoronous operation. No one waits for us to complete 
unless there is a mechnism in place. See 35704 for some explanation.

Comment 24

19 years ago
oh! I see what you're saying. that's quite a conundrum.

Comment 25

19 years ago
Putting on [nsbeta2+][5/16] radar.  This is a feature MUST complete work by 
05/16 or we may pull this feature for PR2.
Whiteboard: ?? days -- stuck, need a service ensure imap empty trash finished prior shutdown → [nsbeta2+][5/16]?? days -- stuck, need a service ensure imap empty trash finished prior shutdown

Comment 26

19 years ago
I have found a way to fix this. Fix checked in.
Last Resolved: 19 years ago
Resolution: --- → FIXED
Cool! How did you solve the problem?

Comment 28

19 years ago
It's kind of hack. I guess depends on how you view it. Apparently, as dp and 
waterson pointed out the event queue isn't dead at the moment when xp-shutdown 
notification were sent out. What I did was using PR_CMonitorEnter(), 
PR_CMonitorExit(), PR_CWait() and ProcessPendingEvent() along with 
the nsIUrlListener interface to do the trick.

Comment 29

19 years ago
By using 05-18-08-M16 commercial build.
It seems that the UI "Empty Trash on Exit" for POP3 & IMAP still not implement 
yet from account setup UI.
This bug is logged for backend.
Jeff, would you provide the verification for me to verify this bug?


Comment 30

19 years ago
UI is implemented but have problems with getting/setting the value. Add the 
following pref to your prefs.js

user_pref("mail.server.server1.empty_trash_on_exit", true);

Comment 31

19 years ago
Sorry for the delay....I actually already verified on WinNT & Linux 
platforms....but since this bug need to verified on all the platform....(I had 
problem for my Mac 9.0 machine)...

Finally, verified on all the platforms by using:
WinNT 05-19-09-M16 commercial build
Linux 05-19/22-08-M16 commercial build 
Mac 05-22-08-M16 commercial build
Marking as verified.

Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.