From 7e7d6b616e57e850b96745f07ce96e5432713acb Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Tue, 20 Apr 2021 13:49:18 +0200 Subject: [PATCH] sync: download metadata selectively --- src/bin/sync.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/sync.rs b/src/bin/sync.rs index 981caac..45e5535 100644 --- a/src/bin/sync.rs +++ b/src/bin/sync.rs @@ -46,6 +46,10 @@ fn sync( for &name in &names { let mailbox = name.name(); + // if the user specified some mailboxes, only process those + if !mailboxes.is_empty() && !mailboxes.contains(&mailbox) { + continue; + } println!("indexing {}", mailbox); let resp = imap_session.examine(mailbox)?; let uid_validity = resp.uid_validity.unwrap();