filter: ignore mails marked for deletion

This commit is contained in:
FliegendeWurst 2021-04-18 15:10:27 +02:00 committed by Arne Keller
parent 746b4b9023
commit 33bdff42fb

View File

@ -31,6 +31,9 @@ fn do_filtering(mailbox: &str, config: &str) -> Result<()> {
imap_session.select(mailbox)?;
for mail in mails {
if mail.has_flag2(TRASHED) || mail.has_flag2(DELETE) {
continue; // ignore mails marked for deletion
}
if let Some(action) = mailproc::handle(&mail, &[], &config) { // TODO: provide raw bytes
println!("{:?}", action.0);
println!(" matched {}", mail.subject);