|
|
@ -79,6 +79,7 @@ pub type UIDVALIDITY = UID;
|
|
|
|
pub type MessageSequenceNumber = ImapNum;
|
|
|
|
pub type MessageSequenceNumber = ImapNum;
|
|
|
|
|
|
|
|
|
|
|
|
pub static SUPPORTED_CAPABILITIES: &[&str] = &[
|
|
|
|
pub static SUPPORTED_CAPABILITIES: &[&str] = &[
|
|
|
|
|
|
|
|
"AUTH=ANONYMOUS",
|
|
|
|
"AUTH=OAUTH2",
|
|
|
|
"AUTH=OAUTH2",
|
|
|
|
"COMPRESS=DEFLATE",
|
|
|
|
"COMPRESS=DEFLATE",
|
|
|
|
"CONDSTORE",
|
|
|
|
"CONDSTORE",
|
|
|
@ -257,6 +258,7 @@ impl MailBackend for ImapType {
|
|
|
|
deflate,
|
|
|
|
deflate,
|
|
|
|
condstore,
|
|
|
|
condstore,
|
|
|
|
oauth2,
|
|
|
|
oauth2,
|
|
|
|
|
|
|
|
auth_anonymous,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} = self.server_conf.protocol
|
|
|
|
} = self.server_conf.protocol
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -298,6 +300,15 @@ impl MailBackend for ImapType {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
"AUTH=ANONYMOUS" => {
|
|
|
|
|
|
|
|
if auth_anonymous {
|
|
|
|
|
|
|
|
*status = MailBackendExtensionStatus::Enabled { comment: None };
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
*status = MailBackendExtensionStatus::Supported {
|
|
|
|
|
|
|
|
comment: Some("Disabled by user configuration"),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
_ => {
|
|
|
|
_ => {
|
|
|
|
if SUPPORTED_CAPABILITIES
|
|
|
|
if SUPPORTED_CAPABILITIES
|
|
|
|
.iter()
|
|
|
|
.iter()
|
|
|
@ -1339,6 +1350,7 @@ impl ImapType {
|
|
|
|
condstore: get_conf_val!(s["use_condstore"], true)?,
|
|
|
|
condstore: get_conf_val!(s["use_condstore"], true)?,
|
|
|
|
deflate: get_conf_val!(s["use_deflate"], true)?,
|
|
|
|
deflate: get_conf_val!(s["use_deflate"], true)?,
|
|
|
|
oauth2: use_oauth2,
|
|
|
|
oauth2: use_oauth2,
|
|
|
|
|
|
|
|
auth_anonymous: get_conf_val!(s["use_auth_anonymous"], false)?,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
timeout,
|
|
|
|
timeout,
|
|
|
@ -1608,6 +1620,7 @@ impl ImapType {
|
|
|
|
get_conf_val!(s["use_idle"], true)?;
|
|
|
|
get_conf_val!(s["use_idle"], true)?;
|
|
|
|
get_conf_val!(s["use_condstore"], true)?;
|
|
|
|
get_conf_val!(s["use_condstore"], true)?;
|
|
|
|
get_conf_val!(s["use_deflate"], true)?;
|
|
|
|
get_conf_val!(s["use_deflate"], true)?;
|
|
|
|
|
|
|
|
get_conf_val!(s["use_auth_anonymous"], false)?;
|
|
|
|
let _timeout = get_conf_val!(s["timeout"], 16_u64)?;
|
|
|
|
let _timeout = get_conf_val!(s["timeout"], 16_u64)?;
|
|
|
|
let extra_keys = s
|
|
|
|
let extra_keys = s
|
|
|
|
.extra
|
|
|
|
.extra
|
|
|
|