Mercurial > dovecot > original-hg > dovecot-1.2
diff src/pop3/commands.c @ 2527:792b3209f705 HEAD
Make RETR mark the message seen.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 02 Sep 2004 13:48:35 +0300 |
parents | 255cea3e2331 |
children | c6cc163344c3 |
line wrap: on
line diff
--- a/src/pop3/commands.c Thu Sep 02 13:34:30 2004 +0300 +++ b/src/pop3/commands.c Thu Sep 02 13:48:35 2004 +0300 @@ -332,6 +332,7 @@ { struct fetch_context *ctx; struct mail *mail; + struct mail_full_flags seen_flag; ctx = i_new(struct fetch_context, 1); @@ -351,6 +352,13 @@ return; } + if (body_lines == (uoff_t)-1) { + /* mark the message seen with RETR command */ + memset(&seen_flag, 0, sizeof(seen_flag)); + seen_flag.flags = MAIL_SEEN; + (void)mail->update_flags(mail, &seen_flag, MODIFY_ADD); + } + ctx->body_lines = body_lines; if (body_lines == (uoff_t)-1) { client_send_line(client, "+OK %"PRIuUOFF_T" octets",