diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2001-05-20 20:50:06 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2001-05-20 20:50:06 +0000 |
commit | ddc069233ee7cf7536dac2da9970f714e592ad3a (patch) | |
tree | 248aa43661d4094720a0f0d7b91133fb78f09162 | |
parent | 7f51a921d01935a492765fb917348692a29bc1fe (diff) |
\Seen for FCCs. From Brendan Cully.
-rw-r--r-- | imap/message.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/imap/message.c b/imap/message.c index ff70ca7c..a1fe061a 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); |