If writing a LIST reply line failed because the output stream was closed,
cmd_list_continue() returned without deinitializing the mailbox list
iterator. Besides leaking memory (around 75-140 kB per command with
150-600 folders), the iterator keeps references to the mailbox { }
settings of all autocreated mailboxes, which caused warnings when the
imap process exited:
Warning: Leaked settings: mail-storage-settings.c:819
Broken by 69fe2beffa
Default setting overrides cached for settings roots without config have no
overrides_array, so array_default_added must be set the same way as in
settings_instance_overrides_add_filters().
Fixes assert-crash in test-smtp-submit:
Panic: file settings.c: line 2111 (settings_instance_override_add_default): assertion failed: (array_set->overrides_array != NULL)
Broken by 7978e7a5b5
Adds SASL_SERVER_REQUEST_FLAG_CBIND_AVAILABLE flag. It indicates whether the
channel that SASL is used on supports channel binding, i.e. it is using TLS. If
there's no TLS, the downgrade attack check is disabled.
pop3c serialized its settings into unique_root_dir, which was then compared to
the new namespace's mail_path. That comparison could never succeed, so two pop3c
namespaces with identical settings always created separate mail_storages, and
"alias_for" between them failed with "Namespace <name> can't have alias_for= to
a different storage (different root dirs)".
An earlier imapc-related commit implemented storage_match() by comparing the
storage settings with settings_equal(), so the setting list no longer needs to
be kept in sync by hand. For the underlying pop3 client, the settings specific
to this client are compared as well. Also, the more generic SSL and SASL client
settings are compared, since they're used for the establishing the pop3c
connection. This means they're now looked up already when the storage is
created, so invalid ssl_client_* and client_auth_* settings fail namespace
initialization instead of the first connection attempt. These settings are
looked up from the namespace's list event, so storage_match() properly sees
namespace-scoped settings.
Unlike the old serialized string, mail_path isn't compared. The pop3c storage
holds no path-specific state, the index paths come from the mailbox list, so two
namespaces pointing to the same remote mailboxes can share the storage even if
their indexes are stored in different directories. A client that was created
disabled (e.g. for a shared namespace whose owner doesn't exist) is never
shared, and a namespace that must not access the remote never reuses a working
client.
The pop3 client is now configured as follows:
pop3c_host = imap.example.com
pop3c_port = 143
pop3c_ssl = pop3s
pop3c {
ssl_client_require_valid_cert = no
}
The following setting is renamed:
pop3c_ssl_verify -> pop3c/ssl_client_require_valid_cert
The imap client is now configured as follows:
imapc_host = imap.example.com
imapc_port = 143
imapc_ssl = no
imapc {
client_auth PLAIN {
authid = imap-frontend
password = frop
}
}
The following settings are renamed:
imapc_user -> imapc/client_auth_authzid
imapc_master_user -> imapc/client_auth_authid
imapc_password -> imapc/client_auth_password
The following settings are deprecated:
imapc_sasl_mechanisms