isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 15216947fbc1a385d9dcca9e61bccd77ed86b58a
parent 6b7b2b11063ef32a3d40624d212c30d5f9ac995f
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Fri,  8 Nov 2013 12:05:08 +0100

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.

Diffstat:
Msrc/compat/isync.1 | 2+-
Msrc/sync.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compat/isync.1 b/src/compat/isync.1 @@ -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) diff --git a/src/sync.c b/src/sync.c @@ -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)))) {