mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-07 20:44:15 +08:00
Updated setting names
This commit is contained in:
parent
9cf2863a8e
commit
8511de8a4d
5 changed files with 24 additions and 21 deletions
|
@ -45,32 +45,32 @@ impl GroupwareConfig {
|
|||
max_lock_timeout: config.property("dav.lock.max-timeout").unwrap_or(3600),
|
||||
max_locks_per_user: config.property("dav.locks.max-per-user").unwrap_or(10),
|
||||
max_results: config.property("dav.response.max-results").unwrap_or(2000),
|
||||
max_vcard_size: config.property("contacts.max-size").unwrap_or(512 * 1024),
|
||||
max_ical_size: config.property("calendar.max-size").unwrap_or(512 * 1024),
|
||||
default_calendar_name: config
|
||||
.property_or_default::<Option<String>>("calendar.default.href-name", "default")
|
||||
.unwrap_or_default(),
|
||||
default_addressbook_name: config
|
||||
.property_or_default::<Option<String>>("contacts.default.href-name", "default")
|
||||
.unwrap_or_default(),
|
||||
default_calendar_display_name: config
|
||||
.property_or_default::<Option<String>>(
|
||||
"calendar.default.display-name",
|
||||
"Stalwart Calendar",
|
||||
)
|
||||
.unwrap_or_default(),
|
||||
default_addressbook_name: config
|
||||
.property_or_default::<Option<String>>("contacts.default.href-name", "default")
|
||||
.unwrap_or_default(),
|
||||
default_addressbook_display_name: config
|
||||
.property_or_default::<Option<String>>(
|
||||
"contacts.default.display-name",
|
||||
"Stalwart Address Book",
|
||||
)
|
||||
.unwrap_or_default(),
|
||||
max_ical_size: config.property("calendar.max-size").unwrap_or(512 * 1024),
|
||||
max_ical_instances: config
|
||||
.property("calendar.max-recurrence-expansions")
|
||||
.unwrap_or(3000),
|
||||
max_ical_attendees_per_instance: config
|
||||
.property("calendar.max-attendees-per-instance")
|
||||
.unwrap_or(20),
|
||||
max_vcard_size: config.property("contacts.max-size").unwrap_or(512 * 1024),
|
||||
max_file_size: config
|
||||
.property("file-storage.max-size")
|
||||
.unwrap_or(25 * 1024 * 1024),
|
||||
|
|
|
@ -130,7 +130,7 @@ impl JmapConfig {
|
|||
let mut default_folders = Vec::new();
|
||||
let mut shared_folder = "Shared Folders".to_string();
|
||||
for key in config
|
||||
.sub_keys("jmap.folders", ".name")
|
||||
.sub_keys("email.folders", ".name")
|
||||
.map(|v| v.to_string())
|
||||
.collect::<Vec<_>>()
|
||||
{
|
||||
|
@ -142,22 +142,22 @@ impl JmapConfig {
|
|||
}
|
||||
Ok(special_use) => {
|
||||
let subscribe = config
|
||||
.property_or_default(("jmap.folders", key.as_str(), "subscribe"), "true")
|
||||
.property_or_default(("email.folders", key.as_str(), "subscribe"), "true")
|
||||
.unwrap_or(true);
|
||||
let create = config
|
||||
.property_or_default(("jmap.folders", key.as_str(), "create"), "true")
|
||||
.property_or_default(("email.folders", key.as_str(), "create"), "true")
|
||||
.unwrap_or(true)
|
||||
| [SpecialUse::Inbox, SpecialUse::Trash, SpecialUse::Junk]
|
||||
.contains(&special_use);
|
||||
if let Some(name) = config
|
||||
.value(("jmap.folders", key.as_str(), "name"))
|
||||
.value(("email.folders", key.as_str(), "name"))
|
||||
.map(|name| name.trim())
|
||||
.filter(|name| !name.is_empty())
|
||||
{
|
||||
default_folders.push(DefaultFolder {
|
||||
name: name.to_string(),
|
||||
aliases: config
|
||||
.value(("jmap.folders", key.as_str(), "aliases"))
|
||||
.value(("email.folders", key.as_str(), "aliases"))
|
||||
.unwrap_or_default()
|
||||
.split(',')
|
||||
.map(|s| s.trim().to_string())
|
||||
|
@ -285,7 +285,7 @@ impl JmapConfig {
|
|||
mail_max_size: config.property("jmap.email.max-size").unwrap_or(75000000),
|
||||
mail_parse_max_items: config.property("jmap.email.parse.max-items").unwrap_or(10),
|
||||
mail_autoexpunge_after: config
|
||||
.property_or_default::<Option<Duration>>("jmap.email.auto-expunge", "30d")
|
||||
.property_or_default::<Option<Duration>>("email.auto-expunge", "30d")
|
||||
.unwrap_or_default(),
|
||||
sieve_max_script_name: config
|
||||
.property("sieve.untrusted.limits.name-length")
|
||||
|
@ -316,10 +316,10 @@ impl JmapConfig {
|
|||
.property_or_default("jmap.push.max-total", "100")
|
||||
.unwrap_or(100),
|
||||
encrypt: config
|
||||
.property_or_default("storage.encryption.enable", "true")
|
||||
.property_or_default("email.encryption.enable", "true")
|
||||
.unwrap_or(true),
|
||||
encrypt_append: config
|
||||
.property_or_default("storage.encryption.append", "false")
|
||||
.property_or_default("email.encryption.append", "false")
|
||||
.unwrap_or(false),
|
||||
http_use_forwarded: config.property("http.use-x-forwarded").unwrap_or(false),
|
||||
http_headers,
|
||||
|
@ -342,7 +342,7 @@ impl JmapConfig {
|
|||
.property_or_default("jmap.push.throttle", "1s")
|
||||
.unwrap_or_else(|| Duration::from_secs(1)),
|
||||
account_purge_frequency: config
|
||||
.property_or_default::<SimpleCron>("jmap.account.purge.frequency", "0 0 *")
|
||||
.property_or_default::<SimpleCron>("account.purge.frequency", "0 0 *")
|
||||
.unwrap_or_else(|| SimpleCron::parse_value("0 0 *").unwrap()),
|
||||
fallback_admin: config
|
||||
.value("authentication.fallback-admin.user")
|
||||
|
|
|
@ -259,7 +259,10 @@ mod test {
|
|||
fn print_permissions() {
|
||||
const CHECK: &str = ":white_check_mark:";
|
||||
|
||||
for permission in Permission::all() {
|
||||
let mut permissions = Permission::all().collect::<Vec<_>>();
|
||||
permissions.sort_by(|a, b| a.name().cmp(b.name()));
|
||||
|
||||
for permission in permissions {
|
||||
println!(
|
||||
"|`{}`|{}|{}|{}|{}|",
|
||||
permission.name(),
|
||||
|
|
|
@ -788,23 +788,23 @@ throttle = "500ms"
|
|||
throttle = "500ms"
|
||||
attempts.interval = "500ms"
|
||||
|
||||
[jmap.folders.inbox]
|
||||
[email.folders.inbox]
|
||||
name = "Inbox"
|
||||
subscribe = false
|
||||
|
||||
[jmap.folders.sent]
|
||||
[email.folders.sent]
|
||||
name = "Sent Items"
|
||||
subscribe = false
|
||||
|
||||
[jmap.folders.trash]
|
||||
[email.folders.trash]
|
||||
name = "Deleted Items"
|
||||
subscribe = false
|
||||
|
||||
[jmap.folders.junk]
|
||||
[email.folders.junk]
|
||||
name = "Junk Mail"
|
||||
subscribe = false
|
||||
|
||||
[jmap.folders.drafts]
|
||||
[email.folders.drafts]
|
||||
name = "Drafts"
|
||||
subscribe = false
|
||||
|
||||
|
|
|
@ -904,7 +904,7 @@ throttle = "500ms"
|
|||
throttle = "500ms"
|
||||
attempts.interval = "500ms"
|
||||
|
||||
[jmap.email]
|
||||
[email]
|
||||
auto-expunge = "1s"
|
||||
|
||||
[changes]
|
||||
|
|
Loading…
Add table
Reference in a new issue