sync: download metadata selectively

This commit is contained in:
FliegendeWurst 2021-04-20 13:49:18 +02:00 committed by Arne Keller
parent 33bdff42fb
commit 7e7d6b616e

View File

@ -46,6 +46,10 @@ fn sync(
for &name in &names { for &name in &names {
let mailbox = name.name(); let mailbox = name.name();
// if the user specified some mailboxes, only process those
if !mailboxes.is_empty() && !mailboxes.contains(&mailbox) {
continue;
}
println!("indexing {}", mailbox); println!("indexing {}", mailbox);
let resp = imap_session.examine(mailbox)?; let resp = imap_session.examine(mailbox)?;
let uid_validity = resp.uid_validity.unwrap(); let uid_validity = resp.uid_validity.unwrap();