Autoconfig testing
This commit is contained in:
@@ -80,10 +80,11 @@ impl BootManager {
|
||||
if config_path.is_none() {
|
||||
let mut args = std::env::args().skip(1);
|
||||
|
||||
while let Some(arg) = args
|
||||
.next()
|
||||
.and_then(|arg| arg.strip_prefix("--").map(|arg| arg.to_string()))
|
||||
{
|
||||
while let Some(arg) = args.next().and_then(|arg| {
|
||||
arg.strip_prefix("--")
|
||||
.or_else(|| arg.strip_prefix('-'))
|
||||
.map(|arg| arg.to_string())
|
||||
}) {
|
||||
let (key, value) = if let Some((key, value)) = arg.split_once('=') {
|
||||
(key.to_string(), Some(value.trim().to_string()))
|
||||
} else {
|
||||
|
||||
@@ -77,18 +77,18 @@ impl JMAP {
|
||||
"\t\t\t<socketType>{}</socketType>",
|
||||
if is_tls { "SSL" } else { "STARTTLS" }
|
||||
);
|
||||
let _ = writeln!(&mut config, "\t\t\t<username>{account_name}</username>");
|
||||
let _ = writeln!(
|
||||
&mut config,
|
||||
"\t\t\t<authentication>password-cleartext</authentication>"
|
||||
);
|
||||
let _ = writeln!(&mut config, "\t\t\t<username>{account_name}</username>");
|
||||
let _ = writeln!(&mut config, "\t\t</{tag}>");
|
||||
}
|
||||
|
||||
config.push_str("\t</emailProvider>\n");
|
||||
let _ = writeln!(
|
||||
&mut config,
|
||||
"\t<clientConfigUpdate url=\"https://autoconfig.{domain}/.well-known/mail-v1.xml\"/>"
|
||||
"\t<clientConfigUpdate url=\"https://autoconfig.{domain}/mail/config-v1.1.xml\"></clientConfigUpdate>"
|
||||
);
|
||||
config.push_str("</clientConfig>\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user