mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 01:46:30 +03:00
Fix nightly clippy and rustc errors
This commit is contained in:
@@ -3603,6 +3603,7 @@ pub unsafe extern "C" fn dc_provider_get_status(provider: *const dc_provider_t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
#[allow(clippy::needless_return)]
|
||||||
pub unsafe extern "C" fn dc_provider_unref(provider: *mut dc_provider_t) {
|
pub unsafe extern "C" fn dc_provider_unref(provider: *mut dc_provider_t) {
|
||||||
if provider.is_null() {
|
if provider.is_null() {
|
||||||
eprintln!("ignoring careless call to dc_provider_unref()");
|
eprintln!("ignoring careless call to dc_provider_unref()");
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ fn parse_server<B: BufRead>(
|
|||||||
MozConfigTag::Username => username = Some(val),
|
MozConfigTag::Username => username = Some(val),
|
||||||
MozConfigTag::Sockettype => {
|
MozConfigTag::Sockettype => {
|
||||||
sockettype = match val.to_lowercase().as_ref() {
|
sockettype = match val.to_lowercase().as_ref() {
|
||||||
"ssl" => Socket::SSL,
|
"ssl" => Socket::Ssl,
|
||||||
"starttls" => Socket::STARTTLS,
|
"starttls" => Socket::Starttls,
|
||||||
"plain" => Socket::Plain,
|
"plain" => Socket::Plain,
|
||||||
_ => Socket::Automatic,
|
_ => Socket::Automatic,
|
||||||
}
|
}
|
||||||
@@ -233,8 +233,8 @@ fn parse_serverparams(in_emailaddr: &str, xml_raw: &str) -> Result<Vec<ServerPar
|
|||||||
.chain(moz_ac.outgoing_servers.into_iter())
|
.chain(moz_ac.outgoing_servers.into_iter())
|
||||||
.filter_map(|server| {
|
.filter_map(|server| {
|
||||||
let protocol = match server.typ.as_ref() {
|
let protocol = match server.typ.as_ref() {
|
||||||
"imap" => Some(Protocol::IMAP),
|
"imap" => Some(Protocol::Imap),
|
||||||
"smtp" => Some(Protocol::SMTP),
|
"smtp" => Some(Protocol::Smtp),
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
Some(ServerParams {
|
Some(ServerParams {
|
||||||
@@ -276,10 +276,10 @@ mod tests {
|
|||||||
fn test_parse_outlook_autoconfig() {
|
fn test_parse_outlook_autoconfig() {
|
||||||
let xml_raw = include_str!("../../test-data/autoconfig/outlook.com.xml");
|
let xml_raw = include_str!("../../test-data/autoconfig/outlook.com.xml");
|
||||||
let res = parse_serverparams("example@outlook.com", xml_raw).expect("XML parsing failed");
|
let res = parse_serverparams("example@outlook.com", xml_raw).expect("XML parsing failed");
|
||||||
assert_eq!(res[0].protocol, Protocol::IMAP);
|
assert_eq!(res[0].protocol, Protocol::Imap);
|
||||||
assert_eq!(res[0].hostname, "outlook.office365.com");
|
assert_eq!(res[0].hostname, "outlook.office365.com");
|
||||||
assert_eq!(res[0].port, 993);
|
assert_eq!(res[0].port, 993);
|
||||||
assert_eq!(res[1].protocol, Protocol::SMTP);
|
assert_eq!(res[1].protocol, Protocol::Smtp);
|
||||||
assert_eq!(res[1].hostname, "smtp.office365.com");
|
assert_eq!(res[1].hostname, "smtp.office365.com");
|
||||||
assert_eq!(res[1].port, 587);
|
assert_eq!(res[1].port, 587);
|
||||||
}
|
}
|
||||||
@@ -295,25 +295,25 @@ mod tests {
|
|||||||
assert_eq!(res.incoming_servers[0].typ, "imap");
|
assert_eq!(res.incoming_servers[0].typ, "imap");
|
||||||
assert_eq!(res.incoming_servers[0].hostname, "mail.lakenet.ch");
|
assert_eq!(res.incoming_servers[0].hostname, "mail.lakenet.ch");
|
||||||
assert_eq!(res.incoming_servers[0].port, 993);
|
assert_eq!(res.incoming_servers[0].port, 993);
|
||||||
assert_eq!(res.incoming_servers[0].sockettype, Socket::SSL);
|
assert_eq!(res.incoming_servers[0].sockettype, Socket::Ssl);
|
||||||
assert_eq!(res.incoming_servers[0].username, "example@lakenet.ch");
|
assert_eq!(res.incoming_servers[0].username, "example@lakenet.ch");
|
||||||
|
|
||||||
assert_eq!(res.incoming_servers[1].typ, "imap");
|
assert_eq!(res.incoming_servers[1].typ, "imap");
|
||||||
assert_eq!(res.incoming_servers[1].hostname, "mail.lakenet.ch");
|
assert_eq!(res.incoming_servers[1].hostname, "mail.lakenet.ch");
|
||||||
assert_eq!(res.incoming_servers[1].port, 143);
|
assert_eq!(res.incoming_servers[1].port, 143);
|
||||||
assert_eq!(res.incoming_servers[1].sockettype, Socket::STARTTLS);
|
assert_eq!(res.incoming_servers[1].sockettype, Socket::Starttls);
|
||||||
assert_eq!(res.incoming_servers[1].username, "example@lakenet.ch");
|
assert_eq!(res.incoming_servers[1].username, "example@lakenet.ch");
|
||||||
|
|
||||||
assert_eq!(res.incoming_servers[2].typ, "pop3");
|
assert_eq!(res.incoming_servers[2].typ, "pop3");
|
||||||
assert_eq!(res.incoming_servers[2].hostname, "mail.lakenet.ch");
|
assert_eq!(res.incoming_servers[2].hostname, "mail.lakenet.ch");
|
||||||
assert_eq!(res.incoming_servers[2].port, 995);
|
assert_eq!(res.incoming_servers[2].port, 995);
|
||||||
assert_eq!(res.incoming_servers[2].sockettype, Socket::SSL);
|
assert_eq!(res.incoming_servers[2].sockettype, Socket::Ssl);
|
||||||
assert_eq!(res.incoming_servers[2].username, "example@lakenet.ch");
|
assert_eq!(res.incoming_servers[2].username, "example@lakenet.ch");
|
||||||
|
|
||||||
assert_eq!(res.incoming_servers[3].typ, "pop3");
|
assert_eq!(res.incoming_servers[3].typ, "pop3");
|
||||||
assert_eq!(res.incoming_servers[3].hostname, "mail.lakenet.ch");
|
assert_eq!(res.incoming_servers[3].hostname, "mail.lakenet.ch");
|
||||||
assert_eq!(res.incoming_servers[3].port, 110);
|
assert_eq!(res.incoming_servers[3].port, 110);
|
||||||
assert_eq!(res.incoming_servers[3].sockettype, Socket::STARTTLS);
|
assert_eq!(res.incoming_servers[3].sockettype, Socket::Starttls);
|
||||||
assert_eq!(res.incoming_servers[3].username, "example@lakenet.ch");
|
assert_eq!(res.incoming_servers[3].username, "example@lakenet.ch");
|
||||||
|
|
||||||
assert_eq!(res.outgoing_servers.len(), 1);
|
assert_eq!(res.outgoing_servers.len(), 1);
|
||||||
@@ -321,7 +321,7 @@ mod tests {
|
|||||||
assert_eq!(res.outgoing_servers[0].typ, "smtp");
|
assert_eq!(res.outgoing_servers[0].typ, "smtp");
|
||||||
assert_eq!(res.outgoing_servers[0].hostname, "mail.lakenet.ch");
|
assert_eq!(res.outgoing_servers[0].hostname, "mail.lakenet.ch");
|
||||||
assert_eq!(res.outgoing_servers[0].port, 587);
|
assert_eq!(res.outgoing_servers[0].port, 587);
|
||||||
assert_eq!(res.outgoing_servers[0].sockettype, Socket::STARTTLS);
|
assert_eq!(res.outgoing_servers[0].sockettype, Socket::Starttls);
|
||||||
assert_eq!(res.outgoing_servers[0].username, "example@lakenet.ch");
|
assert_eq!(res.outgoing_servers[0].username, "example@lakenet.ch");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,8 +169,8 @@ fn protocols_to_serverparams(protocols: Vec<ProtocolTag>) -> Vec<ServerParams> {
|
|||||||
.filter_map(|protocol| {
|
.filter_map(|protocol| {
|
||||||
Some(ServerParams {
|
Some(ServerParams {
|
||||||
protocol: match protocol.typ.to_lowercase().as_ref() {
|
protocol: match protocol.typ.to_lowercase().as_ref() {
|
||||||
"imap" => Some(Protocol::IMAP),
|
"imap" => Some(Protocol::Imap),
|
||||||
"smtp" => Some(Protocol::SMTP),
|
"smtp" => Some(Protocol::Smtp),
|
||||||
_ => None,
|
_ => None,
|
||||||
}?,
|
}?,
|
||||||
socket: match protocol.ssl {
|
socket: match protocol.ssl {
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
if let Some(provider) = provider::get_provider_info(¶m_domain).await {
|
if let Some(provider) = provider::get_provider_info(¶m_domain).await {
|
||||||
param.provider = Some(provider);
|
param.provider = Some(provider);
|
||||||
match provider.status {
|
match provider.status {
|
||||||
provider::Status::OK | provider::Status::PREPARATION => {
|
provider::Status::Ok | provider::Status::Preparation => {
|
||||||
if provider.server.is_empty() {
|
if provider.server.is_empty() {
|
||||||
info!(ctx, "offline autoconfig found, but no servers defined");
|
info!(ctx, "offline autoconfig found, but no servers defined");
|
||||||
param_autoconfig = None;
|
param_autoconfig = None;
|
||||||
@@ -235,8 +235,8 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
hostname: s.hostname.to_string(),
|
hostname: s.hostname.to_string(),
|
||||||
port: s.port,
|
port: s.port,
|
||||||
username: match s.username_pattern {
|
username: match s.username_pattern {
|
||||||
UsernamePattern::EMAIL => param.addr.to_string(),
|
UsernamePattern::Email => param.addr.to_string(),
|
||||||
UsernamePattern::EMAILLOCALPART => {
|
UsernamePattern::Emaillocalpart => {
|
||||||
if let Some(at) = param.addr.find('@') {
|
if let Some(at) = param.addr.find('@') {
|
||||||
param.addr.split_at(at).0.to_string()
|
param.addr.split_at(at).0.to_string()
|
||||||
} else {
|
} else {
|
||||||
@@ -250,7 +250,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
param_autoconfig = Some(servers)
|
param_autoconfig = Some(servers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
provider::Status::BROKEN => {
|
provider::Status::Broken => {
|
||||||
info!(ctx, "offline autoconfig found, provider is broken");
|
info!(ctx, "offline autoconfig found, provider is broken");
|
||||||
param_autoconfig = None;
|
param_autoconfig = None;
|
||||||
}
|
}
|
||||||
@@ -269,10 +269,10 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
let mut servers = param_autoconfig.unwrap_or_default();
|
let mut servers = param_autoconfig.unwrap_or_default();
|
||||||
if !servers
|
if !servers
|
||||||
.iter()
|
.iter()
|
||||||
.any(|server| server.protocol == Protocol::IMAP)
|
.any(|server| server.protocol == Protocol::Imap)
|
||||||
{
|
{
|
||||||
servers.push(ServerParams {
|
servers.push(ServerParams {
|
||||||
protocol: Protocol::IMAP,
|
protocol: Protocol::Imap,
|
||||||
hostname: param.imap.server.clone(),
|
hostname: param.imap.server.clone(),
|
||||||
port: param.imap.port,
|
port: param.imap.port,
|
||||||
socket: param.imap.security,
|
socket: param.imap.security,
|
||||||
@@ -281,10 +281,10 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
}
|
}
|
||||||
if !servers
|
if !servers
|
||||||
.iter()
|
.iter()
|
||||||
.any(|server| server.protocol == Protocol::SMTP)
|
.any(|server| server.protocol == Protocol::Smtp)
|
||||||
{
|
{
|
||||||
servers.push(ServerParams {
|
servers.push(ServerParams {
|
||||||
protocol: Protocol::SMTP,
|
protocol: Protocol::Smtp,
|
||||||
hostname: param.smtp.server.clone(),
|
hostname: param.smtp.server.clone(),
|
||||||
port: param.smtp.port,
|
port: param.smtp.port,
|
||||||
socket: param.smtp.security,
|
socket: param.smtp.security,
|
||||||
@@ -303,7 +303,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
let smtp_addr = param.addr.clone();
|
let smtp_addr = param.addr.clone();
|
||||||
let smtp_servers: Vec<ServerParams> = servers
|
let smtp_servers: Vec<ServerParams> = servers
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|params| params.protocol == Protocol::SMTP)
|
.filter(|params| params.protocol == Protocol::Smtp)
|
||||||
.cloned()
|
.cloned()
|
||||||
.collect();
|
.collect();
|
||||||
let provider_strict_tls = param.provider.map_or(false, |provider| provider.strict_tls);
|
let provider_strict_tls = param.provider.map_or(false, |provider| provider.strict_tls);
|
||||||
@@ -351,7 +351,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
|
|||||||
let mut imap_configured = false;
|
let mut imap_configured = false;
|
||||||
let imap_servers: Vec<&ServerParams> = servers
|
let imap_servers: Vec<&ServerParams> = servers
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|params| params.protocol == Protocol::IMAP)
|
.filter(|params| params.protocol == Protocol::Imap)
|
||||||
.collect();
|
.collect();
|
||||||
let imap_servers_count = imap_servers.len();
|
let imap_servers_count = imap_servers.len();
|
||||||
let mut errors = Vec::new();
|
let mut errors = Vec::new();
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ impl ServerParams {
|
|||||||
res.push(self.clone());
|
res.push(self.clone());
|
||||||
|
|
||||||
self.hostname = match self.protocol {
|
self.hostname = match self.protocol {
|
||||||
Protocol::IMAP => "imap.".to_string() + param_domain,
|
Protocol::Imap => "imap.".to_string() + param_domain,
|
||||||
Protocol::SMTP => "smtp.".to_string() + param_domain,
|
Protocol::Smtp => "smtp.".to_string() + param_domain,
|
||||||
};
|
};
|
||||||
res.push(self.clone());
|
res.push(self.clone());
|
||||||
|
|
||||||
@@ -66,13 +66,13 @@ impl ServerParams {
|
|||||||
// Try to infer port from socket security.
|
// Try to infer port from socket security.
|
||||||
if self.port == 0 {
|
if self.port == 0 {
|
||||||
self.port = match self.socket {
|
self.port = match self.socket {
|
||||||
Socket::SSL => match self.protocol {
|
Socket::Ssl => match self.protocol {
|
||||||
Protocol::IMAP => 993,
|
Protocol::Imap => 993,
|
||||||
Protocol::SMTP => 465,
|
Protocol::Smtp => 465,
|
||||||
},
|
},
|
||||||
Socket::STARTTLS | Socket::Plain => match self.protocol {
|
Socket::Starttls | Socket::Plain => match self.protocol {
|
||||||
Protocol::IMAP => 143,
|
Protocol::Imap => 143,
|
||||||
Protocol::SMTP => 587,
|
Protocol::Smtp => 587,
|
||||||
},
|
},
|
||||||
Socket::Automatic => 0,
|
Socket::Automatic => 0,
|
||||||
}
|
}
|
||||||
@@ -85,27 +85,27 @@ impl ServerParams {
|
|||||||
// Try common secure combinations.
|
// Try common secure combinations.
|
||||||
|
|
||||||
// Try STARTTLS
|
// Try STARTTLS
|
||||||
self.socket = Socket::STARTTLS;
|
self.socket = Socket::Starttls;
|
||||||
self.port = match self.protocol {
|
self.port = match self.protocol {
|
||||||
Protocol::IMAP => 143,
|
Protocol::Imap => 143,
|
||||||
Protocol::SMTP => 587,
|
Protocol::Smtp => 587,
|
||||||
};
|
};
|
||||||
res.push(self.clone());
|
res.push(self.clone());
|
||||||
|
|
||||||
// Try TLS
|
// Try TLS
|
||||||
self.socket = Socket::SSL;
|
self.socket = Socket::Ssl;
|
||||||
self.port = match self.protocol {
|
self.port = match self.protocol {
|
||||||
Protocol::IMAP => 993,
|
Protocol::Imap => 993,
|
||||||
Protocol::SMTP => 465,
|
Protocol::Smtp => 465,
|
||||||
};
|
};
|
||||||
res.push(self);
|
res.push(self);
|
||||||
} else if self.socket == Socket::Automatic {
|
} else if self.socket == Socket::Automatic {
|
||||||
// Try TLS over user-provided port.
|
// Try TLS over user-provided port.
|
||||||
self.socket = Socket::SSL;
|
self.socket = Socket::Ssl;
|
||||||
res.push(self.clone());
|
res.push(self.clone());
|
||||||
|
|
||||||
// Try STARTTLS over user-provided port.
|
// Try STARTTLS over user-provided port.
|
||||||
self.socket = Socket::STARTTLS;
|
self.socket = Socket::Starttls;
|
||||||
res.push(self);
|
res.push(self);
|
||||||
} else {
|
} else {
|
||||||
res.push(self);
|
res.push(self);
|
||||||
@@ -140,10 +140,10 @@ mod tests {
|
|||||||
fn test_expand_param_vector() {
|
fn test_expand_param_vector() {
|
||||||
let v = expand_param_vector(
|
let v = expand_param_vector(
|
||||||
vec![ServerParams {
|
vec![ServerParams {
|
||||||
protocol: Protocol::IMAP,
|
protocol: Protocol::Imap,
|
||||||
hostname: "example.net".to_string(),
|
hostname: "example.net".to_string(),
|
||||||
port: 0,
|
port: 0,
|
||||||
socket: Socket::SSL,
|
socket: Socket::Ssl,
|
||||||
username: "foobar".to_string(),
|
username: "foobar".to_string(),
|
||||||
}],
|
}],
|
||||||
"foobar@example.net",
|
"foobar@example.net",
|
||||||
@@ -153,10 +153,10 @@ mod tests {
|
|||||||
assert_eq!(
|
assert_eq!(
|
||||||
v,
|
v,
|
||||||
vec![ServerParams {
|
vec![ServerParams {
|
||||||
protocol: Protocol::IMAP,
|
protocol: Protocol::Imap,
|
||||||
hostname: "example.net".to_string(),
|
hostname: "example.net".to_string(),
|
||||||
port: 993,
|
port: 993,
|
||||||
socket: Socket::SSL,
|
socket: Socket::Ssl,
|
||||||
username: "foobar".to_string(),
|
username: "foobar".to_string(),
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -873,7 +873,8 @@ mod tests {
|
|||||||
{
|
{
|
||||||
assert!(
|
assert!(
|
||||||
info.contains_key(&*key),
|
info.contains_key(&*key),
|
||||||
format!("'{}' missing in get_info() output", key)
|
"'{}' missing in get_info() output",
|
||||||
|
key
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -544,9 +544,7 @@ Sent with my Delta Chat Messenger: https://delta.chat";
|
|||||||
to_save: Some(ToSave::All),
|
to_save: Some(ToSave::All),
|
||||||
fingerprint_changed: false,
|
fingerprint_changed: false,
|
||||||
};
|
};
|
||||||
let mut peerstates = Vec::new();
|
vec![(Some(peerstate), addr)]
|
||||||
peerstates.push((Some(peerstate), addr));
|
|
||||||
peerstates
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_std::test]
|
#[async_std::test]
|
||||||
@@ -571,8 +569,7 @@ Sent with my Delta Chat Messenger: https://delta.chat";
|
|||||||
assert!(encrypt_helper.should_encrypt(&t, false, &ps).unwrap());
|
assert!(encrypt_helper.should_encrypt(&t, false, &ps).unwrap());
|
||||||
|
|
||||||
// test with missing peerstate
|
// test with missing peerstate
|
||||||
let mut ps = Vec::new();
|
let ps = vec![(None, "bob@foo.bar")];
|
||||||
ps.push((None, "bob@foo.bar"));
|
|
||||||
assert!(encrypt_helper.should_encrypt(&t, true, &ps).is_err());
|
assert!(encrypt_helper.should_encrypt(&t, true, &ps).is_err());
|
||||||
assert!(!encrypt_helper.should_encrypt(&t, false, &ps).unwrap());
|
assert!(!encrypt_helper.should_encrypt(&t, false, &ps).unwrap());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -775,13 +775,13 @@ mod tests {
|
|||||||
if let Ok(msg) = Message::load_from_db(t, msg_id).await {
|
if let Ok(msg) = Message::load_from_db(t, msg_id).await {
|
||||||
assert_eq!(msg.from_id, 0);
|
assert_eq!(msg.from_id, 0);
|
||||||
assert_eq!(msg.to_id, 0);
|
assert_eq!(msg.to_id, 0);
|
||||||
assert!(msg.text.is_none_or_empty(), msg.text);
|
assert!(msg.text.is_none_or_empty(), "{:?}", msg.text);
|
||||||
let rawtxt: Option<String> = t
|
let rawtxt: Option<String> = t
|
||||||
.sql
|
.sql
|
||||||
.query_get_value(sqlx::query("SELECT txt_raw FROM msgs WHERE id=?;").bind(msg_id))
|
.query_get_value(sqlx::query("SELECT txt_raw FROM msgs WHERE id=?;").bind(msg_id))
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert!(rawtxt.is_none_or_empty(), rawtxt);
|
assert!(rawtxt.is_none_or_empty(), "{:?}", rawtxt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ impl Imap {
|
|||||||
|
|
||||||
let oauth2 = self.config.oauth2;
|
let oauth2 = self.config.oauth2;
|
||||||
|
|
||||||
let connection_res: ImapResult<Client> = if self.config.lp.security == Socket::STARTTLS
|
let connection_res: ImapResult<Client> = if self.config.lp.security == Socket::Starttls
|
||||||
|| self.config.lp.security == Socket::Plain
|
|| self.config.lp.security == Socket::Plain
|
||||||
{
|
{
|
||||||
let config = &mut self.config;
|
let config = &mut self.config;
|
||||||
@@ -203,7 +203,7 @@ impl Imap {
|
|||||||
|
|
||||||
match Client::connect_insecure((imap_server, imap_port)).await {
|
match Client::connect_insecure((imap_server, imap_port)).await {
|
||||||
Ok(client) => {
|
Ok(client) => {
|
||||||
if config.lp.security == Socket::STARTTLS {
|
if config.lp.security == Socket::Starttls {
|
||||||
client.secure(imap_server, config.strict_tls).await
|
client.secure(imap_server, config.strict_tls).await
|
||||||
} else {
|
} else {
|
||||||
Ok(client)
|
Ok(client)
|
||||||
|
|||||||
@@ -632,11 +632,9 @@ impl Message {
|
|||||||
// - We can't make a param `SenderDisplayname` for messages as sometimes the display name of a contact changes, and we want to show
|
// - We can't make a param `SenderDisplayname` for messages as sometimes the display name of a contact changes, and we want to show
|
||||||
// the same display name over all messages from the same sender.
|
// the same display name over all messages from the same sender.
|
||||||
pub fn get_override_sender_name(&self) -> Option<String> {
|
pub fn get_override_sender_name(&self) -> Option<String> {
|
||||||
if let Some(name) = self.param.get(Param::OverrideSenderDisplayname) {
|
self.param
|
||||||
Some(name.to_string())
|
.get(Param::OverrideSenderDisplayname)
|
||||||
} else {
|
.map(|name| name.to_string())
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exposing this function over the ffi instead of get_override_sender_name() would mean that at least Android Java code has
|
// Exposing this function over the ffi instead of get_override_sender_name() would mean that at least Android Java code has
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const UPPER_LIMIT_FILE_SIZE: u64 = 49 * 1024 * 1024 / 4 * 3;
|
|||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum Loaded {
|
pub enum Loaded {
|
||||||
Message { chat: Chat },
|
Message { chat: Chat },
|
||||||
MDN { additional_msg_ids: Vec<String> },
|
Mdn { additional_msg_ids: Vec<String> },
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper to construct mime messages.
|
/// Helper to construct mime messages.
|
||||||
@@ -207,7 +207,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
contact.get_addr().to_string(),
|
contact.get_addr().to_string(),
|
||||||
)],
|
)],
|
||||||
timestamp,
|
timestamp,
|
||||||
loaded: Loaded::MDN { additional_msg_ids },
|
loaded: Loaded::Mdn { additional_msg_ids },
|
||||||
msg,
|
msg,
|
||||||
in_reply_to: String::default(),
|
in_reply_to: String::default(),
|
||||||
references: String::default(),
|
references: String::default(),
|
||||||
@@ -258,7 +258,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
.get_bool(Param::GuaranteeE2ee)
|
.get_bool(Param::GuaranteeE2ee)
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
}
|
}
|
||||||
Loaded::MDN { .. } => false,
|
Loaded::Mdn { .. } => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
PeerstateVerifiedStatus::Unverified
|
PeerstateVerifiedStatus::Unverified
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loaded::MDN { .. } => PeerstateVerifiedStatus::Unverified,
|
Loaded::Mdn { .. } => PeerstateVerifiedStatus::Unverified,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,7 +287,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loaded::MDN { .. } => true,
|
Loaded::Mdn { .. } => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,7 +298,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
.param
|
.param
|
||||||
.get_bool(Param::SkipAutocrypt)
|
.get_bool(Param::SkipAutocrypt)
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
Loaded::MDN { .. } => true,
|
Loaded::Mdn { .. } => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,7 +313,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
Ok(self.msg.param.get_cmd() == SystemMessage::MemberAddedToGroup)
|
Ok(self.msg.param.get_cmd() == SystemMessage::MemberAddedToGroup)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loaded::MDN { .. } => Ok(false),
|
Loaded::Mdn { .. } => Ok(false),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,7 +343,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
Loaded::MDN { .. } => None,
|
Loaded::Mdn { .. } => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -388,7 +388,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
stock_str::subject_for_new_contact(context, self_name).await
|
stock_str::subject_for_new_contact(context, self_name).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loaded::MDN { .. } => stock_str::read_rcpt(context).await,
|
Loaded::Mdn { .. } => stock_str::read_rcpt(context).await,
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(subject)
|
Ok(subject)
|
||||||
@@ -451,7 +451,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
|
|
||||||
unprotected_headers.push(Header::new("Chat-Version".to_string(), "1.0".to_string()));
|
unprotected_headers.push(Header::new("Chat-Version".to_string(), "1.0".to_string()));
|
||||||
|
|
||||||
if let Loaded::MDN { .. } = self.loaded {
|
if let Loaded::Mdn { .. } = self.loaded {
|
||||||
unprotected_headers.push(Header::new(
|
unprotected_headers.push(Header::new(
|
||||||
"Auto-Submitted".to_string(),
|
"Auto-Submitted".to_string(),
|
||||||
"auto-replied".to_string(),
|
"auto-replied".to_string(),
|
||||||
@@ -497,7 +497,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
|
|
||||||
let rfc724_mid = match self.loaded {
|
let rfc724_mid = match self.loaded {
|
||||||
Loaded::Message { .. } => self.msg.rfc724_mid.clone(),
|
Loaded::Message { .. } => self.msg.rfc724_mid.clone(),
|
||||||
Loaded::MDN { .. } => dc_create_outgoing_rfc724_mid(None, &self.from_addr),
|
Loaded::Mdn { .. } => dc_create_outgoing_rfc724_mid(None, &self.from_addr),
|
||||||
};
|
};
|
||||||
|
|
||||||
let ephemeral_timer = self.msg.chat_id.get_ephemeral_timer(context).await?;
|
let ephemeral_timer = self.msg.chat_id.get_ephemeral_timer(context).await?;
|
||||||
@@ -534,7 +534,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
)
|
)
|
||||||
.await?
|
.await?
|
||||||
}
|
}
|
||||||
Loaded::MDN { .. } => (self.render_mdn(context).await?, Vec::new()),
|
Loaded::Mdn { .. } => (self.render_mdn(context).await?, Vec::new()),
|
||||||
};
|
};
|
||||||
|
|
||||||
let peerstates = self.peerstates_for_recipients(context).await?;
|
let peerstates = self.peerstates_for_recipients(context).await?;
|
||||||
@@ -704,7 +704,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
) -> Result<(PartBuilder, Vec<PartBuilder>), Error> {
|
) -> Result<(PartBuilder, Vec<PartBuilder>), Error> {
|
||||||
let chat = match &self.loaded {
|
let chat = match &self.loaded {
|
||||||
Loaded::Message { chat } => chat,
|
Loaded::Message { chat } => chat,
|
||||||
Loaded::MDN { .. } => bail!("Attempt to render MDN as a message"),
|
Loaded::Mdn { .. } => bail!("Attempt to render MDN as a message"),
|
||||||
};
|
};
|
||||||
let command = self.msg.param.get_cmd();
|
let command = self.msg.param.get_cmd();
|
||||||
let mut placeholdertext = None;
|
let mut placeholdertext = None;
|
||||||
@@ -1037,7 +1037,7 @@ impl<'a> MimeFactory<'a> {
|
|||||||
|
|
||||||
let additional_msg_ids = match &self.loaded {
|
let additional_msg_ids = match &self.loaded {
|
||||||
Loaded::Message { .. } => bail!("Attempt to render a message as MDN"),
|
Loaded::Message { .. } => bail!("Attempt to render a message as MDN"),
|
||||||
Loaded::MDN {
|
Loaded::Mdn {
|
||||||
additional_msg_ids, ..
|
additional_msg_ids, ..
|
||||||
} => additional_msg_ids,
|
} => additional_msg_ids,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,24 +11,24 @@ use once_cell::sync::Lazy;
|
|||||||
// aktivix.org.md: aktivix.org
|
// aktivix.org.md: aktivix.org
|
||||||
static P_AKTIVIX_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_AKTIVIX_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "aktivix.org",
|
id: "aktivix.org",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/aktivix-org",
|
overview_page: "https://providers.delta.chat/aktivix-org",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "newyear.aktivix.org",
|
hostname: "newyear.aktivix.org",
|
||||||
port: 143,
|
port: 143,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "newyear.aktivix.org",
|
hostname: "newyear.aktivix.org",
|
||||||
port: 25,
|
port: 25,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -41,13 +41,13 @@ static P_AKTIVIX_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
static P_AOL: Lazy<Provider> = Lazy::new(|| {
|
static P_AOL: Lazy<Provider> = Lazy::new(|| {
|
||||||
Provider {
|
Provider {
|
||||||
id: "aol",
|
id: "aol",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint: "To log in to AOL with Delta Chat, you need to set up an app password in the AOL web interface.",
|
before_login_hint: "To log in to AOL with Delta Chat, you need to set up an app password in the AOL web interface.",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/aol",
|
overview_page: "https://providers.delta.chat/aol",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server { protocol: IMAP, socket: SSL, hostname: "imap.aol.com", port: 993, username_pattern: EMAIL },
|
Server { protocol: Imap, socket: Ssl, hostname: "imap.aol.com", port: 993, username_pattern: Email },
|
||||||
Server { protocol: SMTP, socket: SSL, hostname: "smtp.aol.com", port: 465, username_pattern: EMAIL },
|
Server { protocol: Smtp, socket: Ssl, hostname: "smtp.aol.com", port: 465, username_pattern: Email },
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
strict_tls: true,
|
strict_tls: true,
|
||||||
@@ -59,24 +59,24 @@ static P_AOL: Lazy<Provider> = Lazy::new(|| {
|
|||||||
// arcor.de.md: arcor.de
|
// arcor.de.md: arcor.de
|
||||||
static P_ARCOR_DE: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_ARCOR_DE: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "arcor.de",
|
id: "arcor.de",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/arcor-de",
|
overview_page: "https://providers.delta.chat/arcor-de",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "imap.arcor.de",
|
hostname: "imap.arcor.de",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "mail.arcor.de",
|
hostname: "mail.arcor.de",
|
||||||
port: 465,
|
port: 465,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -88,24 +88,24 @@ static P_ARCOR_DE: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// autistici.org.md: autistici.org
|
// autistici.org.md: autistici.org
|
||||||
static P_AUTISTICI_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_AUTISTICI_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "autistici.org",
|
id: "autistici.org",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/autistici-org",
|
overview_page: "https://providers.delta.chat/autistici-org",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "mail.autistici.org",
|
hostname: "mail.autistici.org",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "smtp.autistici.org",
|
hostname: "smtp.autistici.org",
|
||||||
port: 465,
|
port: 465,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -117,24 +117,24 @@ static P_AUTISTICI_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// bluewin.ch.md: bluewin.ch
|
// bluewin.ch.md: bluewin.ch
|
||||||
static P_BLUEWIN_CH: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_BLUEWIN_CH: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "bluewin.ch",
|
id: "bluewin.ch",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/bluewin-ch",
|
overview_page: "https://providers.delta.chat/bluewin-ch",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "imaps.bluewin.ch",
|
hostname: "imaps.bluewin.ch",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "smtpauths.bluewin.ch",
|
hostname: "smtpauths.bluewin.ch",
|
||||||
port: 465,
|
port: 465,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -146,24 +146,24 @@ static P_BLUEWIN_CH: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// buzon.uy.md: buzon.uy
|
// buzon.uy.md: buzon.uy
|
||||||
static P_BUZON_UY: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_BUZON_UY: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "buzon.uy",
|
id: "buzon.uy",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/buzon-uy",
|
overview_page: "https://providers.delta.chat/buzon-uy",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "mail.buzon.uy",
|
hostname: "mail.buzon.uy",
|
||||||
port: 143,
|
port: 143,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "mail.buzon.uy",
|
hostname: "mail.buzon.uy",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -175,24 +175,24 @@ static P_BUZON_UY: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// chello.at.md: chello.at
|
// chello.at.md: chello.at
|
||||||
static P_CHELLO_AT: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_CHELLO_AT: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "chello.at",
|
id: "chello.at",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/chello-at",
|
overview_page: "https://providers.delta.chat/chello-at",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "mail.mymagenta.at",
|
hostname: "mail.mymagenta.at",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "mail.mymagenta.at",
|
hostname: "mail.mymagenta.at",
|
||||||
port: 465,
|
port: 465,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -204,7 +204,7 @@ static P_CHELLO_AT: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// comcast.md: xfinity.com, comcast.net
|
// comcast.md: xfinity.com, comcast.net
|
||||||
static P_COMCAST: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_COMCAST: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "comcast",
|
id: "comcast",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/comcast",
|
overview_page: "https://providers.delta.chat/comcast",
|
||||||
@@ -218,7 +218,7 @@ static P_COMCAST: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// dismail.de.md: dismail.de
|
// dismail.de.md: dismail.de
|
||||||
static P_DISMAIL_DE: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_DISMAIL_DE: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "dismail.de",
|
id: "dismail.de",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/dismail-de",
|
overview_page: "https://providers.delta.chat/dismail-de",
|
||||||
@@ -232,7 +232,7 @@ static P_DISMAIL_DE: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// disroot.md: disroot.org
|
// disroot.md: disroot.org
|
||||||
static P_DISROOT: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_DISROOT: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "disroot",
|
id: "disroot",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/disroot",
|
overview_page: "https://providers.delta.chat/disroot",
|
||||||
@@ -246,31 +246,31 @@ static P_DISROOT: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// dubby.org.md: dubby.org
|
// dubby.org.md: dubby.org
|
||||||
static P_DUBBY_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_DUBBY_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "dubby.org",
|
id: "dubby.org",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/dubby-org",
|
overview_page: "https://providers.delta.chat/dubby-org",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "dubby.org",
|
hostname: "dubby.org",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "dubby.org",
|
hostname: "dubby.org",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "dubby.org",
|
hostname: "dubby.org",
|
||||||
port: 465,
|
port: 465,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: Some(vec![
|
config_defaults: Some(vec![
|
||||||
@@ -299,24 +299,24 @@ static P_DUBBY_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// e.email.md: e.email
|
// e.email.md: e.email
|
||||||
static P_E_EMAIL: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_E_EMAIL: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "e.email",
|
id: "e.email",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/e-email",
|
overview_page: "https://providers.delta.chat/e-email",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "mail.ecloud.global",
|
hostname: "mail.ecloud.global",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "mail.ecloud.global",
|
hostname: "mail.ecloud.global",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -328,7 +328,7 @@ static P_E_EMAIL: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// espiv.net.md: espiv.net
|
// espiv.net.md: espiv.net
|
||||||
static P_ESPIV_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_ESPIV_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "espiv.net",
|
id: "espiv.net",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/espiv-net",
|
overview_page: "https://providers.delta.chat/espiv-net",
|
||||||
@@ -343,13 +343,13 @@ static P_ESPIV_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
static P_EXAMPLE_COM: Lazy<Provider> = Lazy::new(|| {
|
static P_EXAMPLE_COM: Lazy<Provider> = Lazy::new(|| {
|
||||||
Provider {
|
Provider {
|
||||||
id: "example.com",
|
id: "example.com",
|
||||||
status: Status::BROKEN,
|
status: Status::Broken,
|
||||||
before_login_hint: "Hush this provider doesn't exist!",
|
before_login_hint: "Hush this provider doesn't exist!",
|
||||||
after_login_hint: "This provider doesn't really exist, so you can't use it :/ If you need an email provider for Delta Chat, take a look at providers.delta.chat!",
|
after_login_hint: "This provider doesn't really exist, so you can't use it :/ If you need an email provider for Delta Chat, take a look at providers.delta.chat!",
|
||||||
overview_page: "https://providers.delta.chat/example-com",
|
overview_page: "https://providers.delta.chat/example-com",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server { protocol: IMAP, socket: SSL, hostname: "imap.example.com", port: 1337, username_pattern: EMAIL },
|
Server { protocol: Imap, socket: Ssl, hostname: "imap.example.com", port: 1337, username_pattern: Email },
|
||||||
Server { protocol: SMTP, socket: STARTTLS, hostname: "smtp.example.com", port: 1337, username_pattern: EMAIL },
|
Server { protocol: Smtp, socket: Starttls, hostname: "smtp.example.com", port: 1337, username_pattern: Email },
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
strict_tls: true,
|
strict_tls: true,
|
||||||
@@ -361,32 +361,32 @@ static P_EXAMPLE_COM: Lazy<Provider> = Lazy::new(|| {
|
|||||||
// fastmail.md: fastmail.com
|
// fastmail.md: fastmail.com
|
||||||
static P_FASTMAIL: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_FASTMAIL: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "fastmail",
|
id: "fastmail",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint:
|
before_login_hint:
|
||||||
"You must create an app-specific password for Delta Chat before you can log in.",
|
"You must create an app-specific password for Delta Chat before you can log in.",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/fastmail",
|
overview_page: "https://providers.delta.chat/fastmail",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "imap.fastmail.com",
|
hostname: "imap.fastmail.com",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "smtp.fastmail.com",
|
hostname: "smtp.fastmail.com",
|
||||||
port: 465,
|
port: 465,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "smtp.fastmail.com",
|
hostname: "smtp.fastmail.com",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -399,7 +399,7 @@ static P_FASTMAIL: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
static P_FIREMAIL_DE: Lazy<Provider> = Lazy::new(|| {
|
static P_FIREMAIL_DE: Lazy<Provider> = Lazy::new(|| {
|
||||||
Provider {
|
Provider {
|
||||||
id: "firemail.de",
|
id: "firemail.de",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint: "Firemail erlaubt nur bei bezahlten Accounts den vollen Zugriff auf das E-Mail-Protokoll. Wenn Sie nicht für Firemail bezahlen, verwenden Sie bitte einen anderen E-Mail-Anbieter.",
|
before_login_hint: "Firemail erlaubt nur bei bezahlten Accounts den vollen Zugriff auf das E-Mail-Protokoll. Wenn Sie nicht für Firemail bezahlen, verwenden Sie bitte einen anderen E-Mail-Anbieter.",
|
||||||
after_login_hint: "Leider schränkt Firemail die maximale Gruppengröße ein. Je nach Bezahlmodell sind nur 5 bis 30 Gruppenmitglieder erlaubt.",
|
after_login_hint: "Leider schränkt Firemail die maximale Gruppengröße ein. Je nach Bezahlmodell sind nur 5 bis 30 Gruppenmitglieder erlaubt.",
|
||||||
overview_page: "https://providers.delta.chat/firemail-de",
|
overview_page: "https://providers.delta.chat/firemail-de",
|
||||||
@@ -415,7 +415,7 @@ static P_FIREMAIL_DE: Lazy<Provider> = Lazy::new(|| {
|
|||||||
// five.chat.md: five.chat
|
// five.chat.md: five.chat
|
||||||
static P_FIVE_CHAT: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_FIVE_CHAT: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "five.chat",
|
id: "five.chat",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/five-chat",
|
overview_page: "https://providers.delta.chat/five-chat",
|
||||||
@@ -447,13 +447,13 @@ static P_FIVE_CHAT: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
static P_FREENET_DE: Lazy<Provider> = Lazy::new(|| {
|
static P_FREENET_DE: Lazy<Provider> = Lazy::new(|| {
|
||||||
Provider {
|
Provider {
|
||||||
id: "freenet.de",
|
id: "freenet.de",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint: "Um deine freenet.de E-Mail-Adresse mit Delta Chat zu benutzen, musst du erst auf der freenet.de-Webseite \"POP3/IMAP/SMTP\" aktivieren.",
|
before_login_hint: "Um deine freenet.de E-Mail-Adresse mit Delta Chat zu benutzen, musst du erst auf der freenet.de-Webseite \"POP3/IMAP/SMTP\" aktivieren.",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/freenet-de",
|
overview_page: "https://providers.delta.chat/freenet-de",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server { protocol: IMAP, socket: SSL, hostname: "mx.freenet.de", port: 993, username_pattern: EMAIL },
|
Server { protocol: Imap, socket: Ssl, hostname: "mx.freenet.de", port: 993, username_pattern: Email },
|
||||||
Server { protocol: SMTP, socket: STARTTLS, hostname: "mx.freenet.de", port: 587, username_pattern: EMAIL },
|
Server { protocol: Smtp, socket: Starttls, hostname: "mx.freenet.de", port: 587, username_pattern: Email },
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
strict_tls: true,
|
strict_tls: true,
|
||||||
@@ -466,13 +466,13 @@ static P_FREENET_DE: Lazy<Provider> = Lazy::new(|| {
|
|||||||
static P_GMAIL: Lazy<Provider> = Lazy::new(|| {
|
static P_GMAIL: Lazy<Provider> = Lazy::new(|| {
|
||||||
Provider {
|
Provider {
|
||||||
id: "gmail",
|
id: "gmail",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint: "For Gmail accounts, you need to create an app-password if you have \"2-Step Verification\" enabled. If this setting is not available, you need to enable \"less secure apps\".",
|
before_login_hint: "For Gmail accounts, you need to create an app-password if you have \"2-Step Verification\" enabled. If this setting is not available, you need to enable \"less secure apps\".",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/gmail",
|
overview_page: "https://providers.delta.chat/gmail",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server { protocol: IMAP, socket: SSL, hostname: "imap.gmail.com", port: 993, username_pattern: EMAIL },
|
Server { protocol: Imap, socket: Ssl, hostname: "imap.gmail.com", port: 993, username_pattern: Email },
|
||||||
Server { protocol: SMTP, socket: SSL, hostname: "smtp.gmail.com", port: 465, username_pattern: EMAIL },
|
Server { protocol: Smtp, socket: Ssl, hostname: "smtp.gmail.com", port: 465, username_pattern: Email },
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
strict_tls: true,
|
strict_tls: true,
|
||||||
@@ -484,31 +484,31 @@ static P_GMAIL: Lazy<Provider> = Lazy::new(|| {
|
|||||||
// gmx.net.md: gmx.net, gmx.de, gmx.at, gmx.ch, gmx.org, gmx.eu, gmx.info, gmx.biz, gmx.com
|
// gmx.net.md: gmx.net, gmx.de, gmx.at, gmx.ch, gmx.org, gmx.eu, gmx.info, gmx.biz, gmx.com
|
||||||
static P_GMX_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_GMX_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "gmx.net",
|
id: "gmx.net",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint: "You must allow IMAP access to your account before you can login.",
|
before_login_hint: "You must allow IMAP access to your account before you can login.",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/gmx-net",
|
overview_page: "https://providers.delta.chat/gmx-net",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "imap.gmx.net",
|
hostname: "imap.gmx.net",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "mail.gmx.net",
|
hostname: "mail.gmx.net",
|
||||||
port: 465,
|
port: 465,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "mail.gmx.net",
|
hostname: "mail.gmx.net",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -520,7 +520,7 @@ static P_GMX_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// hermes.radio.md: hermes.radio
|
// hermes.radio.md: hermes.radio
|
||||||
static P_HERMES_RADIO: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_HERMES_RADIO: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "hermes.radio",
|
id: "hermes.radio",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/hermes-radio",
|
overview_page: "https://providers.delta.chat/hermes-radio",
|
||||||
@@ -552,7 +552,7 @@ static P_HERMES_RADIO: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
static P_HEY_COM: Lazy<Provider> = Lazy::new(|| {
|
static P_HEY_COM: Lazy<Provider> = Lazy::new(|| {
|
||||||
Provider {
|
Provider {
|
||||||
id: "hey.com",
|
id: "hey.com",
|
||||||
status: Status::BROKEN,
|
status: Status::Broken,
|
||||||
before_login_hint: "hey.com does not offer the standard IMAP e-mail protocol, so you cannot log in with Delta Chat to hey.com.",
|
before_login_hint: "hey.com does not offer the standard IMAP e-mail protocol, so you cannot log in with Delta Chat to hey.com.",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/hey-com",
|
overview_page: "https://providers.delta.chat/hey-com",
|
||||||
@@ -568,7 +568,7 @@ static P_HEY_COM: Lazy<Provider> = Lazy::new(|| {
|
|||||||
// i.ua.md: i.ua
|
// i.ua.md: i.ua
|
||||||
static P_I_UA: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_I_UA: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "i.ua",
|
id: "i.ua",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/i-ua",
|
overview_page: "https://providers.delta.chat/i-ua",
|
||||||
@@ -582,7 +582,7 @@ static P_I_UA: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// i3.net.md: i3.net
|
// i3.net.md: i3.net
|
||||||
static P_I3_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_I3_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "i3.net",
|
id: "i3.net",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/i3-net",
|
overview_page: "https://providers.delta.chat/i3-net",
|
||||||
@@ -596,25 +596,25 @@ static P_I3_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// icloud.md: icloud.com, me.com, mac.com
|
// icloud.md: icloud.com, me.com, mac.com
|
||||||
static P_ICLOUD: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_ICLOUD: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "icloud",
|
id: "icloud",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint:
|
before_login_hint:
|
||||||
"You must create an app-specific password for Delta Chat before you can login.",
|
"You must create an app-specific password for Delta Chat before you can login.",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/icloud",
|
overview_page: "https://providers.delta.chat/icloud",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "imap.mail.me.com",
|
hostname: "imap.mail.me.com",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAILLOCALPART,
|
username_pattern: Emaillocalpart,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "smtp.mail.me.com",
|
hostname: "smtp.mail.me.com",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -626,7 +626,7 @@ static P_ICLOUD: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// kolst.com.md: kolst.com
|
// kolst.com.md: kolst.com
|
||||||
static P_KOLST_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_KOLST_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "kolst.com",
|
id: "kolst.com",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/kolst-com",
|
overview_page: "https://providers.delta.chat/kolst-com",
|
||||||
@@ -640,7 +640,7 @@ static P_KOLST_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// kontent.com.md: kontent.com
|
// kontent.com.md: kontent.com
|
||||||
static P_KONTENT_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_KONTENT_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "kontent.com",
|
id: "kontent.com",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/kontent-com",
|
overview_page: "https://providers.delta.chat/kontent-com",
|
||||||
@@ -652,23 +652,26 @@ static P_KONTENT_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// mail.ru.md: mail.ru, inbox.ru, bk.ru, list.ru
|
// mail.ru.md: mail.ru, inbox.ru, bk.ru, list.ru
|
||||||
static P_MAIL_RU: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_MAIL_RU: Lazy<Provider> = Lazy::new(|| {
|
||||||
|
Provider {
|
||||||
id: "mail.ru",
|
id: "mail.ru",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "Не рекомендуется использовать mail.ru, потому что он разряжает вашу батарею быстрее, чем другие провайдеры.",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/mail-ru",
|
overview_page: "https://providers.delta.chat/mail-ru",
|
||||||
server: vec![],
|
server: vec![
|
||||||
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
strict_tls: true,
|
strict_tls: true,
|
||||||
max_smtp_rcpt_to: None,
|
max_smtp_rcpt_to: None,
|
||||||
oauth2_authorizer: None,
|
oauth2_authorizer: None,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// mailbox.org.md: mailbox.org, secure.mailbox.org
|
// mailbox.org.md: mailbox.org, secure.mailbox.org
|
||||||
static P_MAILBOX_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_MAILBOX_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "mailbox.org",
|
id: "mailbox.org",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/mailbox-org",
|
overview_page: "https://providers.delta.chat/mailbox-org",
|
||||||
@@ -682,24 +685,24 @@ static P_MAILBOX_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// mailo.com.md: mailo.com
|
// mailo.com.md: mailo.com
|
||||||
static P_MAILO_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_MAILO_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "mailo.com",
|
id: "mailo.com",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/mailo-com",
|
overview_page: "https://providers.delta.chat/mailo-com",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "imap.mailo.com",
|
hostname: "imap.mailo.com",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "smtp.mailo.com",
|
hostname: "smtp.mailo.com",
|
||||||
port: 465,
|
port: 465,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -711,24 +714,24 @@ static P_MAILO_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// nauta.cu.md: nauta.cu
|
// nauta.cu.md: nauta.cu
|
||||||
static P_NAUTA_CU: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_NAUTA_CU: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "nauta.cu",
|
id: "nauta.cu",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/nauta-cu",
|
overview_page: "https://providers.delta.chat/nauta-cu",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "imap.nauta.cu",
|
hostname: "imap.nauta.cu",
|
||||||
port: 143,
|
port: 143,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "smtp.nauta.cu",
|
hostname: "smtp.nauta.cu",
|
||||||
port: 25,
|
port: 25,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: Some(vec![
|
config_defaults: Some(vec![
|
||||||
@@ -773,24 +776,24 @@ static P_NAUTA_CU: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// outlook.com.md: hotmail.com, outlook.com, office365.com, outlook.com.tr, live.com
|
// outlook.com.md: hotmail.com, outlook.com, office365.com, outlook.com.tr, live.com
|
||||||
static P_OUTLOOK_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_OUTLOOK_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "outlook.com",
|
id: "outlook.com",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/outlook-com",
|
overview_page: "https://providers.delta.chat/outlook-com",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "outlook.office365.com",
|
hostname: "outlook.office365.com",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "smtp.office365.com",
|
hostname: "smtp.office365.com",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -802,24 +805,24 @@ static P_OUTLOOK_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// posteo.md: posteo.de, posteo.af, posteo.at, posteo.be, posteo.ch, posteo.cl, posteo.co, posteo.co.uk, posteo.com.br, posteo.cr, posteo.cz, posteo.dk, posteo.ee, posteo.es, posteo.eu, posteo.fi, posteo.gl, posteo.gr, posteo.hn, posteo.hr, posteo.hu, posteo.ie, posteo.in, posteo.is, posteo.jp, posteo.la, posteo.li, posteo.lt, posteo.lu, posteo.me, posteo.mx, posteo.my, posteo.net, posteo.nl, posteo.no, posteo.nz, posteo.org, posteo.pe, posteo.pl, posteo.pm, posteo.pt, posteo.ro, posteo.ru, posteo.se, posteo.sg, posteo.si, posteo.tn, posteo.uk, posteo.us
|
// posteo.md: posteo.de, posteo.af, posteo.at, posteo.be, posteo.ch, posteo.cl, posteo.co, posteo.co.uk, posteo.com.br, posteo.cr, posteo.cz, posteo.dk, posteo.ee, posteo.es, posteo.eu, posteo.fi, posteo.gl, posteo.gr, posteo.hn, posteo.hr, posteo.hu, posteo.ie, posteo.in, posteo.is, posteo.jp, posteo.la, posteo.li, posteo.lt, posteo.lu, posteo.me, posteo.mx, posteo.my, posteo.net, posteo.nl, posteo.no, posteo.nz, posteo.org, posteo.pe, posteo.pl, posteo.pm, posteo.pt, posteo.ro, posteo.ru, posteo.se, posteo.sg, posteo.si, posteo.tn, posteo.uk, posteo.us
|
||||||
static P_POSTEO: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_POSTEO: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "posteo",
|
id: "posteo",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/posteo",
|
overview_page: "https://providers.delta.chat/posteo",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "posteo.de",
|
hostname: "posteo.de",
|
||||||
port: 143,
|
port: 143,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "posteo.de",
|
hostname: "posteo.de",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -832,7 +835,7 @@ static P_POSTEO: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
static P_PROTONMAIL: Lazy<Provider> = Lazy::new(|| {
|
static P_PROTONMAIL: Lazy<Provider> = Lazy::new(|| {
|
||||||
Provider {
|
Provider {
|
||||||
id: "protonmail",
|
id: "protonmail",
|
||||||
status: Status::BROKEN,
|
status: Status::Broken,
|
||||||
before_login_hint: "Protonmail does not offer the standard IMAP e-mail protocol, so you cannot log in with Delta Chat to Protonmail.",
|
before_login_hint: "Protonmail does not offer the standard IMAP e-mail protocol, so you cannot log in with Delta Chat to Protonmail.",
|
||||||
after_login_hint: "To use Delta Chat with Protonmail, the IMAP bridge must be running in the background. If you have connectivity issues, double check whether it works as expected.",
|
after_login_hint: "To use Delta Chat with Protonmail, the IMAP bridge must be running in the background. If you have connectivity issues, double check whether it works as expected.",
|
||||||
overview_page: "https://providers.delta.chat/protonmail",
|
overview_page: "https://providers.delta.chat/protonmail",
|
||||||
@@ -848,7 +851,7 @@ static P_PROTONMAIL: Lazy<Provider> = Lazy::new(|| {
|
|||||||
// riseup.net.md: riseup.net
|
// riseup.net.md: riseup.net
|
||||||
static P_RISEUP_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_RISEUP_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "riseup.net",
|
id: "riseup.net",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/riseup-net",
|
overview_page: "https://providers.delta.chat/riseup-net",
|
||||||
@@ -862,7 +865,7 @@ static P_RISEUP_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// rogers.com.md: rogers.com
|
// rogers.com.md: rogers.com
|
||||||
static P_ROGERS_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_ROGERS_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "rogers.com",
|
id: "rogers.com",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/rogers-com",
|
overview_page: "https://providers.delta.chat/rogers-com",
|
||||||
@@ -876,7 +879,7 @@ static P_ROGERS_COM: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// systemli.org.md: systemli.org
|
// systemli.org.md: systemli.org
|
||||||
static P_SYSTEMLI_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_SYSTEMLI_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "systemli.org",
|
id: "systemli.org",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/systemli-org",
|
overview_page: "https://providers.delta.chat/systemli-org",
|
||||||
@@ -891,13 +894,13 @@ static P_SYSTEMLI_ORG: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
static P_T_ONLINE: Lazy<Provider> = Lazy::new(|| {
|
static P_T_ONLINE: Lazy<Provider> = Lazy::new(|| {
|
||||||
Provider {
|
Provider {
|
||||||
id: "t-online",
|
id: "t-online",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint: "To use Delta Chat with a T-Online email address, you need to create an app password in the web interface.",
|
before_login_hint: "To use Delta Chat with a T-Online email address, you need to create an app password in the web interface.",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/t-online",
|
overview_page: "https://providers.delta.chat/t-online",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server { protocol: IMAP, socket: SSL, hostname: "secureimap.t-online.de", port: 993, username_pattern: EMAIL },
|
Server { protocol: Imap, socket: Ssl, hostname: "secureimap.t-online.de", port: 993, username_pattern: Email },
|
||||||
Server { protocol: SMTP, socket: SSL, hostname: "securesmtp.t-online.de", port: 465, username_pattern: EMAIL },
|
Server { protocol: Smtp, socket: Ssl, hostname: "securesmtp.t-online.de", port: 465, username_pattern: Email },
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
strict_tls: true,
|
strict_tls: true,
|
||||||
@@ -909,31 +912,31 @@ static P_T_ONLINE: Lazy<Provider> = Lazy::new(|| {
|
|||||||
// testrun.md: testrun.org
|
// testrun.md: testrun.org
|
||||||
static P_TESTRUN: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_TESTRUN: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "testrun",
|
id: "testrun",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/testrun",
|
overview_page: "https://providers.delta.chat/testrun",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "testrun.org",
|
hostname: "testrun.org",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "testrun.org",
|
hostname: "testrun.org",
|
||||||
port: 143,
|
port: 143,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "testrun.org",
|
hostname: "testrun.org",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: Some(vec![
|
config_defaults: Some(vec![
|
||||||
@@ -962,24 +965,24 @@ static P_TESTRUN: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// tiscali.it.md: tiscali.it
|
// tiscali.it.md: tiscali.it
|
||||||
static P_TISCALI_IT: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_TISCALI_IT: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "tiscali.it",
|
id: "tiscali.it",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/tiscali-it",
|
overview_page: "https://providers.delta.chat/tiscali-it",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "imap.tiscali.it",
|
hostname: "imap.tiscali.it",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "smtp.tiscali.it",
|
hostname: "smtp.tiscali.it",
|
||||||
port: 465,
|
port: 465,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -991,7 +994,7 @@ static P_TISCALI_IT: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// ukr.net.md: ukr.net
|
// ukr.net.md: ukr.net
|
||||||
static P_UKR_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_UKR_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "ukr.net",
|
id: "ukr.net",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/ukr-net",
|
overview_page: "https://providers.delta.chat/ukr-net",
|
||||||
@@ -1005,24 +1008,24 @@ static P_UKR_NET: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// undernet.uy.md: undernet.uy
|
// undernet.uy.md: undernet.uy
|
||||||
static P_UNDERNET_UY: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_UNDERNET_UY: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "undernet.uy",
|
id: "undernet.uy",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/undernet-uy",
|
overview_page: "https://providers.delta.chat/undernet-uy",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "undernet.uy",
|
hostname: "undernet.uy",
|
||||||
port: 143,
|
port: 143,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "undernet.uy",
|
hostname: "undernet.uy",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -1034,7 +1037,7 @@ static P_UNDERNET_UY: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// vfemail.md: vfemail.net
|
// vfemail.md: vfemail.net
|
||||||
static P_VFEMAIL: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_VFEMAIL: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "vfemail",
|
id: "vfemail",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/vfemail",
|
overview_page: "https://providers.delta.chat/vfemail",
|
||||||
@@ -1048,24 +1051,24 @@ static P_VFEMAIL: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// vodafone.de.md: vodafone.de, vodafonemail.de
|
// vodafone.de.md: vodafone.de, vodafonemail.de
|
||||||
static P_VODAFONE_DE: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_VODAFONE_DE: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "vodafone.de",
|
id: "vodafone.de",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/vodafone-de",
|
overview_page: "https://providers.delta.chat/vodafone-de",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "imap.vodafonemail.de",
|
hostname: "imap.vodafonemail.de",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "smtp.vodafonemail.de",
|
hostname: "smtp.vodafonemail.de",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -1078,14 +1081,14 @@ static P_VODAFONE_DE: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
static P_WEB_DE: Lazy<Provider> = Lazy::new(|| {
|
static P_WEB_DE: Lazy<Provider> = Lazy::new(|| {
|
||||||
Provider {
|
Provider {
|
||||||
id: "web.de",
|
id: "web.de",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint: "You must allow IMAP access to your account before you can login.",
|
before_login_hint: "You must allow IMAP access to your account before you can login.",
|
||||||
after_login_hint: "Note: if you have your web.de spam settings too strict, you won't receive contact requests from new people. If you want to receive contact requests, you should disable the \"3-Wege-Spamschutz\" in the web.de settings. Read how: https://hilfe.web.de/email/spam-und-viren/spamschutz-einstellungen.html",
|
after_login_hint: "Note: if you have your web.de spam settings too strict, you won't receive contact requests from new people. If you want to receive contact requests, you should disable the \"3-Wege-Spamschutz\" in the web.de settings. Read how: https://hilfe.web.de/email/spam-und-viren/spamschutz-einstellungen.html",
|
||||||
overview_page: "https://providers.delta.chat/web-de",
|
overview_page: "https://providers.delta.chat/web-de",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server { protocol: IMAP, socket: SSL, hostname: "imap.web.de", port: 993, username_pattern: EMAILLOCALPART },
|
Server { protocol: Imap, socket: Ssl, hostname: "imap.web.de", port: 993, username_pattern: Emaillocalpart },
|
||||||
Server { protocol: IMAP, socket: STARTTLS, hostname: "imap.web.de", port: 143, username_pattern: EMAILLOCALPART },
|
Server { protocol: Imap, socket: Starttls, hostname: "imap.web.de", port: 143, username_pattern: Emaillocalpart },
|
||||||
Server { protocol: SMTP, socket: STARTTLS, hostname: "smtp.web.de", port: 587, username_pattern: EMAILLOCALPART },
|
Server { protocol: Smtp, socket: Starttls, hostname: "smtp.web.de", port: 587, username_pattern: Emaillocalpart },
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
strict_tls: true,
|
strict_tls: true,
|
||||||
@@ -1098,13 +1101,13 @@ static P_WEB_DE: Lazy<Provider> = Lazy::new(|| {
|
|||||||
static P_YAHOO: Lazy<Provider> = Lazy::new(|| {
|
static P_YAHOO: Lazy<Provider> = Lazy::new(|| {
|
||||||
Provider {
|
Provider {
|
||||||
id: "yahoo",
|
id: "yahoo",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint: "To use Delta Chat with your Yahoo email address you have to create an \"App-Password\" in the account security screen.",
|
before_login_hint: "To use Delta Chat with your Yahoo email address you have to create an \"App-Password\" in the account security screen.",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/yahoo",
|
overview_page: "https://providers.delta.chat/yahoo",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server { protocol: IMAP, socket: SSL, hostname: "imap.mail.yahoo.com", port: 993, username_pattern: EMAIL },
|
Server { protocol: Imap, socket: Ssl, hostname: "imap.mail.yahoo.com", port: 993, username_pattern: Email },
|
||||||
Server { protocol: SMTP, socket: SSL, hostname: "smtp.mail.yahoo.com", port: 465, username_pattern: EMAIL },
|
Server { protocol: Smtp, socket: Ssl, hostname: "smtp.mail.yahoo.com", port: 465, username_pattern: Email },
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
strict_tls: true,
|
strict_tls: true,
|
||||||
@@ -1116,24 +1119,24 @@ static P_YAHOO: Lazy<Provider> = Lazy::new(|| {
|
|||||||
// yandex.ru.md: yandex.com, yandex.by, yandex.kz, yandex.ru, yandex.ua, ya.ru, narod.ru
|
// yandex.ru.md: yandex.com, yandex.by, yandex.kz, yandex.ru, yandex.ua, ya.ru, narod.ru
|
||||||
static P_YANDEX_RU: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_YANDEX_RU: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "yandex.ru",
|
id: "yandex.ru",
|
||||||
status: Status::PREPARATION,
|
status: Status::Preparation,
|
||||||
before_login_hint: "For Yandex accounts, you have to set IMAP protocol option turned on.",
|
before_login_hint: "For Yandex accounts, you have to set IMAP protocol option turned on.",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/yandex-ru",
|
overview_page: "https://providers.delta.chat/yandex-ru",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "imap.yandex.com",
|
hostname: "imap.yandex.com",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "smtp.yandex.com",
|
hostname: "smtp.yandex.com",
|
||||||
port: 465,
|
port: 465,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -1145,24 +1148,24 @@ static P_YANDEX_RU: Lazy<Provider> = Lazy::new(|| Provider {
|
|||||||
// ziggo.nl.md: ziggo.nl
|
// ziggo.nl.md: ziggo.nl
|
||||||
static P_ZIGGO_NL: Lazy<Provider> = Lazy::new(|| Provider {
|
static P_ZIGGO_NL: Lazy<Provider> = Lazy::new(|| Provider {
|
||||||
id: "ziggo.nl",
|
id: "ziggo.nl",
|
||||||
status: Status::OK,
|
status: Status::Ok,
|
||||||
before_login_hint: "",
|
before_login_hint: "",
|
||||||
after_login_hint: "",
|
after_login_hint: "",
|
||||||
overview_page: "https://providers.delta.chat/ziggo-nl",
|
overview_page: "https://providers.delta.chat/ziggo-nl",
|
||||||
server: vec![
|
server: vec![
|
||||||
Server {
|
Server {
|
||||||
protocol: IMAP,
|
protocol: Imap,
|
||||||
socket: SSL,
|
socket: Ssl,
|
||||||
hostname: "imap.ziggo.nl",
|
hostname: "imap.ziggo.nl",
|
||||||
port: 993,
|
port: 993,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
Server {
|
Server {
|
||||||
protocol: SMTP,
|
protocol: Smtp,
|
||||||
socket: STARTTLS,
|
socket: Starttls,
|
||||||
hostname: "smtp.ziggo.nl",
|
hostname: "smtp.ziggo.nl",
|
||||||
port: 587,
|
port: 587,
|
||||||
username_pattern: EMAIL,
|
username_pattern: Email,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
config_defaults: None,
|
config_defaults: None,
|
||||||
@@ -1405,4 +1408,4 @@ pub(crate) static PROVIDER_IDS: Lazy<HashMap<&'static str, &'static Provider>> =
|
|||||||
});
|
});
|
||||||
|
|
||||||
pub static PROVIDER_UPDATED: Lazy<chrono::NaiveDate> =
|
pub static PROVIDER_UPDATED: Lazy<chrono::NaiveDate> =
|
||||||
Lazy::new(|| chrono::NaiveDate::from_ymd(2021, 3, 18));
|
Lazy::new(|| chrono::NaiveDate::from_ymd(2021, 4, 10));
|
||||||
|
|||||||
@@ -10,24 +10,24 @@ use chrono::{NaiveDateTime, NaiveTime};
|
|||||||
#[derive(Debug, Display, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
#[derive(Debug, Display, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
pub enum Status {
|
pub enum Status {
|
||||||
OK = 1,
|
Ok = 1,
|
||||||
PREPARATION = 2,
|
Preparation = 2,
|
||||||
BROKEN = 3,
|
Broken = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Display, PartialEq, Copy, Clone, FromPrimitive, ToPrimitive)]
|
#[derive(Debug, Display, PartialEq, Copy, Clone, FromPrimitive, ToPrimitive)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
pub enum Protocol {
|
pub enum Protocol {
|
||||||
SMTP = 1,
|
Smtp = 1,
|
||||||
IMAP = 2,
|
Imap = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Display, PartialEq, Copy, Clone, FromPrimitive, ToPrimitive)]
|
#[derive(Debug, Display, PartialEq, Copy, Clone, FromPrimitive, ToPrimitive)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
pub enum Socket {
|
pub enum Socket {
|
||||||
Automatic = 0,
|
Automatic = 0,
|
||||||
SSL = 1,
|
Ssl = 1,
|
||||||
STARTTLS = 2,
|
Starttls = 2,
|
||||||
Plain = 3,
|
Plain = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,8 +40,8 @@ impl Default for Socket {
|
|||||||
#[derive(Debug, PartialEq, Clone)]
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
pub enum UsernamePattern {
|
pub enum UsernamePattern {
|
||||||
EMAIL = 1,
|
Email = 1,
|
||||||
EMAILLOCALPART = 2,
|
Emaillocalpart = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
@@ -151,6 +151,8 @@ pub async fn get_provider_by_mx(domain: impl AsRef<str>) -> Option<&'static Prov
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: uncomment when clippy starts complaining about it
|
||||||
|
//#[allow(clippy::manual_map)] // Can't use .map() because the lifetime is not propagated
|
||||||
pub fn get_provider_by_id(id: &str) -> Option<&'static Provider> {
|
pub fn get_provider_by_id(id: &str) -> Option<&'static Provider> {
|
||||||
if let Some(provider) = PROVIDER_IDS.get(id) {
|
if let Some(provider) = PROVIDER_IDS.get(id) {
|
||||||
Some(provider)
|
Some(provider)
|
||||||
@@ -181,34 +183,34 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_get_provider_by_domain_mixed_case() {
|
fn test_get_provider_by_domain_mixed_case() {
|
||||||
let provider = get_provider_by_domain("nAUta.Cu").unwrap();
|
let provider = get_provider_by_domain("nAUta.Cu").unwrap();
|
||||||
assert!(provider.status == Status::OK);
|
assert!(provider.status == Status::Ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_get_provider_by_domain() {
|
fn test_get_provider_by_domain() {
|
||||||
let addr = "nauta.cu";
|
let addr = "nauta.cu";
|
||||||
let provider = get_provider_by_domain(addr).unwrap();
|
let provider = get_provider_by_domain(addr).unwrap();
|
||||||
assert!(provider.status == Status::OK);
|
assert!(provider.status == Status::Ok);
|
||||||
let server = &provider.server[0];
|
let server = &provider.server[0];
|
||||||
assert_eq!(server.protocol, Protocol::IMAP);
|
assert_eq!(server.protocol, Protocol::Imap);
|
||||||
assert_eq!(server.socket, Socket::STARTTLS);
|
assert_eq!(server.socket, Socket::Starttls);
|
||||||
assert_eq!(server.hostname, "imap.nauta.cu");
|
assert_eq!(server.hostname, "imap.nauta.cu");
|
||||||
assert_eq!(server.port, 143);
|
assert_eq!(server.port, 143);
|
||||||
assert_eq!(server.username_pattern, UsernamePattern::EMAIL);
|
assert_eq!(server.username_pattern, UsernamePattern::Email);
|
||||||
let server = &provider.server[1];
|
let server = &provider.server[1];
|
||||||
assert_eq!(server.protocol, Protocol::SMTP);
|
assert_eq!(server.protocol, Protocol::Smtp);
|
||||||
assert_eq!(server.socket, Socket::STARTTLS);
|
assert_eq!(server.socket, Socket::Starttls);
|
||||||
assert_eq!(server.hostname, "smtp.nauta.cu");
|
assert_eq!(server.hostname, "smtp.nauta.cu");
|
||||||
assert_eq!(server.port, 25);
|
assert_eq!(server.port, 25);
|
||||||
assert_eq!(server.username_pattern, UsernamePattern::EMAIL);
|
assert_eq!(server.username_pattern, UsernamePattern::Email);
|
||||||
|
|
||||||
let provider = get_provider_by_domain("gmail.com").unwrap();
|
let provider = get_provider_by_domain("gmail.com").unwrap();
|
||||||
assert!(provider.status == Status::PREPARATION);
|
assert!(provider.status == Status::Preparation);
|
||||||
assert!(!provider.before_login_hint.is_empty());
|
assert!(!provider.before_login_hint.is_empty());
|
||||||
assert!(!provider.overview_page.is_empty());
|
assert!(!provider.overview_page.is_empty());
|
||||||
|
|
||||||
let provider = get_provider_by_domain("googlemail.com").unwrap();
|
let provider = get_provider_by_domain("googlemail.com").unwrap();
|
||||||
assert!(provider.status == Status::PREPARATION);
|
assert!(provider.status == Status::Preparation);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -103,8 +103,8 @@ def process_data(data, file):
|
|||||||
if username_pattern != "EMAIL" and username_pattern != "EMAILLOCALPART":
|
if username_pattern != "EMAIL" and username_pattern != "EMAILLOCALPART":
|
||||||
raise TypeError("bad username pattern")
|
raise TypeError("bad username pattern")
|
||||||
|
|
||||||
server += (" Server { protocol: " + protocol + ", socket: " + socket + ", hostname: \""
|
server += (" Server { protocol: " + protocol.capitalize() + ", socket: " + socket.capitalize() + ", hostname: \""
|
||||||
+ hostname + "\", port: " + str(port) + ", username_pattern: " + username_pattern + " },\n")
|
+ hostname + "\", port: " + str(port) + ", username_pattern: " + username_pattern.capitalize() + " },\n")
|
||||||
|
|
||||||
config_defaults = process_config_defaults(data)
|
config_defaults = process_config_defaults(data)
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ def process_data(data, file):
|
|||||||
if (not has_imap and not has_smtp) or (has_imap and has_smtp):
|
if (not has_imap and not has_smtp) or (has_imap and has_smtp):
|
||||||
provider += "static " + file2varname(file) + ": Lazy<Provider> = Lazy::new(|| Provider {\n"
|
provider += "static " + file2varname(file) + ": Lazy<Provider> = Lazy::new(|| Provider {\n"
|
||||||
provider += " id: \"" + file2id(file) + "\",\n"
|
provider += " id: \"" + file2id(file) + "\",\n"
|
||||||
provider += " status: Status::" + status + ",\n"
|
provider += " status: Status::" + status.capitalize() + ",\n"
|
||||||
provider += " before_login_hint: \"" + before_login_hint + "\",\n"
|
provider += " before_login_hint: \"" + before_login_hint + "\",\n"
|
||||||
provider += " after_login_hint: \"" + after_login_hint + "\",\n"
|
provider += " after_login_hint: \"" + after_login_hint + "\",\n"
|
||||||
provider += " overview_page: \"" + file2url(file) + "\",\n"
|
provider += " overview_page: \"" + file2url(file) + "\",\n"
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ const HTTP_SCHEME: &str = "http://";
|
|||||||
const HTTPS_SCHEME: &str = "https://";
|
const HTTPS_SCHEME: &str = "https://";
|
||||||
|
|
||||||
// Make it easy to convert errors into the final `Lot`.
|
// Make it easy to convert errors into the final `Lot`.
|
||||||
impl Into<Lot> for Error {
|
impl From<Error> for Lot {
|
||||||
fn into(self) -> Lot {
|
fn from(error: Error) -> Self {
|
||||||
let mut l = Lot::new();
|
let mut l = Self::new();
|
||||||
l.state = LotState::QrError;
|
l.state = LotState::QrError;
|
||||||
l.text1 = Some(self.to_string());
|
l.text1 = Some(error.to_string());
|
||||||
|
|
||||||
l
|
l
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -553,9 +553,9 @@ impl SmtpConnectionState {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let state = ConnectionState {
|
let state = ConnectionState {
|
||||||
idle_interrupt_sender,
|
|
||||||
shutdown_receiver,
|
shutdown_receiver,
|
||||||
stop_sender,
|
stop_sender,
|
||||||
|
idle_interrupt_sender,
|
||||||
};
|
};
|
||||||
|
|
||||||
let conn = SmtpConnectionState { state };
|
let conn = SmtpConnectionState { state };
|
||||||
@@ -600,9 +600,9 @@ impl ImapConnectionState {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let state = ConnectionState {
|
let state = ConnectionState {
|
||||||
idle_interrupt_sender,
|
|
||||||
shutdown_receiver,
|
shutdown_receiver,
|
||||||
stop_sender,
|
stop_sender,
|
||||||
|
idle_interrupt_sender,
|
||||||
};
|
};
|
||||||
|
|
||||||
let conn = ImapConnectionState { state };
|
let conn = ImapConnectionState { state };
|
||||||
|
|||||||
@@ -60,14 +60,11 @@ pub struct BobStateHandle<'a> {
|
|||||||
impl<'a> BobStateHandle<'a> {
|
impl<'a> BobStateHandle<'a> {
|
||||||
/// Creates a new instance, upholding the guarantee that [`BobState`] must exist.
|
/// Creates a new instance, upholding the guarantee that [`BobState`] must exist.
|
||||||
pub fn from_guard(mut guard: MutexGuard<'a, Option<BobState>>) -> Option<Self> {
|
pub fn from_guard(mut guard: MutexGuard<'a, Option<BobState>>) -> Option<Self> {
|
||||||
match guard.take() {
|
guard.take().map(|bobstate| Self {
|
||||||
Some(bobstate) => Some(Self {
|
|
||||||
guard,
|
guard,
|
||||||
bobstate,
|
bobstate,
|
||||||
clear_state_on_drop: false,
|
clear_state_on_drop: false,
|
||||||
}),
|
})
|
||||||
None => None,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the [`ChatId`] of the 1:1 chat with the inviter (Alice).
|
/// Returns the [`ChatId`] of the 1:1 chat with the inviter (Alice).
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ impl Smtp {
|
|||||||
|
|
||||||
let security = match lp.security {
|
let security = match lp.security {
|
||||||
Socket::Plain => smtp::ClientSecurity::None,
|
Socket::Plain => smtp::ClientSecurity::None,
|
||||||
Socket::STARTTLS => smtp::ClientSecurity::Required(tls_parameters),
|
Socket::Starttls => smtp::ClientSecurity::Required(tls_parameters),
|
||||||
_ => smtp::ClientSecurity::Wrapper(tls_parameters),
|
_ => smtp::ClientSecurity::Wrapper(tls_parameters),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -804,7 +804,7 @@ mod test {
|
|||||||
"File {} was almost deleted, only reason it was kept is that it was created recently (as the tests don't run for a long time)",
|
"File {} was almost deleted, only reason it was kept is that it was created recently (as the tests don't run for a long time)",
|
||||||
s
|
s
|
||||||
),
|
),
|
||||||
EventType::Error(s) => panic!(s),
|
EventType::Error(s) => panic!("{}", s),
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -500,7 +500,7 @@ impl Drop for TestContext {
|
|||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
if !thread::panicking() {
|
if !thread::panicking() {
|
||||||
if let Ok(p) = self.poison_receiver.try_recv() {
|
if let Ok(p) = self.poison_receiver.try_recv() {
|
||||||
panic!(p);
|
panic!("{}", p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user