Subject: Modify email header on a IMAP server

From: "swalker" <[email-masked]>
Date: Mon, 24 Dec 2001 10:38:21 -0600

Is there anyway to modify a email message header on the IMAP server?  I
need to add my own header and value to a email header.

Thanks,
Shawn

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

---

From: Vadim Zeitlin <[email-masked]>
Date: Mon, 24 Dec 2001 17:45:22 +0100 (Romance Standard Time)

On Mon, 24 Dec 2001 10:38:21 -0600 swalker <[email-masked]> wrote:

s> Is there anyway to modify a email message header on the IMAP server?  I
s> need to add my own header and value to a email header.

 To the best of my knowledge, you can't modify the message in place. You
may delete it and create a new one containing all the original headers plus
your new one in addition though.

 Regards,
VZ

---

From: "swalker" <[email-masked]>
Date: Mon, 24 Dec 2001 11:48:50 -0600

Sent: Monday, December 24, 2001 10:45 AM

> s> Is there anyway to modify a email message header on the IMAP
server?  
> s> I need to add my own header and value to a email header.
> 
>  To the best of my knowledge, you can't modify the message in place.
You may delete it and create a new one > containing all the original
headers plus your new one in addition though.
> VZ

That is what I have been doing, copying the orignal message and adding
my own header to the email header and call mail_append_full() and then
delete the "old" message.  What I was hoping was that I could just
modify the  header so that the UID doesn't change.  I will just have to
deal with just getting the new UID when I get a notify message.

Thanks,
Shawn

---

From: Mark Crispin <[email-masked]>
Date: Mon, 24 Dec 2001 09:53:42 -0800 (PST)

On Mon, 24 Dec 2001 11:48:50 -0600, swalker wrote:
> What I was hoping was that I could just
> modify the  header so that the UID doesn't change.

That would defeat the entire purpose of UIDs if it were allowed.

---

From: "swalker" <[email-masked]>
Date: Mon, 24 Dec 2001 12:02:36 -0600

> Sent: Monday, December 24, 2001 11:54 AM
> 

Well, I know that the if a new message was put on the IMAP server a new
UID would be created.  But what I was hoping was for the IMAP server to
be able to just modify the message on the server and that the UID would
never change for that message.  That way I don't have to just copy a
email to modify the email header and add a new message on the IMAP
server and delete the old one.

So, I'm just going copy the email, modify it and mail_append_full() and
delete the old one and get the new UID.

Shawn

---

From: "swalker" <[email-masked]>
Date: Thu, 27 Dec 2001 12:32:18 -0600

When I call mail_uid(), message number 1 and 2 always return the same
UID.  Is there a bug or something?  Or am I'm doing something wrong?

Thanks,
Shawn

---

From: Mark Crispin <[email-masked]>
Date: Thu, 27 Dec 2001 12:46:03 -0800 (PST)

> UID.  Is there a bug or something?  Or am I'm doing something wrong?

It shouldn't.  What driver/mailbox format?

---

From: "swalker" <[email-masked]>
Date: Thu, 27 Dec 2001 14:57:24 -0600

> Sent: Thursday, December 27, 2001 2:46 PM
> 

I'm using IMAP4.

---

From: Mark Crispin <[email-masked]>
Date: Thu, 27 Dec 2001 13:43:30 -0800 (PST)

On Thu, 27 Dec 2001 14:57:24 -0600, swalker wrote:
> > > When I call mail_uid(), message number 1 and 2 always return the
> > > same UID.

What server (as in what implementation)?  What are you getting mail from
mail_uid()?