Subject: server initiated auto-purge?

From: "Scott Phillips" <[email-masked]>
Date: Sat, 1 May 2004 22:02:08 -0700

Hello.

I'm sure this question has been answered a 1000 times, but I have
searched everywhere and can't find the answer.  Forgive me for my
noobishness.

Anyway, I run three IMAP servers with a couple hundred accounts each.
The powers that be have insisted that we standardize on Outlook 2000.  

The problem is that when users delete an email it naturally flags it
for deletion rather than deleting it directly (duh).  This of course has
led to some rather large mailstores.  In outlook express, this wasn't
a problem as you could perform expunge when the user changed folders.
However Outlook does not have this feature.

Given that my users go nuts if they lose thier word and excel
desktop shortcuts, I'm not going to be able to show them how to
hit the expung button in outlook each time before they logout.

So, is there a way that I can have the server perform an auto-expunge?
Or could I write a script to connect to server and
expunge messages as a specific user?

Thanks.
Scott.

---

From: Mark Crispin <[email-masked]>
Date: Sun, 2 May 2004 12:16:45 -0700 (PDT)

Most clients have an "expunge when quitting" option.  Perhaps Outlook has 
such an option.  If it doesn't, well...it's one more reason not to use 
Outlook.

It isn't *architectually* offensive for an expunge to be implicitly 
performed as a result of logging out.  In fact, that is how POP works. 
Nothing in the IMAP standard prohibits a server from doing this.

However, the world has evolved in a way that many users would be quite 
unhappy if an expunge is ever implicitly performed by a server, even at 
LOGOUT time.  Most users want client control over expunging.

I don't know of any server which offers this as a feature.  Thus, you 
would have to implement it yourself.

The simplest thing, if you are using UW imapd (as you seem to be), would 
be to change the mail_close() call in the LOGOUT handling code, e.g. 
change:
       else if (!strcmp (cmd,"LOGOUT")) {
 	if (arg) response = badarg;
 	else {			/* time to say farewell */
 	  server_init (NIL,NIL,NIL,SIG_IGN,SIG_IGN,SIG_IGN,SIG_IGN);
 	  if (lastsel) fs_give ((void **) &lastsel);
 	  if (state == OPEN) stream = mail_close (stream);
to something like
       else if (!strcmp (cmd,"LOGOUT")) {
 	if (arg) response = badarg;
 	else {			/* time to say farewell */
 	  server_init (NIL,NIL,NIL,SIG_IGN,SIG_IGN,SIG_IGN,SIG_IGN);
 	  if (lastsel) fs_give ((void **) &lastsel);
 				/* auto-expunge at LOGOUT time */
 	  if (state == OPEN) stream = mail_close_full (stream,CL_EXPUNGE);

I'm of two minds on this question.  I don't think that a user should 
delete a message if he is unwilling to face the possibility of an expunge 
happening.  But I also understand why users may want to logout without 
expunging.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

---

From: "Scott Phillips" <[email-masked]>
Date: Sun, 2 May 2004 14:16:19 -0700