Fix #2429 (message was downloaded multiple times a second), add test (#2430)

The problem was:

If a message has the \Deleted flag set, we ignore it. But we forgot to
update last_uid, so that uid_next was not updated at 47e639b777/src/imap.rs (L730) and the same message was
fetched over and over again.

Fix #2429
This commit is contained in:
Hocuri
2021-05-09 18:43:55 +02:00
committed by GitHub
parent adac903818
commit 1c436777e0
2 changed files with 46 additions and 1 deletions

View File

@@ -925,7 +925,11 @@ impl Imap {
let is_deleted = msg.flags().any(|flag| flag == Flag::Deleted);
if is_deleted || msg.body().is_none() {
// No need to process these.
info!(
context,
"Not processing deleted or empty msg {}", server_uid
);
last_uid = Some(server_uid);
continue;
}