Subject: Setting deleted flag before delivery

From: Steinar Kaaro <[email-masked]>
Date: Fri, 04 Feb 2005 14:02:59 +0100

Hello,
I'm using dmail to deliver mail to some shared folders (mbx). I would like 
to set the deleted flag on certain messages before they are delivered. 
dmail does not seem to have an option for doing this. From what I've found, 
the flags are kept in the X-Status header. Thus I tried doing something 
like this in procmail:

|formail -i "X-Status: D"|dmail "+#shared/sharedbox"

The header is added to the messages, but it has no effect. Is it possible 
to do something like this?

--
regards
Steinar Kaarø
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Fri, 4 Feb 2005 09:29:08 -0800 (PST)

The short answer is: there is no option to deliver a message as deleted. 
As you discovered, your hack with X-Status won't work, especially not with 
messages in formats other than traditional UNIX (since X-Status is only 
with traditional UNIX format).

To do it right, you'll have to add a switch to dmail to set \Deleted, that 
works much like the existing -s switch that sets \Seen.

However, I question why you want to do this.  What's the point of 
delivering a message if it's going to be deleted?

-- Mark --

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

---

From: Steinar Kaaro <[email-masked]>
Date: Sat, 05 Feb 2005 00:07:21 +0100

--On Friday, February 04, 2005 09:29:08 AM -0800 Mark Crispin 
<[email-masked]> wrote:

> As you discovered, your hack with X-Status won't work, especially not
> with messages in formats other than traditional UNIX (since X-Status is
> only with traditional UNIX format).
>
> To do it right, you'll have to add a switch to dmail to set \Deleted,
> that works much like the existing -s switch that sets \Seen.
>
I kind of expected this answer, but I had to ask.

> delivering a message if it's going to be deleted?
It's a long story: The messages have been filtered, and inserted into a 
database system for further manual processing before being delivered to the 
shared box. Sometimes the processing in the database system fails, and 
there is a need to reply to some of the messages. Since there are a lot of 
other types of messages being delivered to the same box, I came up with the 
idea of flagging the filtered messages as deleted. This would make it easy 
for the users to separate them. I can of course deliver them to a separate 
box, but since it's a large number of boxes, the flagging would keep things 
a bit simpler.
In general I think it would be nice to be able to manipulate all the IMAP 
flags before delivery (not only the seen-flag).

Thank you for a great product, and excellent support.

Steinar