mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 21:06:31 +03:00
fix: Still try to create "INBOX.DeltaChat" if couldn't create "DeltaChat" (#5870)
It appeared that some servers require namespace-style names for folders created via IMAP, like
"INBOX.DeltaChat". This partially reverts 05c256dd5b.
This commit is contained in:
11
src/imap.rs
11
src/imap.rs
@@ -1510,8 +1510,8 @@ impl Session {
|
|||||||
|
|
||||||
/// Attempts to configure mvbox.
|
/// Attempts to configure mvbox.
|
||||||
///
|
///
|
||||||
/// Tries to find any folder in the given list of `folders`. If none is found, tries to create
|
/// Tries to find any folder examining `folders` in the order they go. If none is found, tries
|
||||||
/// `folders[0]`. This method does not use LIST command to ensure that
|
/// to create any folder in the same order. This method does not use LIST command to ensure that
|
||||||
/// configuration works even if mailbox lookup is forbidden via Access Control List (see
|
/// configuration works even if mailbox lookup is forbidden via Access Control List (see
|
||||||
/// <https://datatracker.ietf.org/doc/html/rfc4314>).
|
/// <https://datatracker.ietf.org/doc/html/rfc4314>).
|
||||||
///
|
///
|
||||||
@@ -1545,9 +1545,9 @@ impl Session {
|
|||||||
if !create_mvbox {
|
if !create_mvbox {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
let Some(folder) = folders.first() else {
|
// Some servers require namespace-style folder names like "INBOX.DeltaChat", so we try all
|
||||||
return Ok(None);
|
// the variants here.
|
||||||
};
|
for folder in folders {
|
||||||
match self.select_with_uidvalidity(context, folder).await {
|
match self.select_with_uidvalidity(context, folder).await {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
info!(context, "MVBOX-folder {} created.", folder);
|
info!(context, "MVBOX-folder {} created.", folder);
|
||||||
@@ -1557,6 +1557,7 @@ impl Session {
|
|||||||
warn!(context, "Cannot create MVBOX-folder {:?}: {}", folder, err);
|
warn!(context, "Cannot create MVBOX-folder {:?}: {}", folder, err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user