Add the ENABLE capability, reduce wild logging
This commit is contained in:
parent
1d84b0ffd0
commit
35fd24ee46
3 changed files with 10 additions and 0 deletions
|
@ -22,6 +22,7 @@ impl Default for ServerCapability {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self(HashSet::from([
|
Self(HashSet::from([
|
||||||
Capability::Imap4Rev1,
|
Capability::Imap4Rev1,
|
||||||
|
Capability::Enable,
|
||||||
Capability::Move,
|
Capability::Move,
|
||||||
Capability::LiteralPlus,
|
Capability::LiteralPlus,
|
||||||
capability_unselect(),
|
capability_unselect(),
|
||||||
|
|
|
@ -39,7 +39,11 @@ impl Mailbox {
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @FIXME reporting through opentelemetry or some logs
|
||||||
|
// info on the "shape" of the mailbox would be welcomed
|
||||||
|
/*
|
||||||
dump(&uid_index);
|
dump(&uid_index);
|
||||||
|
*/
|
||||||
|
|
||||||
let mbox = RwLock::new(MailboxInternal {
|
let mbox = RwLock::new(MailboxInternal {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -71,10 +71,15 @@ impl User {
|
||||||
/// Opens an existing mailbox given its IMAP name.
|
/// Opens an existing mailbox given its IMAP name.
|
||||||
pub async fn open_mailbox(&self, name: &str) -> Result<Option<Arc<Mailbox>>> {
|
pub async fn open_mailbox(&self, name: &str) -> Result<Option<Arc<Mailbox>>> {
|
||||||
let (mut list, ct) = self.load_mailbox_list().await?;
|
let (mut list, ct) = self.load_mailbox_list().await?;
|
||||||
|
|
||||||
|
//@FIXME it could be a trace or an opentelemtry trace thing.
|
||||||
|
// Be careful to not leak sensible data
|
||||||
|
/*
|
||||||
eprintln!("List of mailboxes:");
|
eprintln!("List of mailboxes:");
|
||||||
for ent in list.0.iter() {
|
for ent in list.0.iter() {
|
||||||
eprintln!(" - {:?}", ent);
|
eprintln!(" - {:?}", ent);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if let Some((uidvalidity, Some(mbid))) = list.get_mailbox(name) {
|
if let Some((uidvalidity, Some(mbid))) = list.get_mailbox(name) {
|
||||||
let mb = self.open_mailbox_by_id(mbid, uidvalidity).await?;
|
let mb = self.open_mailbox_by_id(mbid, uidvalidity).await?;
|
||||||
|
|
Loading…
Reference in a new issue