From 1debab580bc85de15344d3d7293f92403644d5ba Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Sun, 20 May 2001 20:50:06 +0000 Subject: [PATCH] \Seen for FCCs. From Brendan Cully. --- imap/message.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/imap/message.c b/imap/message.c index ff70ca7cd..a1fe061a8 100644 --- a/imap/message.c +++ b/imap/message.c @@ -447,6 +447,12 @@ int imap_append_message (CONTEXT *ctx, MESSAGE *msg) goto fail; } + /* currently we set the \Seen flag on all messages, but probably we + * should scan the message Status header for flag info. Since we're + * already rereading the whole file for length it isn't any more + * expensive (it'd be nice if we had the file size passed in already + * by the code that writes the file, but that's a lot of changes. + * Ideally we'd have a HEADER structure with flag info here... */ for (last = EOF, len = 0; (c = fgetc(fp)) != EOF; last = c) { if(c == '\n' && last != '\r') @@ -457,7 +463,7 @@ int imap_append_message (CONTEXT *ctx, MESSAGE *msg) rewind (fp); imap_munge_mbox_name (mbox, sizeof (mbox), mailbox); - snprintf (buf, sizeof (buf), "APPEND %s {%d}", mbox, len); + snprintf (buf, sizeof (buf), "APPEND %s (\\Seen) {%d}", mbox, len); imap_cmd_start (idata, buf); -- 2.40.0