don't protect recent messages from MaxMessages

while maildir has a clearly defined meaning of "recent" and for example
mutt handles it graciously, IMAP's definition is fubared to the point
that some servers (for example gmail) simply refuse to support it.
for symmetry reasons it is best to pretend that it doesn't exist at all.
it doesn't seem too useful anyway (the user can simply mark the messages
as read to allow pruning).
and last but not least, the man page of mbsync says nothing about
"recent", only "unread". unlike the isync man page, though.
This commit is contained in:
Oswald Buddenhagen 2013-11-08 12:05:08 +01:00
parent 6b7b2b1106
commit 15216947fb
2 changed files with 2 additions and 2 deletions

View File

@ -220,7 +220,7 @@ This is useful for mailboxes where you keep a complete archive on the server,
but want to mirror only the last messages (for instance, for mailing lists).
The messages that were the first to arrive in the mailbox (independently of the
actual date of the message) will be deleted first.
Messages that are flagged (marked as important) and recent messages will not be
Messages that are flagged (marked as important) and unread messages will not be
automatically deleted.
If \fIcount\fR is 0, the maximum number of messages is \fBunlimited\fR.
(Default: 0)

View File

@ -1380,7 +1380,7 @@ box_loaded( int sts, void *aux )
if (nflags & F_FLAGGED) {
/* Flagged messages are always kept. */
todel--;
} else if ((!(tmsg->status & M_RECENT) || (tmsg->flags & F_SEEN)) &&
} else if ((tmsg->flags & F_SEEN) &&
(todel > 0 ||
((srec->status & (S_EXPIRE|S_EXPIRED)) == (S_EXPIRE|S_EXPIRED)) ||
((srec->status & (S_EXPIRE|S_EXPIRED)) && (tmsg->flags & F_DELETED)))) {