]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agolib: bits - new fractional log-like helper
Phil Carmody [Wed, 3 Feb 2016 16:34:13 +0000 (18:34 +0200)] 
lib: bits - new fractional log-like helper

For stats gathering, where the data can have a wide range of values, you
don't necessarily need the same granularity along the full range of values.
For example, 1ms and 11ms latencies are very different, but 1.001s and
1.011s latencies are not worth distinguishing. Something logarithmic seems
more apt. Simply looking at power-of-2 sized bands (e.g. doing log2(n)),
however, is too granular, so these new helpers let you specify how fine
to (linearly) subdivide each of those bands. 1 fractional bit splits
each power of 2 band into 2 halves. 2 fractional bits splits each power
of 2 band into 4 quarters, and so on. 0 fractional bits is just log2().

Exact identification of percentiles is impossible, but it was anyway, as you
simply cannot store all the data required to calculate them. However, a mere
896 buckets will permit you to have 32 bands per power of 2, 5 fracional bits.
The above example would have buckets such as 2.432s-2.496s, and 55.3s-56.3s.
Assuming smooth distribution lets you calculate percentiles more accurately,
just assume within each bucket is a trapezial distribution. This holds even
if the distribution is multi-modal, which it will be. However, maths required.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
9 years agolib: test-array - test new element-assigning iterator
Phil Carmody [Wed, 3 Feb 2016 15:37:27 +0000 (17:37 +0200)] 
lib: test-array - test new element-assigning iterator

Test that both (small) object copying and const/nonconst pointer copies work.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
9 years agolib: array - new copy-making array iterator
Phil Carmody [Wed, 3 Feb 2016 15:33:05 +0000 (17:33 +0200)] 
lib: array - new copy-making array iterator

Previously macros took a pointer, and that pointer was made to pointed
to each element of the array in turn. Typical use cases for things like
char* or struct* arrays were to immediately/repeatedly, dereference that
pointer.

This new iter (only one implementation done so far, more a proof of
concept) gets rid of the user-visable pointer, and performs the
dereference every time, and only when, a valid element is being
iterated over. Empty array => no assignment. No U.B.

NOTE: This cannot be done without assuming C99. It breaks the build
on compilers that old if any components that are enabled use the
macro. It strongly suggests we just need to make C99 mandatory.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
9 years agoRequire IPv6 to build
Martti Rannanjärvi [Fri, 8 Apr 2016 10:34:59 +0000 (13:34 +0300)] 
Require IPv6 to build

9 years agodoveadm: print to stdout in table formatter
Martti Rannanjärvi [Fri, 8 Apr 2016 11:30:40 +0000 (14:30 +0300)] 
doveadm: print to stdout in table formatter

9 years agolib-sql: ssl_verify_server_cert=1 default on mysql
Martti Rannanjärvi [Thu, 14 Apr 2016 12:19:09 +0000 (15:19 +0300)] 
lib-sql: ssl_verify_server_cert=1 default on mysql

9 years agolib: Implement utc_mktime() with timegm() if it exists.
Timo Sirainen [Mon, 18 Apr 2016 13:40:49 +0000 (16:40 +0300)] 
lib: Implement utc_mktime() with timegm() if it exists.

It should be more efficient than repeatedly calling gmtime() many times.

9 years agoauth: Added passdb/userdb { auth_verbose } setting.
Timo Sirainen [Tue, 19 Apr 2016 08:55:00 +0000 (11:55 +0300)] 
auth: Added passdb/userdb { auth_verbose } setting.

If this is explicitly set to yes or no, it overrides the global auth_verbose
setting. However, auth_debug=yes overrides all of the auth_verbose settings.

9 years agolib-storage: Added MAIL_STORAGE_CLASS_FLAG_NO_LIST_DELETES and MAILBOX_LIST_FLAG_NO_D...
Timo Sirainen [Tue, 19 Apr 2016 13:59:48 +0000 (16:59 +0300)] 
lib-storage: Added MAIL_STORAGE_CLASS_FLAG_NO_LIST_DELETES and MAILBOX_LIST_FLAG_NO_DELETES

9 years agodirector: director_consistent_hashing=yes default
Martti Rannanjärvi [Thu, 14 Apr 2016 11:39:52 +0000 (14:39 +0300)] 
director: director_consistent_hashing=yes default

9 years agodirector: Compiler warning fix
Timo Sirainen [Mon, 18 Apr 2016 18:52:37 +0000 (21:52 +0300)] 
director: Compiler warning fix

9 years agolib-storage: mdbox_rotate_size=10M default
Martti Rannanjärvi [Thu, 14 Apr 2016 11:12:08 +0000 (14:12 +0300)] 
lib-storage: mdbox_rotate_size=10M default

9 years agodirector: Remove director_doveadm_port
Baofeng [Fri, 15 Apr 2016 07:02:20 +0000 (10:02 +0300)] 
director: Remove director_doveadm_port

the flag is obsoleted by inet_listener doveadm name.
And listener_get_socket_type_fallback() will fallback to token ring
when socket name is missing.

9 years agostats plugin: stats_notify_path can now specify path to the stats-mail FIFO
Timo Sirainen [Fri, 15 Apr 2016 11:51:42 +0000 (14:51 +0300)] 
stats plugin: stats_notify_path can now specify path to the stats-mail FIFO

9 years agolib-stats: Handle better write() to stats process failing with EAGAIN
Timo Sirainen [Fri, 15 Apr 2016 12:01:20 +0000 (15:01 +0300)] 
lib-stats: Handle better write() to stats process failing with EAGAIN

It only means that the stats process is too busy and the FIFO is filled up.
Retrying the write later should work. We also don't want to log too much about
the same warning, so do it only once per 30 seconds.

9 years agolib-http: server: Prevent aborting finished or already aborted requests again.
Stephan Bosch [Wed, 13 Apr 2016 21:12:00 +0000 (23:12 +0200)] 
lib-http: server: Prevent aborting finished or already aborted requests again.

9 years agoconfigure: Fixed building lib-ldap / dict-ldap --with-ldap=plugin
Timo Sirainen [Wed, 13 Apr 2016 14:19:52 +0000 (17:19 +0300)] 
configure: Fixed building lib-ldap / dict-ldap --with-ldap=plugin

9 years agolib-dict: Don't build dict-ldap if --with-ldap=no
Timo Sirainen [Wed, 13 Apr 2016 14:17:53 +0000 (17:17 +0300)] 
lib-dict: Don't build dict-ldap if --with-ldap=no

9 years agodoveconf: Improved the warning message about global setting not overriding a filter
Timo Sirainen [Wed, 13 Apr 2016 10:47:51 +0000 (13:47 +0300)] 
doveconf: Improved the warning message about global setting not overriding a filter

9 years agoconfigure: Switched version number to 2.3.devel
Timo Sirainen [Wed, 13 Apr 2016 10:40:31 +0000 (13:40 +0300)] 
configure: Switched version number to 2.3.devel

9 years agolib-dict: Disable debug log unless debug enabled
Aki Tuomi [Wed, 13 Apr 2016 08:22:12 +0000 (11:22 +0300)] 
lib-dict: Disable debug log unless debug enabled

9 years agolib-ldap: Allow disabling of TLS
Aki Tuomi [Wed, 13 Apr 2016 08:01:29 +0000 (11:01 +0300)] 
lib-ldap: Allow disabling of TLS

9 years agolib-dict: Add option to enforce SSL
Aki Tuomi [Mon, 11 Apr 2016 19:56:40 +0000 (22:56 +0300)] 
lib-dict: Add option to enforce SSL

9 years agolib-ldap: Hard fail when SSL is required
Aki Tuomi [Mon, 11 Apr 2016 19:56:37 +0000 (22:56 +0300)] 
lib-ldap: Hard fail when SSL is required

9 years agolib-ldap: Allow and warn insecure LDAP connection
Aki Tuomi [Mon, 11 Apr 2016 17:44:41 +0000 (20:44 +0300)] 
lib-ldap: Allow and warn insecure LDAP connection

9 years agolib-ldap: Remove callback from connection_connect
Aki Tuomi [Mon, 11 Apr 2016 17:32:55 +0000 (20:32 +0300)] 
lib-ldap: Remove callback from connection_connect

9 years agolib-dict: Reuse LDAP connections
Aki Tuomi [Mon, 11 Apr 2016 14:29:35 +0000 (17:29 +0300)] 
lib-dict: Reuse LDAP connections

9 years agolib-ldap: Max idle time is seconds
Aki Tuomi [Mon, 11 Apr 2016 14:29:02 +0000 (17:29 +0300)] 
lib-ldap: Max idle time is seconds

9 years agolib-ldap: Do not call NULL callback
Aki Tuomi [Mon, 11 Apr 2016 14:27:31 +0000 (17:27 +0300)] 
lib-ldap: Do not call NULL callback

9 years agolib: Moved enum iostream_rawlog_flags to public iostream-rawlog.h
Timo Sirainen [Tue, 12 Apr 2016 18:22:48 +0000 (21:22 +0300)] 
lib: Moved enum iostream_rawlog_flags to public iostream-rawlog.h

This allows using [io]stream-rawlog.h APIs directly.

9 years agolib: Added ostream-null
Timo Sirainen [Tue, 12 Apr 2016 17:00:51 +0000 (20:00 +0300)] 
lib: Added ostream-null

9 years agolib-storage: Fixed crash when using SEARCH INTHREAD
Timo Sirainen [Tue, 12 Apr 2016 13:48:34 +0000 (16:48 +0300)] 
lib-storage: Fixed crash when using SEARCH INTHREAD

mail_search_args_init() -> mail_search_args_simplify() -> .. ->
mail_search_arg_one_equals(), which assumed SEARCH_INTHREAD was already
initialized.

9 years agodoveconf: Log a warning if a global setting is updated after it was already set insid...
Timo Sirainen [Sun, 10 Apr 2016 11:41:28 +0000 (14:41 +0300)] 
doveconf: Log a warning if a global setting is updated after it was already set inside a filter

For example:

protocol imap {
  mail_plugins = $mail_plugins imap_quota
}
mail_plugins = $mail_plugins quota

Will result in:

doveconf: Warning: dovecot.conf line 4: Global setting mail_plugins won't
change the setting inside an earlier filter at dovecot.conf line 2

9 years agodoveconf, config: Free all memory at deinit
Timo Sirainen [Sun, 10 Apr 2016 11:39:22 +0000 (14:39 +0300)] 
doveconf, config: Free all memory at deinit

9 years agoimapc: Mark most of the commands retriable.
Timo Sirainen [Wed, 6 Apr 2016 11:45:01 +0000 (14:45 +0300)] 
imapc: Mark most of the commands retriable.

9 years agoimapc: If root separator lookup fails, fail all further lookups.
Timo Sirainen [Wed, 6 Apr 2016 11:44:00 +0000 (14:44 +0300)] 
imapc: If root separator lookup fails, fail all further lookups.

We already returned a potentially wrong separator (since there's no way to
return error), so we don't want to continue and possibly make things worse.

9 years agoimapc: Added missing error handling to subscriptions list refreshing.
Timo Sirainen [Wed, 6 Apr 2016 11:43:02 +0000 (14:43 +0300)] 
imapc: Added missing error handling to subscriptions list refreshing.

9 years agoimapc: Fixed mailbox_exists() error handling.
Timo Sirainen [Wed, 6 Apr 2016 11:41:16 +0000 (14:41 +0300)] 
imapc: Fixed mailbox_exists() error handling.

9 years agoimapc: Support retrying after connect() failure.
Timo Sirainen [Wed, 6 Apr 2016 11:24:21 +0000 (14:24 +0300)] 
imapc: Support retrying after connect() failure.

9 years agoimapc: Support retrying after connect/authentication timeouts.
Timo Sirainen [Wed, 6 Apr 2016 11:17:02 +0000 (14:17 +0300)] 
imapc: Support retrying after connect/authentication timeouts.

9 years agoimapc: Support retrying for non-mailbox commands.
Timo Sirainen [Wed, 6 Apr 2016 11:16:13 +0000 (14:16 +0300)] 
imapc: Support retrying for non-mailbox commands.

9 years agoimapc: Prepare for non-mailbox command retrying: Set reconnect_command_count earlier
Timo Sirainen [Wed, 6 Apr 2016 11:12:25 +0000 (14:12 +0300)] 
imapc: Prepare for non-mailbox command retrying: Set reconnect_command_count earlier

This probably doesn't fix itself anything yet, but is needed for the
following changes.

9 years agoimapc: Fixed checking of whether same IMAP command keeps crashing server.
Timo Sirainen [Wed, 6 Apr 2016 11:09:13 +0000 (14:09 +0300)] 
imapc: Fixed checking of whether same IMAP command keeps crashing server.

reconnect_command_count was counting only the post-login commands, but we
were decreasing it also for pre-login commands. This caused it to shrink to
0 too early.

9 years agoimapc: Code cleanup - imapc_connection_reconnect() is now always called when reconnec...
Timo Sirainen [Wed, 6 Apr 2016 11:05:26 +0000 (14:05 +0300)] 
imapc: Code cleanup - imapc_connection_reconnect() is now always called when reconnect is ok.

9 years agoimapc: Code cleanup - Use a common function for checking/logging if we want to reconn...
Timo Sirainen [Wed, 6 Apr 2016 11:03:20 +0000 (14:03 +0300)] 
imapc: Code cleanup - Use a common function for checking/logging if we want to reconnect or disconnect

9 years agolib-storage: Fixed error handling for mailbox_list_iter_init_namespaces()
Timo Sirainen [Wed, 6 Apr 2016 10:52:24 +0000 (13:52 +0300)] 
lib-storage: Fixed error handling for mailbox_list_iter_init_namespaces()

If iteration for the first namespace failed, we tried to copy the error
string to error_list, which was the same first namespace's list. This caused
the error string to be freed while it was being copied, so the end result
was that the error became either an empty or garbage string.

9 years agodsync: Don't export header hashes if remote mailbox is empty.
Timo Sirainen [Wed, 6 Apr 2016 09:41:38 +0000 (12:41 +0300)] 
dsync: Don't export header hashes if remote mailbox is empty.

This avoids doing a lot of work of reading through all mails' headers and
hashing them, when the hashes aren't actually going to be used for anything.

9 years agolib-http: server: Fixed bug in request reference counting caused by earlier fix ...
Stephan Bosch [Tue, 12 Apr 2016 09:42:38 +0000 (11:42 +0200)] 
lib-http: server: Fixed bug in request reference counting caused by earlier fix (390b600a6f7fdb4ccc65950527ee30129f49a6ac).

The earlier change erroneously dropped two lines that unreferenced the request object after calling the callback.

9 years agolib-master: Fixed assert-crash when HAProxy aborts connections.
Timo Sirainen [Tue, 12 Apr 2016 07:49:50 +0000 (10:49 +0300)] 
lib-master: Fixed assert-crash when HAProxy aborts connections.

close() was called before io_remove(), which resulted in:

Panic: epoll_ctl(del, 14) failed: Bad file descriptor

9 years agodict-ldap: Compiler warning fix
Timo Sirainen [Mon, 11 Apr 2016 09:24:59 +0000 (12:24 +0300)] 
dict-ldap: Compiler warning fix

9 years agolib-dict: Add ldap driver
Aki Tuomi [Mon, 11 Apr 2016 06:40:22 +0000 (09:40 +0300)] 
lib-dict: Add ldap driver

9 years agoconfigure: Add lib-ldap
Aki Tuomi [Mon, 11 Apr 2016 06:38:27 +0000 (09:38 +0300)] 
configure: Add lib-ldap

9 years agolib-ldap: Add lib-ldap implementation
Aki Tuomi [Mon, 11 Apr 2016 06:37:39 +0000 (09:37 +0300)] 
lib-ldap: Add lib-ldap implementation

9 years agolib-master: Fixed memory leaks when failing to read settings.
Timo Sirainen [Sun, 10 Apr 2016 11:57:48 +0000 (14:57 +0300)] 
lib-master: Fixed memory leaks when failing to read settings.

9 years agovirtual plugin: struct mail_vfuncs.close() wasn't implemented.
Timo Sirainen [Thu, 7 Apr 2016 14:50:28 +0000 (17:50 +0300)] 
virtual plugin: struct mail_vfuncs.close() wasn't implemented.

This wasn't a problem normally, because the core code wouldn't try to call
this. It became a problem only after other plugins were trying to call it.

9 years agolib-master: Preserve LOG_STDERR_TIMESTAMP environment through doveconf exec.
Timo Sirainen [Thu, 7 Apr 2016 13:35:28 +0000 (16:35 +0300)] 
lib-master: Preserve LOG_STDERR_TIMESTAMP environment through doveconf exec.

This should be needed only for standalone programs, so don't bother trying
to preserve it otherwise.

9 years agolmtp: Use separate session ID suffixes for each RCPT TO delivery.
Timo Sirainen [Tue, 5 Apr 2016 17:14:15 +0000 (20:14 +0300)] 
lmtp: Use separate session ID suffixes for each RCPT TO delivery.

Otherwise each delivery will use the same session ID when talking to stats
process, which results in errors like:

Error: stats: FIFO input error: CONNECT: Duplicate session ID ME3ZHCi+A1dUDQAAvAUe3g for user foobar service lmtp
Warning: stats: Couldn't find session ID: ME3ZHCi+A1dUDQAAvAUe3g

(There was a DISCONNECT for the session ID between these two log lines.)

9 years agolib-storage: Changed separator between session_id_prefix and unique part to be ':'
Timo Sirainen [Tue, 5 Apr 2016 17:10:53 +0000 (20:10 +0300)] 
lib-storage: Changed separator between session_id_prefix and unique part to be ':'

Although '-' wasn't used by default either, it's much more likely that
custom session IDs might contain it. ':' is hopefully less likely to be used.
This allows log parsers that actually want to find out the original session's
all log lines to cut out everything after the initial ':'.

9 years agolmtp: Changed default LMTP proxy timeout to 125 seconds.
Timo Sirainen [Wed, 6 Apr 2016 19:43:52 +0000 (22:43 +0300)] 
lmtp: Changed default LMTP proxy timeout to 125 seconds.

The main problem with LMTP proxy timing out too early is that it causes
duplicates if the backend actually finishes the mail delivery.

The 30 seconds is bad, because there are various timeouts in backend set
to 30 seconds also. 125 seconds is hopefully large enough to hit most of
the 2 minute timeouts and we'll have a few extra seconds left to see the
failure.

9 years agodoveadm sync: -R parameter shouldn't switch to "doveadm backup -R" behavior.
Timo Sirainen [Wed, 6 Apr 2016 19:12:54 +0000 (22:12 +0300)] 
doveadm sync: -R parameter shouldn't switch to "doveadm backup -R" behavior.

Just ignore the -R parameter for doveadm sync, unless -1 parameter is also
used. Alternatively we could also fail the command, but maybe that's
unnecessary extra work.

9 years agodoveadm: Reverted 7a3b52b8f - doveadm sync -1 -R is useful.
Timo Sirainen [Wed, 6 Apr 2016 19:08:14 +0000 (22:08 +0300)] 
doveadm: Reverted 7a3b52b8f - doveadm sync -1 -R is useful.

9 years agodict-redis: When timeout was reached, we didn't actually stop but just continued...
Timo Sirainen [Wed, 6 Apr 2016 17:19:04 +0000 (20:19 +0300)] 
dict-redis: When timeout was reached, we didn't actually stop but just continued waiting.

9 years agodoveadm-http: Fix mismatch in authorization
Aki Tuomi [Mon, 4 Apr 2016 18:05:44 +0000 (21:05 +0300)] 
doveadm-http: Fix mismatch in authorization

The code advertizes X-Dovecot-API in WWW-Authenticate header, but
expects X-Doveadm-API in Authorization header. This change makes
it expect X-Dovecot-API.

9 years agoimapc: If we get disconnected during SELECT/EXAMINE, retry it once.
Timo Sirainen [Tue, 5 Apr 2016 16:59:18 +0000 (19:59 +0300)] 
imapc: If we get disconnected during SELECT/EXAMINE, retry it once.

This seems to be happening especially with dsync migrations from IMAP
servers with small timeouts. The initial dsync run opens imapc connection
early to do a LIST + SELECT the first mailbox, but then dsync may spend a
while creating all the local mailboxes before it continues using the imapc
connection.

9 years agofts-tika: Don't crash on 500 errors (caused by 146f6f85d)
Timo Sirainen [Tue, 5 Apr 2016 13:26:08 +0000 (16:26 +0300)] 
fts-tika: Don't crash on 500 errors (caused by 146f6f85d)

http_req=NULL here set by http_client_request_send_payload(). Even if it
wasn't, the payload wouldn't be there.

9 years agodoveadm-proxy: Change to work with doveadm ver2
Aki Tuomi [Tue, 5 Apr 2016 09:05:15 +0000 (12:05 +0300)] 
doveadm-proxy: Change to work with doveadm ver2

9 years agolib-storage: FS layout assert-crashed when trying to list with invalid UTF8 pattern
Timo Sirainen [Mon, 4 Apr 2016 09:22:06 +0000 (12:22 +0300)] 
lib-storage: FS layout assert-crashed when trying to list with invalid UTF8 pattern

9 years agolib: Updated fdpass.h comments.
Timo Sirainen [Mon, 4 Apr 2016 08:11:13 +0000 (11:11 +0300)] 
lib: Updated fdpass.h comments.

9 years agoistream-unix: Fixed handling of EOF from fd_read() (ret==0).
Stephan Bosch [Sun, 3 Apr 2016 20:54:17 +0000 (22:54 +0200)] 
istream-unix: Fixed handling of EOF from fd_read() (ret==0).

This situation was ignored.

9 years agoquota: Fix NetBSD build.
Teemu Huovila [Thu, 31 Mar 2016 13:35:06 +0000 (16:35 +0300)] 
quota: Fix NetBSD build.

9 years agodoveadm-mail: Honor -u flag on v1 commands
Aki Tuomi [Thu, 31 Mar 2016 09:41:25 +0000 (12:41 +0300)] 
doveadm-mail: Honor -u flag on v1 commands

9 years agodoveadm-server: Register builtin dict drivers always at init
Timo Sirainen [Wed, 30 Mar 2016 13:24:56 +0000 (16:24 +0300)] 
doveadm-server: Register builtin dict drivers always at init

This was already done for doveadm. Fixes using doveadm dict commands via
doveadm-server.

9 years agodoveadm-mail: Initialize missing cmd context username
Aki Tuomi [Wed, 30 Mar 2016 10:14:40 +0000 (13:14 +0300)] 
doveadm-mail: Initialize missing cmd context username

Fixes assert-crash in doveadm_mail_single_user()

9 years agolib-storage: Fixed memory leak when iterating attributes.
Timo Sirainen [Wed, 30 Mar 2016 07:51:50 +0000 (10:51 +0300)] 
lib-storage: Fixed memory leak when iterating attributes.

9 years agodoveadm-mail: Don't lose rip/lip/lport/rport in passdb lookups for doveadm TCP connec...
Aki Tuomi [Wed, 30 Mar 2016 07:34:06 +0000 (10:34 +0300)] 
doveadm-mail: Don't lose rip/lip/lport/rport in passdb lookups for doveadm TCP connections

9 years agodirector: Avoid a potential assert-crash after removing a director from ring.
Timo Sirainen [Wed, 30 Mar 2016 05:24:51 +0000 (08:24 +0300)] 
director: Avoid a potential assert-crash after removing a director from ring.

This should fix the crash:
Panic: director: file director-connection.c: line 1926 (director_connection_init_out): assertion failed: (!host->removed)

Also moved the last_network_failure timestamp reset a bit later, since
there's no need to reset the timestamp if we're not actually connecting
to the server.

9 years agodoveadm: Fixed reading USER environment for v1 commands.
Timo Sirainen [Tue, 29 Mar 2016 18:17:22 +0000 (21:17 +0300)] 
doveadm: Fixed reading USER environment for v1 commands.

9 years agoimapc: Don't try to FETCH uncommitted mails, because it would attempt to FETCH uid=0
Timo Sirainen [Tue, 29 Mar 2016 17:38:19 +0000 (20:38 +0300)] 
imapc: Don't try to FETCH uncommitted mails, because it would attempt to FETCH uid=0

9 years agoauth: Disable auth caching for passwd-file
Timo Sirainen [Tue, 29 Mar 2016 12:17:29 +0000 (15:17 +0300)] 
auth: Disable auth caching for passwd-file

Its caching is usually unnecessary, because the passwd-files are efficiently
in memory already. It's also problematic, because extra_fields can contain
%variables, which can be lookup-dependent. So for example if %{lport} is used
in extra_fields, it would need to be included in the cache key. But because
different variables can be used by different users' extra_fields, there's
really no good way to include all of it in the cache key.

9 years agodoveadm-batch: Fixed error message for an unknown subcommand.
Timo Sirainen [Tue, 29 Mar 2016 12:04:01 +0000 (15:04 +0300)] 
doveadm-batch: Fixed error message for an unknown subcommand.

9 years agodoveadm: Fixed adding username header to commands iterating through multiple users.
Timo Sirainen [Tue, 29 Mar 2016 11:57:20 +0000 (14:57 +0300)] 
doveadm: Fixed adding username header to commands iterating through multiple users.

9 years agodoveadm-server: v2 mail commands weren't doing a userdb lookup.
Timo Sirainen [Tue, 29 Mar 2016 11:17:01 +0000 (14:17 +0300)] 
doveadm-server: v2 mail commands weren't doing a userdb lookup.

9 years agodoveadm-server: Fixed running multi-word commands.
Timo Sirainen [Tue, 29 Mar 2016 11:10:10 +0000 (14:10 +0300)] 
doveadm-server: Fixed running multi-word commands.

The problem with for example "mailbox status" command is that:
 - doveadm cli: argv[0] = "mailbox", argv[1] = "status"
 - doveadm-server: argv[0] = "mailbox status"

So with doveadm cli we'll now instead just skip over words until argv[0]
is the last word of the command ("status").

9 years agodoveadm: Code cleanup - always use const char *const[] type for argv.
Timo Sirainen [Tue, 29 Mar 2016 11:06:43 +0000 (14:06 +0300)] 
doveadm: Code cleanup - always use const char *const[] type for argv.

Needed to fix compiler warnings in the following patch.

9 years agologin-proxy: When logging failures, include the client info prefix.
Timo Sirainen [Tue, 29 Mar 2016 09:15:05 +0000 (12:15 +0300)] 
login-proxy: When logging failures, include the client info prefix.

9 years agologin-*: When logging about client certificate validity, include the client info...
Timo Sirainen [Tue, 29 Mar 2016 08:28:55 +0000 (11:28 +0300)] 
login-*: When logging about client certificate validity, include the client info prefix.

9 years agoauth: If user is unknown and there are more passdbs/userdb, log about it.
Timo Sirainen [Thu, 24 Mar 2016 18:01:00 +0000 (03:01 +0900)] 
auth: If user is unknown and there are more passdbs/userdb, log about it.

9 years agolib-http: client: Fixed request timeout handling during pipelining.
Stephan Bosch [Thu, 24 Mar 2016 17:48:55 +0000 (02:48 +0900)] 
lib-http: client: Fixed request timeout handling during pipelining.

The timeout was not managed correctly. If an earlier request finished, it
would not restart the timeout for the next pending request.

Also, filling the pipeline caused the timout to be reset inappropriately,
postponing its expiry.

9 years agolib-http: client: Fixed handling of stalled connections that emerge when the client...
Stephan Bosch [Thu, 24 Mar 2016 17:47:28 +0000 (02:47 +0900)] 
lib-http: client: Fixed handling of stalled connections that emerge when the client ioloop hasn't run for a long time.

Inside the peer's request handler routine, the connections are verified
after the ioloop continues. If they turn out to be broken, they
self-destruct while the handler routine is active, leading to problems.

Solved by referencing the connection and retrying the connection statistics
loop when a connection is lost in the process.

9 years agoSet postmaster_address=%d by default because imap now loads lda settings and it must...
Timo Sirainen [Thu, 24 Mar 2016 15:45:54 +0000 (00:45 +0900)] 
Set postmaster_address=%d by default because imap now loads lda settings and it must be non-empty.

We don't want imap to suddenly start failing because of the c15e8f33c
change. This isn't a perfect solution either, but should be ok enough.

9 years agodirector: Make sure freeing a user doesn't leak a timeout.
Timo Sirainen [Thu, 24 Mar 2016 01:07:15 +0000 (10:07 +0900)] 
director: Make sure freeing a user doesn't leak a timeout.

9 years agodirector: Fixed memory leak when killing a user.
Timo Sirainen [Thu, 24 Mar 2016 01:01:17 +0000 (10:01 +0900)] 
director: Fixed memory leak when killing a user.

9 years agodirector: Make sure a long-delayed kill reply for user doesn't mess up the state.
Timo Sirainen [Thu, 24 Mar 2016 01:00:00 +0000 (10:00 +0900)] 
director: Make sure a long-delayed kill reply for user doesn't mess up the state.

This should fix assert-crash:

director: Panic: file director.c: line 690 (director_user_kill_finish_delayed_to): assertion failed: (ctx->user->kill_state == USER_KILL_STATE_DELAY)

9 years agodirector: Small improvements to director-test.sh
Timo Sirainen [Thu, 24 Mar 2016 00:43:43 +0000 (09:43 +0900)] 
director: Small improvements to director-test.sh

Test with a bigger director ring. Include microseconds in log timestamps to
make debugging easier. Changed the name of the info_log_path.

9 years agodirector: Don't re-send SYNC unnecessarily often.
Timo Sirainen [Thu, 24 Mar 2016 00:42:50 +0000 (09:42 +0900)] 
director: Don't re-send SYNC unnecessarily often.

9 years agodirector: Fixed user weakness getting stuck if multiple directors set user weak simul...
Timo Sirainen [Thu, 24 Mar 2016 00:36:14 +0000 (09:36 +0900)] 
director: Fixed user weakness getting stuck if multiple directors set user weak simultaneously

9 years agopop3-login: XCLIENT / XOIP no longer return -ERR for untrusted IP ranges.
Timo Sirainen [Wed, 23 Mar 2016 14:33:49 +0000 (23:33 +0900)] 
pop3-login: XCLIENT / XOIP no longer return -ERR for untrusted IP ranges.

The command is simply ignored, similarly to imap-login ID.

9 years agodoveadm: Move getenv to correct place
Aki Tuomi [Wed, 23 Mar 2016 07:01:31 +0000 (09:01 +0200)] 
doveadm: Move getenv to correct place

All getenv()s must be done after master_service_init() or the pointer will be
corrupted with Linux and other OSes without setproctitle().

9 years agoimap: Made LDA settings accessible from plugins.
Stephan Bosch [Tue, 22 Mar 2016 00:16:26 +0000 (01:16 +0100)] 
imap: Made LDA settings accessible from plugins.

This way, plugins can also send mail.

9 years agodoveadm-server: Fixed initializing username for mail commands.
Aki Tuomi [Tue, 22 Mar 2016 07:19:45 +0000 (09:19 +0200)] 
doveadm-server: Fixed initializing username for mail commands.