|
|
|
@ -1176,6 +1176,18 @@ format = "mbox"
|
|
|
|
|
index_style = "Compact"
|
|
|
|
|
identity="username@hostname.local"
|
|
|
|
|
|
|
|
|
|
[composing]
|
|
|
|
|
send_mail = '/bin/false'
|
|
|
|
|
"#;
|
|
|
|
|
const IMAP_CONFIG: &str = r#"
|
|
|
|
|
[accounts.imap]
|
|
|
|
|
root_mailbox = "INBOX"
|
|
|
|
|
format = "imap"
|
|
|
|
|
identity="username@example.com"
|
|
|
|
|
server_username = "null"
|
|
|
|
|
server_hostname = "example.com"
|
|
|
|
|
server_password_command = "/bin/false"
|
|
|
|
|
|
|
|
|
|
[composing]
|
|
|
|
|
send_mail = '/bin/false'
|
|
|
|
|
"#;
|
|
|
|
@ -1227,6 +1239,12 @@ send_mail = '/bin/false'
|
|
|
|
|
"Unrecognised configuration values: {\"index_style\": \"Compact\"}"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/* Test IMAP config */
|
|
|
|
|
|
|
|
|
|
let new_file = ConfigFile::new(IMAP_CONFIG).unwrap();
|
|
|
|
|
FileSettings::validate(new_file.path.clone(), false, true)
|
|
|
|
|
.expect("could not parse IMAP config");
|
|
|
|
|
|
|
|
|
|
/* Test sample config */
|
|
|
|
|
|
|
|
|
|
let example_config = EXAMPLE_CONFIG.replace("\n#", "\n");
|
|
|
|
|