mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-12-09 21:05:59 +08:00
Autoconfig for caldav, carddav and webdav (closes #1937)
This commit is contained in:
parent
3338d16a24
commit
8b9731790a
1 changed files with 19 additions and 0 deletions
|
|
@ -76,6 +76,25 @@ impl Autoconfig for Server {
|
|||
}
|
||||
|
||||
config.push_str("\t</emailProvider>\n");
|
||||
|
||||
for (tag, protocol, url) in [
|
||||
("addressBook", "carddav", "card"),
|
||||
("calendar", "caldav", "cal"),
|
||||
("fileShare", "webdav", "file"),
|
||||
] {
|
||||
let _ = writeln!(&mut config, "\t<{tag} type=\"{protocol}\">");
|
||||
let _ = writeln!(&mut config, "\t\t<username>{account_name}</username>");
|
||||
let _ = writeln!(
|
||||
&mut config,
|
||||
"\t\t<authentication>http-basic</authentication>"
|
||||
);
|
||||
let _ = writeln!(
|
||||
&mut config,
|
||||
"\t\t<serverURL>https://{server_name}/dav/{url}</serverURL>"
|
||||
);
|
||||
let _ = writeln!(&mut config, "\t</{tag}>");
|
||||
}
|
||||
|
||||
let _ = writeln!(
|
||||
&mut config,
|
||||
"\t<clientConfigUpdate url=\"https://autoconfig.{domain}/mail/config-v1.1.xml\"></clientConfigUpdate>"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue