diff --git a/Cargo.lock b/Cargo.lock
index 86d701f..f06f6b7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1217,7 +1217,7 @@ dependencies = [
[[package]]
name = "email-lib"
version = "0.22.0"
-source = "git+https://git.sr.ht/~soywod/pimalaya#f413917f9110ef4eafe4a8423626b22e4391317e"
+source = "git+https://git.sr.ht/~soywod/pimalaya#01f7e96b55da8d46be00c2face31ee437e1c5c5a"
dependencies = [
"advisory-lock",
"anyhow",
diff --git a/config.sample.toml b/config.sample.toml
index c299fa4..ca1b709 100644
--- a/config.sample.toml
+++ b/config.sample.toml
@@ -16,11 +16,16 @@ signature-delim = "-- \n"
# Enable the synchronization for this account. Running the command
# `account sync example` will synchronize all folders and all emails
# to a local Maildir at `$XDG_DATA_HOME/himalaya/example`.
-sync.enable = true
+sync.enable = false
# Override the default Maildir path for synchronization.
sync.dir = "/tmp/himalaya-sync-example"
+# Filter folders to sync
+folder.sync.filter.include = ["INBOX"]
+# folder.sync.filter.exclude = ["All mails"]
+# folder.sync.filter = "all"
+
# Define main folder aliases
folder.alias.inbox = "INBOX"
folder.alias.sent = "Sent"
@@ -57,7 +62,7 @@ envelope.watch.received.notify.body = "{subject}"
message.send.backend = "smtp"
# Save a copy of sent messages to the sent folder.
-message.send.save-copy = true
+message.send.save-copy = false
# IMAP config
imap.host = "localhost"
diff --git a/src/account/command/check_up.rs b/src/account/command/check_up.rs
index 1015f81..3d35a6a 100644
--- a/src/account/command/check_up.rs
+++ b/src/account/command/check_up.rs
@@ -26,8 +26,11 @@ impl AccountCheckUpCommand {
printer.print_log("Checking configuration integrity…")?;
- let (toml_account_config, account_config) =
- config.clone().into_account_configs(account, true)?;
+ let (toml_account_config, account_config) = config.clone().into_account_configs(
+ account,
+ #[cfg(feature = "account-sync")]
+ true,
+ )?;
let used_backends = toml_account_config.get_used_backends();
printer.print_log("Checking backend context integrity…")?;
diff --git a/src/account/wizard.rs b/src/account/wizard.rs
index a032e4c..34f5c76 100644
--- a/src/account/wizard.rs
+++ b/src/account/wizard.rs
@@ -1,7 +1,7 @@
use anyhow::{bail, Result};
#[cfg(feature = "account-sync")]
-use dialoguer::{Confirm, Input};
-use email::account;
+use dialoguer::Confirm;
+use dialoguer::Input;
#[cfg(feature = "account-sync")]
use email::account::sync::config::SyncConfig;
use email_address::EmailAddress;
@@ -9,11 +9,12 @@ use std::str::FromStr;
#[cfg(feature = "account-sync")]
use crate::wizard_prompt;
+#[cfg(feature = "account-discovery")]
+use crate::wizard_warn;
use crate::{
backend::{self, config::BackendConfig, BackendKind},
message::config::{MessageConfig, MessageSendConfig},
ui::THEME,
- wizard_warn,
};
use super::TomlAccountConfig;
@@ -34,9 +35,14 @@ pub(crate) async fn configure() -> Result