]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
8 years agomaildir backend parameter parsing changed to use common function
Sergey Kitov [Fri, 19 May 2017 07:49:01 +0000 (10:49 +0300)] 
maildir backend parameter parsing changed to use common function

8 years agoquota root default init changed to use common param parse function
Sergey Kitov [Fri, 19 May 2017 07:46:27 +0000 (10:46 +0300)] 
quota root default init changed to use common param parse function

8 years agocommon quota parameter parsing function implemented
Sergey Kitov [Thu, 18 May 2017 10:30:25 +0000 (13:30 +0300)] 
common quota parameter parsing function implemented

8 years agoimap: Fix unhibernation after earlier change
Timo Sirainen [Mon, 22 May 2017 14:56:15 +0000 (17:56 +0300)] 
imap: Fix unhibernation after earlier change

8 years agolib-index: Fix crash in mail_transaction_log_view_set_all() error handling
Timo Sirainen [Mon, 22 May 2017 07:13:21 +0000 (10:13 +0300)] 
lib-index: Fix crash in mail_transaction_log_view_set_all() error handling

8 years agolib-index: Fix start_offset > sync_offset error handling for in-memory indexes
Timo Sirainen [Mon, 22 May 2017 07:11:30 +0000 (10:11 +0300)] 
lib-index: Fix start_offset > sync_offset error handling for in-memory indexes

8 years agoconfig: When showing an "Unknown setting" error, show the full section path
Timo Sirainen [Sat, 20 May 2017 15:13:45 +0000 (18:13 +0300)] 
config: When showing an "Unknown setting" error, show the full section path

For example with:

service foo {
  inet_listener bar {
    key = value
  }
}

Instead of showing just:

Unknown setting: key

Show the entire path:

Unknown setting: service { inet_listener { key

Any filters won't be shown, because they don't affect the result.

8 years agoimap: Move struct client_sync_context to imap-sync-private.h and add imap_ prefix
Timo Sirainen [Fri, 19 May 2017 14:44:30 +0000 (17:44 +0300)] 
imap: Move struct client_sync_context to imap-sync-private.h and add imap_ prefix

8 years agoimap: Allow plugins to replace existing FETCH handlers
Timo Sirainen [Fri, 19 May 2017 13:34:29 +0000 (16:34 +0300)] 
imap: Allow plugins to replace existing FETCH handlers

They can use imap_fetch_handler_lookup() to get the old init() function.
Then they can imap_fetch_handler_unregister() the existing handler and
register a new handler, which can do its own work and call the old init()
if needed.

8 years agolib-index: Improve "start_offset > current sync_offset" error message.
Timo Sirainen [Wed, 17 May 2017 13:47:43 +0000 (16:47 +0300)] 
lib-index: Improve "start_offset > current sync_offset" error message.

Try to make it clear what is the root cause of it.

8 years agolib-index: mail_transaction_log_file_get_highest_modseq_at() - return error string
Timo Sirainen [Wed, 17 May 2017 13:28:58 +0000 (16:28 +0300)] 
lib-index: mail_transaction_log_file_get_highest_modseq_at() - return error string

This can help figuring out why some error happened when more context is
provided in the caller's error messages.

8 years agolib-index: Add missing error logging for mail_index_view_sync_begin()
Timo Sirainen [Wed, 17 May 2017 13:21:54 +0000 (16:21 +0300)] 
lib-index: Add missing error logging for mail_index_view_sync_begin()

8 years agolib-index: mail_transaction_log_file_map() - return reason/error string
Timo Sirainen [Wed, 17 May 2017 10:33:44 +0000 (13:33 +0300)] 
lib-index: mail_transaction_log_file_map() - return reason/error string

This can help figuring out why some error happened when more context is
provided in the caller's error messages.

8 years agolib-index: mail_transaction_log_view_set_all() - don't entirely ignore corrupted...
Timo Sirainen [Wed, 17 May 2017 10:31:09 +0000 (13:31 +0300)] 
lib-index: mail_transaction_log_view_set_all() - don't entirely ignore corrupted logs

Ignore them only if it's followed by an index reset.

8 years agolib-storage: Don't crash if cache is thought broken for a newly saved mail
Timo Sirainen [Fri, 19 May 2017 08:05:22 +0000 (11:05 +0300)] 
lib-storage: Don't crash if cache is thought broken for a newly saved mail

It's a bug that it happens, but the resulting crash is confusing.
Although arguably this new error could be i_panic() instead.

Fixes:
Panic: file mail-index-transaction-update.c: line 1018 (mail_index_update_ext): assertion failed: (seq > 0 && (seq <= mail_index_view_get_messages_count(t->view) || seq <= t->last_new_seq))

8 years agoimap NOTIFY: Flush any pending notifications on NOOP
Timo Sirainen [Wed, 17 May 2017 16:02:06 +0000 (19:02 +0300)] 
imap NOTIFY: Flush any pending notifications on NOOP

This is mainly to allow testing NOTIFY easily with imaptest scripts.
This is cheap anyway, because mailbox_list_notify_flush() doesn't do any
syscalls when there's no work.

8 years agolib-storage: Implement mailbox_list_notify_flush()
Timo Sirainen [Wed, 17 May 2017 16:01:57 +0000 (19:01 +0300)] 
lib-storage: Implement mailbox_list_notify_flush()

This flushes any pending notifications. For now it only checks if there's
a pending notification waiting for a timeout. It could also stat() the
files to make sure, but that's probably unnecessary.

8 years agolib-storage: Explicitly name function pointers in mailbox lists
Timo Sirainen [Wed, 17 May 2017 15:13:09 +0000 (18:13 +0300)] 
lib-storage: Explicitly name function pointers in mailbox lists

This allows adding more fields to struct mailbox_list_vfuncs without
compiler warnings.

8 years agolib-storage: Always update highestmodseq in mailbox list index
Timo Sirainen [Wed, 17 May 2017 14:49:25 +0000 (17:49 +0300)] 
lib-storage: Always update highestmodseq in mailbox list index

This is required for mailbox-list-notify API to work correctly. For
example IMAP NOTIFY session with CONDSTORE enabled could be listening for
FlagChanges, but another session without CONDSTORE enabled could be updating
flags in a mailbox that has never been opened with CONDSTORE enabled.
NOTIFY wouldn't see this change, unless it was always written to
dovecot.list.index.

8 years agolib-storage: Fix mailbox list index notifications when modseqs aren't enabled.
Timo Sirainen [Wed, 17 May 2017 14:14:05 +0000 (17:14 +0300)] 
lib-storage: Fix mailbox list index notifications when modseqs aren't enabled.

No notifications were sent if highest_modseqs weren't updated in mailbox
list index.

8 years agoimap: login reply should be sent sooner
Josef 'Jeff' Sipek [Wed, 17 May 2017 08:40:53 +0000 (11:40 +0300)] 
imap: login reply should be sent sooner

8 years agolib-storage: Fix mailbox list index records without guid having invalid flags
Timo Sirainen [Thu, 18 May 2017 20:13:38 +0000 (23:13 +0300)] 
lib-storage: Fix mailbox list index records without guid having invalid flags

With LAYOUT=index the mailbox is found with its GUID. If it doesn't exist,
the mailbox has to be either \NonExistent or \NoSelect. It probably doesn't
make much difference which one, so we'll fix them by adding \NoSelect.

With other layouts the GUID is allowed to be empty, because it can be looked
up from the actual mailbox.

8 years agolib-storage: Fix mailbox list index records with name_id=0
Timo Sirainen [Thu, 18 May 2017 20:06:20 +0000 (23:06 +0300)] 
lib-storage: Fix mailbox list index records with name_id=0

name_id=0 isn't valid, so it needs to be changed and writen to the disk.
The write-to-disk part wasn't working.

8 years agolib: istream-concat - enforce cur_input==input[cur_idx] invariant
Phil Carmody [Wed, 30 Mar 2016 06:33:02 +0000 (09:33 +0300)] 
lib: istream-concat - enforce cur_input==input[cur_idx] invariant

Since the over-seek patch, this is now an invariant, so ensure it's
always true.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
8 years agolib: istream-concat - make cur_input always match input[cur_idx]
Phil Carmody [Wed, 30 Mar 2016 06:29:51 +0000 (09:29 +0300)] 
lib: istream-concat - make cur_input always match input[cur_idx]

We're deliberately not stepping into the NULL stream, don't let the
cur_idx indicate that we have moved into it, that's confusing.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
8 years agoimapc: Make sure a valid UIDVALIDITY is returned by SELECT
Timo Sirainen [Thu, 18 May 2017 18:10:33 +0000 (21:10 +0300)] 
imapc: Make sure a valid UIDVALIDITY is returned by SELECT

Fixes errors such as:
Error: Synchronization corrupted index header (in-memory index): uidvalidity=0, but next_uid=9

8 years agoimapc: Fix assert-crash if server doesn't send EXISTS reply to SELECT
Timo Sirainen [Thu, 18 May 2017 18:08:23 +0000 (21:08 +0300)] 
imapc: Fix assert-crash if server doesn't send EXISTS reply to SELECT

Fixes:
Panic: file imapc-sync.c: line 477 (imapc_sync_index): assertion failed: (mbox->sync_fetch_first_uid == 1)

8 years agolib-imap-client: Change server IP only on connect() failures
Timo Sirainen [Thu, 18 May 2017 17:18:24 +0000 (20:18 +0300)] 
lib-imap-client: Change server IP only on connect() failures

Also log an warning-level message about it. This is mainly useful to see
that a slow connection could be caused by a connect() timeout. Since more
IPs are still available, it's not yet an error.

8 years agoimapc: Fix infinite reconnection when server keeps sending corrupted state
Timo Sirainen [Thu, 18 May 2017 16:42:03 +0000 (19:42 +0300)] 
imapc: Fix infinite reconnection when server keeps sending corrupted state

When corrupted state was found, imapc_client_mailbox_reconnect() is called
to reconnect. This call skipped the normal "is it safe to reconnect?"
checks causing potentially infinite reconnections.

8 years agolib-imap: imap_parser_unref() should always set parser=NULL
Timo Sirainen [Thu, 18 May 2017 16:40:04 +0000 (19:40 +0300)] 
lib-imap: imap_parser_unref() should always set parser=NULL

Not just when the last reference is cleared. This is how *_unref()s should
work everywhere in Dovecot. This fixes a bug in lib-imap-client where a
parser could have been accessed after it was already freed.

8 years agoimapc: Avoid resending duplicate FETCH when reconnecting during the initial sync
Timo Sirainen [Thu, 18 May 2017 15:09:56 +0000 (18:09 +0300)] 
imapc: Avoid resending duplicate FETCH when reconnecting during the initial sync

8 years agoimapc: If initial SELECT fails, don't resend it twice on reconnect.
Timo Sirainen [Thu, 18 May 2017 15:01:27 +0000 (18:01 +0300)] 
imapc: If initial SELECT fails, don't resend it twice on reconnect.

8 years agolib-imap-client: Avoid infinite reconnection loops when retrying command fails
Timo Sirainen [Thu, 18 May 2017 14:36:27 +0000 (17:36 +0300)] 
lib-imap-client: Avoid infinite reconnection loops when retrying command fails

reconnect_command_count wasn't calculated correctly, because the SELECT and
potentially other following sync commands weren't included in it.

8 years agolib: Fix memory leak in test-istream-concat
Timo Sirainen [Fri, 19 May 2017 06:45:28 +0000 (09:45 +0300)] 
lib: Fix memory leak in test-istream-concat

8 years agolib: Add dovecot_build_info variable containing Dovecot build information.
Timo Sirainen [Thu, 18 May 2017 09:32:12 +0000 (12:32 +0300)] 
lib: Add dovecot_build_info variable containing Dovecot build information.

By default this includes the version, including the git hash. The idea is
that this version information would be available in all the core dumps.

The DOVECOT_BUILD_INFO can be overridden by compiling with:

DOVECOT_BUILD_INFO='"build info"' make

8 years agolib: Fix crash when seeking istream-concat to EOF and trying to read it
Timo Sirainen [Thu, 18 May 2017 19:18:15 +0000 (22:18 +0300)] 
lib: Fix crash when seeking istream-concat to EOF and trying to read it

8 years agolib-http: Changed test-http-server to actually use the http-server API.
Stephan Bosch [Fri, 12 May 2017 02:25:08 +0000 (04:25 +0200)] 
lib-http: Changed test-http-server to actually use the http-server API.

This currently serves as a simple demonstration of how to structure an HTTP server.

8 years agolib-http: server: Fixed detection of idle connection.
Stephan Bosch [Fri, 12 May 2017 02:23:10 +0000 (04:23 +0200)] 
lib-http: server: Fixed detection of idle connection.

This fixes the debug message; the behavior was otherwise correct.

8 years agovirtual: Match any metadata condition
Aki Tuomi [Thu, 18 May 2017 11:59:51 +0000 (14:59 +0300)] 
virtual: Match any metadata condition

The old code ignored succesful earlier matches for
patterns, and stopped looking on first non-matching
metadata pattern. Now it breaks on error or on first
matching pattern.

8 years agolib-storage: Apply mailbox_list_iter_autocreate_filter on mailbox_list_index_iter_next
Aki Tuomi [Wed, 17 May 2017 12:20:35 +0000 (15:20 +0300)] 
lib-storage: Apply mailbox_list_iter_autocreate_filter on mailbox_list_index_iter_next

It skips mailbox_list_iter_next, so it needs to be applied here as well.

8 years agolib-storage: Rename autocreate_iter_existing to mailbox_list_iter_autocreate_filter
Aki Tuomi [Wed, 17 May 2017 12:19:44 +0000 (15:19 +0300)] 
lib-storage: Rename autocreate_iter_existing to mailbox_list_iter_autocreate_filter

It makes next commit possible

8 years agolib-storage: Do not drop autocreate boxes when listing them
Aki Tuomi [Wed, 17 May 2017 09:16:31 +0000 (12:16 +0300)] 
lib-storage: Do not drop autocreate boxes when listing them

Otherwise we skip folders, because array_delete() is removing boxes while they're being iterated.

8 years agodovecot --build-options: Add missing linefeed
Timo Sirainen [Thu, 18 May 2017 10:03:45 +0000 (13:03 +0300)] 
dovecot --build-options: Add missing linefeed

8 years agodirector: Add old host's up/down and vhost count parameters to director_flush_socket
Timo Sirainen [Thu, 18 May 2017 08:57:38 +0000 (11:57 +0300)] 
director: Add old host's up/down and vhost count parameters to director_flush_socket

The "down" status allows the script to determine whether it should try to
perform any work on the old host. The vhost count may be unnecessary, but
might be useful for some purpose.

8 years agofts: Do not attempt to deinitialize backend if it's not set
Aki Tuomi [Wed, 17 May 2017 09:26:42 +0000 (12:26 +0300)] 
fts: Do not attempt to deinitialize backend if it's not set

If FTS backend initialization fails or does not happen,
flist->backend might end up being NULL, and attempt to
deinitialize NULL won't end well.

8 years agolib: include inttypes.h to get PRIu64 & friends
Josef 'Jeff' Sipek [Wed, 17 May 2017 07:35:03 +0000 (10:35 +0300)] 
lib: include inttypes.h to get PRIu64 & friends

Including it in lib.h allows all of the Dovecot code (as well as any
external plugins) to just use these macros without worrying about what
system headers to include.

8 years agodsync: Try to commit transactions every dsync_commit_msgs_interval messages
Timo Sirainen [Sun, 30 Apr 2017 09:31:48 +0000 (12:31 +0300)] 
dsync: Try to commit transactions every dsync_commit_msgs_interval messages

This was first attempted to be implemented by
ec0cc8fa647794e44a1afaa448f495a713048dc4, but it was later partially
reverted by 5973d496b16721af6d2c1fa90b016aacddf13554. This current
commit should fix its problems.

8 years agoauth: If passdb/userdb ldap has blocking=yes, auth master shouldn't connect to ldap
Timo Sirainen [Tue, 16 May 2017 14:53:23 +0000 (17:53 +0300)] 
auth: If passdb/userdb ldap has blocking=yes, auth master shouldn't connect to ldap

8 years agoutil: script: Increased the major protocol version due to earlier changes.
Stephan Bosch [Mon, 8 May 2017 10:49:39 +0000 (12:49 +0200)] 
util: script: Increased the major protocol version due to earlier changes.

8 years agoutil: script: Amended protocol with the ability to convey a set of environment variab...
Stephan Bosch [Tue, 9 May 2017 11:33:23 +0000 (13:33 +0200)] 
util: script: Amended protocol with the ability to convey a set of environment variables that are passed to the script.

The acceptable environment variables are selected using the -e parameter; others are ignored silently.

8 years agoutil: script: Amended the protocol to pass arguments escaped to prevent problems...
Stephan Bosch [Mon, 8 May 2017 10:48:08 +0000 (12:48 +0200)] 
util: script: Amended the protocol to pass arguments escaped to prevent problems with newlines.

Newlines are used as argument delimiters in the protocol, which will cause problems.

8 years agolib-program-client: local: Fixed use of unterminated string array of environment...
Stephan Bosch [Tue, 9 May 2017 11:43:39 +0000 (13:43 +0200)] 
lib-program-client: local: Fixed use of unterminated string array of environment variables in exec_child().

8 years agolib-program-client: Made the test suite ignore the protocol version.
Stephan Bosch [Tue, 9 May 2017 12:22:06 +0000 (14:22 +0200)] 
lib-program-client: Made the test suite ignore the protocol version.

8 years agomail-crypt-plugin: Set copy-hook only if save_version > 0
Aki Tuomi [Mon, 15 May 2017 12:35:37 +0000 (15:35 +0300)] 
mail-crypt-plugin: Set copy-hook only if save_version > 0

Otherwise we might use it in read-only mode, too.

8 years agodoveadm mailbox status: Add "firstsaved" field.
Timo Sirainen [Wed, 10 May 2017 09:44:25 +0000 (12:44 +0300)] 
doveadm mailbox status: Add "firstsaved" field.

8 years agoimapc: Try to merge STOREs together as much as possible when syncing
Timo Sirainen [Thu, 4 May 2017 16:59:41 +0000 (19:59 +0300)] 
imapc: Try to merge STOREs together as much as possible when syncing

8 years agolib-storage: Avoid unnecessary UIDNEXT lookups after saving a mail
Timo Sirainen [Fri, 5 May 2017 12:20:05 +0000 (15:20 +0300)] 
lib-storage: Avoid unnecessary UIDNEXT lookups after saving a mail

The vsize checking code was expecting that this would always be a cheap
operation, but with imapc code it could trigger a remote STATUS (UIDNEXT)
call. Do this only when we've checked that this mailbox is updating vsize
header at all.

8 years agoimapc-quota: Avoid sending unnecessarily many GETQUOTA[ROOT] commands
Timo Sirainen [Fri, 12 May 2017 12:42:31 +0000 (15:42 +0300)] 
imapc-quota: Avoid sending unnecessarily many GETQUOTA[ROOT] commands

The last_refresh == ioloop_timeval check didn't work, because the refresh
itself updated ioloop_timeval. This caused a single quota lookup to issue
multiple GETQUOTA[ROOT] commands to imapc.

8 years agolib-storage: add a mail user pre-deinit vfunc
Josef 'Jeff' Sipek [Fri, 12 May 2017 09:44:27 +0000 (12:44 +0300)] 
lib-storage: add a mail user pre-deinit vfunc

This allows plugins to perform checks right before the deinit call.

8 years agolib-storage: Add missing ATTR_FORMAT to mail_set_mail_cache_corrupted()
Timo Sirainen [Fri, 12 May 2017 08:13:09 +0000 (11:13 +0300)] 
lib-storage: Add missing ATTR_FORMAT to mail_set_mail_cache_corrupted()

8 years agoAdded doc/man/doveadm-save.1 to .gitignore.
Stephan Bosch [Fri, 12 May 2017 00:37:22 +0000 (02:37 +0200)] 
Added doc/man/doveadm-save.1 to .gitignore.

8 years agodoc: Add manpage for doveadm-save
Aki Tuomi [Thu, 11 May 2017 06:24:57 +0000 (09:24 +0300)] 
doc: Add manpage for doveadm-save

8 years agolib-storage: Use new mail_cache_set_seq_corrupted_reason
Aki Tuomi [Tue, 9 May 2017 11:01:07 +0000 (14:01 +0300)] 
lib-storage: Use new mail_cache_set_seq_corrupted_reason

8 years agolib-index: Add mail_cache_set_seq_corrupted_reason
Aki Tuomi [Tue, 9 May 2017 11:00:38 +0000 (14:00 +0300)] 
lib-index: Add mail_cache_set_seq_corrupted_reason

Marks a seq in cache corrupted, and removes
that instead of the whole cache.

8 years agolib-index: Add mail_cache_expunge_count
Aki Tuomi [Tue, 9 May 2017 11:29:04 +0000 (14:29 +0300)] 
lib-index: Add mail_cache_expunge_count

It can be called to correctly handle cache counters
when records are removed.

8 years agossl-proxy-openssl: Fix comparison to stricly boolean
Aki Tuomi [Wed, 10 May 2017 09:40:27 +0000 (12:40 +0300)] 
ssl-proxy-openssl: Fix comparison to stricly boolean

8 years ago{lib,lib-fts}: fix builds with BSD make
Josef 'Jeff' Sipek [Tue, 9 May 2017 09:51:49 +0000 (12:51 +0300)] 
{lib,lib-fts}: fix builds with BSD make

Without this change, BSD make doesn't know how to make a couple of the
generated files because the BUILT_SOURCES file names don't match exactly
the left hand sides of the rules.  (GNU make somehow manages to match the
rule even though it is not an exact match.)

8 years agolib: use full path to unicode data script
Josef 'Jeff' Sipek [Tue, 9 May 2017 09:43:46 +0000 (12:43 +0300)] 
lib: use full path to unicode data script

This is a step toward fixing builds where object dir != source dir.

8 years agolib-fts: use full path to word-properties script
Josef 'Jeff' Sipek [Tue, 9 May 2017 09:42:48 +0000 (12:42 +0300)] 
lib-fts: use full path to word-properties script

This is a step toward fixing builds where object dir != source dir.

8 years agolib-fts: download data files into srcdir
Josef 'Jeff' Sipek [Tue, 9 May 2017 09:36:40 +0000 (12:36 +0300)] 
lib-fts: download data files into srcdir

This is a step toward fixing builds where object dir != source dir.

8 years agolib: download unicode data into srcdir
Josef 'Jeff' Sipek [Tue, 9 May 2017 09:34:40 +0000 (12:34 +0300)] 
lib: download unicode data into srcdir

This is a step toward fixing builds where object dir != source dir.

8 years agoremove mystery file that appears to be unused
Josef 'Jeff' Sipek [Wed, 10 May 2017 07:55:49 +0000 (10:55 +0300)] 
remove mystery file that appears to be unused

8 years agomaster: Send SIGQUIT to processes running at deinit to close socket listeners.
Timo Sirainen [Tue, 2 May 2017 15:40:43 +0000 (18:40 +0300)] 
master: Send SIGQUIT to processes running at deinit to close socket listeners.

This allows Dovecot to be restarted even when some lmtp/doveadm process is
running for a long time. Otherwise it would keep the inet_listener socket
open and prevent the new Dovecot from binding to the port.

8 years agolib-master: When running under master, close listeners immediately on SIGQUIT
Timo Sirainen [Tue, 2 May 2017 13:13:08 +0000 (16:13 +0300)] 
lib-master: When running under master, close listeners immediately on SIGQUIT

8 years agolib-master: Remove listener's IO earlier if possible
Timo Sirainen [Tue, 2 May 2017 15:39:06 +0000 (18:39 +0300)] 
lib-master: Remove listener's IO earlier if possible

This is needed for the next change to work properly.

8 years agomaster: Wait more precisely 5 secs at deinit for child processes to die.
Timo Sirainen [Tue, 2 May 2017 12:56:40 +0000 (15:56 +0300)] 
master: Wait more precisely 5 secs at deinit for child processes to die.

Use milliseconds granularity instead of seconds.

8 years agolib: Use lib_signals_syscall_error() for write() failure in signal handler
Timo Sirainen [Tue, 2 May 2017 12:41:41 +0000 (15:41 +0300)] 
lib: Use lib_signals_syscall_error() for write() failure in signal handler

8 years agolib: Add lib_signals_syscall_error()
Timo Sirainen [Tue, 2 May 2017 12:41:04 +0000 (15:41 +0300)] 
lib: Add lib_signals_syscall_error()

8 years agolib: Add dec2str_buf()
Timo Sirainen [Tue, 2 May 2017 12:38:00 +0000 (15:38 +0300)] 
lib: Add dec2str_buf()

8 years agoman: Fix doveadm-flags examples
Timo Sirainen [Tue, 9 May 2017 10:15:42 +0000 (13:15 +0300)] 
man: Fix doveadm-flags examples

Patch by Frank Ebert

8 years agoauth: Do not use AUTH_SUBSYS_MECH in logging when request->mech is NULL
Aki Tuomi [Tue, 9 May 2017 09:25:49 +0000 (12:25 +0300)] 
auth: Do not use AUTH_SUBSYS_MECH in logging when request->mech is NULL

This can happen when a lookup is done instead of authentication.

Fixes auth: Panic: file auth-request.c: line 2560 (get_log_prefix): assertion failed: (auth_request->mech != NULL)

8 years agoconfigure: Remove --with-storages parameter
Josef 'Jeff' Sipek [Tue, 9 May 2017 07:07:55 +0000 (10:07 +0300)] 
configure: Remove --with-storages parameter

Just compile all the storages, since the only benefit in limiting them
is to save a tiny bit of disk space. The recently added imapc quota code
fails to link if imapc storage isn't compiled in. This is the simplest
way to fix that.

8 years agolib-master,login-common: Add dual cert support
Aki Tuomi [Thu, 6 Apr 2017 13:09:00 +0000 (16:09 +0300)] 
lib-master,login-common: Add dual cert support

Adds new settings ssl_alt_cert and ssl_alt_key

8 years agolib-fs: unit tests for fs-api/fs-posix
Phil Carmody [Mon, 6 Mar 2017 17:42:18 +0000 (19:42 +0200)] 
lib-fs: unit tests for fs-api/fs-posix

A core component, really ought to be covered by the unit tests.
This barely scrapes the surface, but is better than nothing:
filesystem/files/iterators, read/write/exists, good and bad cases.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
8 years agopassdb-imap: Make sure ssl verification is possible with current settings
Aki Tuomi [Mon, 8 May 2017 09:24:52 +0000 (12:24 +0300)] 
passdb-imap: Make sure ssl verification is possible with current settings

8 years agopassdb-imap: Add ssl_ca_file setting
Aki Tuomi [Mon, 8 May 2017 09:24:21 +0000 (12:24 +0300)] 
passdb-imap: Add ssl_ca_file setting

Allow setting SSL trust roots from a file

8 years agopassdb-imap: Add option to control certificate verification
Aki Tuomi [Fri, 28 Apr 2017 17:28:23 +0000 (20:28 +0300)] 
passdb-imap: Add option to control certificate verification

Turn it on by default

8 years agolib-ssl-iostream: Support IP address SANs
Aki Tuomi [Mon, 8 May 2017 10:35:35 +0000 (13:35 +0300)] 
lib-ssl-iostream: Support IP address SANs

8 years agolib-lda: mail-send: Compose var_expand table only once.
Stephan Bosch [Sun, 6 Nov 2016 00:33:04 +0000 (01:33 +0100)] 
lib-lda: mail-send: Compose var_expand table only once.

8 years agolib-lda: mail-send: Fixed debug message in mail_send_rejection() to use correct address.
Stephan Bosch [Sun, 6 Nov 2016 12:17:26 +0000 (13:17 +0100)] 
lib-lda: mail-send: Fixed debug message in mail_send_rejection() to use correct address.

8 years agolib-lda: Fixed indentation in mail-send.c.
Stephan Bosch [Sat, 5 Nov 2016 16:44:07 +0000 (17:44 +0100)] 
lib-lda: Fixed indentation in mail-send.c.

8 years agomail-crypt: Re-encrypt mails when copying/moving
Aki Tuomi [Thu, 4 May 2017 06:14:17 +0000 (09:14 +0300)] 
mail-crypt: Re-encrypt mails when copying/moving

Otherwise the mail cannot be opened after moving

8 years agoimap: Set FETCH transactions hidden only when \Seen flags are implicitly set
Timo Sirainen [Fri, 5 May 2017 09:35:23 +0000 (12:35 +0300)] 
imap: Set FETCH transactions hidden only when \Seen flags are implicitly set

This simplifies implementing some plugins and has no downsides to core
functionality.

8 years agolib-storage: Fix memory leak in mail_search_args_simplify()
Timo Sirainen [Thu, 4 May 2017 14:31:47 +0000 (17:31 +0300)] 
lib-storage: Fix memory leak in mail_search_args_simplify()

The leaks happened when search args were already initialized (which they
usually were at this point) and some of the args were dropped entirely.

Improved the unit test to initialize search args before calling the
simplify, so valgrind would notice if there are any leaks.

8 years agolib-http: client: Fixed race condition between DNS refresh lookup and a soft connecti...
Stephan Bosch [Mon, 3 Apr 2017 22:32:07 +0000 (00:32 +0200)] 
lib-http: client: Fixed race condition between DNS refresh lookup and a soft connection timeout.

The refreshing DNS lookup cleared all the IPs, but the soft connection timeout (and maybe other code) still relied on them.
Adding tests everywhere for host->ips_count == 0 is annoying, so I changed the DNS lookup code such that the stale IPs remain present while the DNS lookup is being performed.
The pending lookup prevents new connections through http_client_host_refresh(), so this will not create potentially useless connections.

8 years agolib-imap: imap_append_string_for_humans() - Change CR/LF to space
Timo Sirainen [Tue, 2 May 2017 09:18:40 +0000 (12:18 +0300)] 
lib-imap: imap_append_string_for_humans() - Change CR/LF to space

Practically this shouldn't matter, because in email headers a CR/LF is
always followed by a space/tab. But maybe this can be used for some
other purposes in future, and it makes the unit tests clearer. :)

8 years agolmtp: Fix assert-crash when proxy overrides mail_max_lock_timeout
Timo Sirainen [Tue, 2 May 2017 14:57:40 +0000 (17:57 +0300)] 
lmtp: Fix assert-crash when proxy overrides mail_max_lock_timeout

Time unit is required or the call fails.

8 years agolib-master: Add comments to struct master_service_connection
Timo Sirainen [Tue, 2 May 2017 12:02:25 +0000 (15:02 +0300)] 
lib-master: Add comments to struct master_service_connection

8 years agolib-index: mail-index-transaction-export: Fixed handling of transaction_flag_updates_...
Stephan Bosch [Mon, 1 May 2017 20:23:36 +0000 (22:23 +0200)] 
lib-index: mail-index-transaction-export: Fixed handling of transaction_flag_updates_have_non_internal() return value.

Found using Clang -Wstrict-bool.

8 years agolib-imap-client: Fixed NULL check in assertion to be proper boolean.
Stephan Bosch [Mon, 1 May 2017 20:19:43 +0000 (22:19 +0200)] 
lib-imap-client: Fixed NULL check in assertion to be proper boolean.

Found using Clang -Wstrict-bool.