]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agoauth: Expose auth_request_verify_plain_callback_finish
Aki Tuomi [Mon, 8 Jan 2018 13:00:17 +0000 (15:00 +0200)] 
auth: Expose auth_request_verify_plain_callback_finish

7 years agoauth-worker: Support PASSW request
Aki Tuomi [Mon, 8 Jan 2018 13:09:28 +0000 (15:09 +0200)] 
auth-worker: Support PASSW request

This will attempt to verify given credentials.

7 years agoauth-worker: Add auth_worker_auth_request_new
Aki Tuomi [Mon, 8 Jan 2018 12:52:10 +0000 (14:52 +0200)] 
auth-worker: Add auth_worker_auth_request_new

Replaces worker_auth_request_new, moves in
check for username and service. Simplifies code.

7 years agoauth: passdb-blocking - Expose passdb_blocking_auth_worker_reply_parse
Aki Tuomi [Tue, 2 Jan 2018 10:33:50 +0000 (12:33 +0200)] 
auth: passdb-blocking - Expose passdb_blocking_auth_worker_reply_parse

Enables sharing code with passdb cache

7 years agopop3: Include mail user variables in logout format
Aki Tuomi [Mon, 4 Dec 2017 09:01:31 +0000 (11:01 +0200)] 
pop3: Include mail user variables in logout format

7 years agoimap: Include mail user variables in logout format
Aki Tuomi [Mon, 4 Dec 2017 09:01:05 +0000 (11:01 +0200)] 
imap: Include mail user variables in logout format

7 years agolib: var-expand - Add table size and merge utility functions
Aki Tuomi [Tue, 5 Dec 2017 21:49:27 +0000 (23:49 +0200)] 
lib: var-expand - Add table size and merge utility functions

7 years agolib-program-client: local: Add test for big data I/O.
Stephan Bosch [Sat, 20 Jan 2018 20:32:07 +0000 (21:32 +0100)] 
lib-program-client: local: Add test for big data I/O.

7 years agolib-program-client: remote: Don't change exit_code in program_client_remote_disconnec...
Stephan Bosch [Wed, 24 Jan 2018 00:09:16 +0000 (01:09 +0100)] 
lib-program-client: remote: Don't change exit_code in program_client_remote_disconnect() when program_input is already NULL.

When the program_input is NULL, the stream is finished, meaning that the
exit_code is set based on the return code. There can be a program_input for
remote streams, even when the program produces no output.

7 years agolib-program-client: Use reliable means of checking for input stream EOF.
Stephan Bosch [Mon, 22 Jan 2018 22:25:34 +0000 (23:25 +0100)] 
lib-program-client: Use reliable means of checking for input stream EOF.

7 years agolib-storage: Set keyword based on attachment presence when saving
Aki Tuomi [Sat, 11 Nov 2017 08:07:42 +0000 (10:07 +0200)] 
lib-storage: Set keyword based on attachment presence when saving

If attachment is detected, use $HasAttachment, if not
use $HasNoAttachment

7 years agolib-storage: Add attachment detection settings
Aki Tuomi [Mon, 20 Nov 2017 08:09:23 +0000 (10:09 +0200)] 
lib-storage: Add attachment detection settings

7 years agolib-mail: Add message_part_has_attachment
Aki Tuomi [Fri, 10 Nov 2017 12:32:44 +0000 (14:32 +0200)] 
lib-mail: Add message_part_has_attachment

7 years agoimapc: Fix deleting mailbox
Timo Sirainen [Mon, 22 Jan 2018 11:33:29 +0000 (13:33 +0200)] 
imapc: Fix deleting mailbox

Broken by f8f30bd27e41e1041a8de0b97f35d7d75e0a412e

7 years agolog: Fix log reopening on SIGUSR1
Timo Sirainen [Mon, 6 Nov 2017 23:33:57 +0000 (01:33 +0200)] 
log: Fix log reopening on SIGUSR1

7 years agolib-auth: Remove request after abort
Aki Tuomi [Fri, 26 Jan 2018 08:55:54 +0000 (10:55 +0200)] 
lib-auth: Remove request after abort

Otherwise the request will still stay in hash table
and get dereferenced when all requests are aborted
causing an attempt to access free'd memory.

Found by Apollon Oikonomopoulos <apoikos@debian.org>

Broken in 1a29ed2f96da1be22fa5a4d96c7583aa81b8b060

7 years agolib-auth: Fix memory leak in auth_client_request_abort()
Timo Sirainen [Mon, 18 Dec 2017 14:50:51 +0000 (16:50 +0200)] 
lib-auth: Fix memory leak in auth_client_request_abort()

This caused memory leaks when authentication was aborted. For example
with IMAP:

a AUTHENTICATE PLAIN
*

Broken by 9137c55411aa39d41c1e705ddc34d5bd26c65021

7 years agomail-crypt: Do not free global keys if no error has occured
Aki Tuomi [Thu, 16 Nov 2017 11:27:23 +0000 (13:27 +0200)] 
mail-crypt: Do not free global keys if no error has occured

7 years agolib-index: Write forced cache decision changes immediately to cache file
Timo Sirainen [Wed, 24 Jan 2018 16:01:48 +0000 (18:01 +0200)] 
lib-index: Write forced cache decision changes immediately to cache file

When mail_always/never_cache_fields doesn't match the current caching
decisions in the cache file, write the updated decisions to the file.

7 years agolib-index: Code cleanup for reading caching decisions
Timo Sirainen [Wed, 24 Jan 2018 16:01:23 +0000 (18:01 +0200)] 
lib-index: Code cleanup for reading caching decisions

No functional changes.

7 years agolib-index: Finish fixing removal of forced cache decisions from existing cache files
Timo Sirainen [Wed, 24 Jan 2018 15:58:57 +0000 (17:58 +0200)] 
lib-index: Finish fixing removal of forced cache decisions from existing cache files

6ef2504d020461b0f480766c41596595a4300023 didn't fix it for already known
fields.

7 years agolib-index: Fix removal of forced cache decisions from existing cache files
Timo Sirainen [Mon, 22 Jan 2018 22:04:28 +0000 (00:04 +0200)] 
lib-index: Fix removal of forced cache decisions from existing cache files

The forced-flags are written to the cache file when the file is created.
They were also read back, and the force-flag was preserved even when the
configuration was removed.

7 years agolib-index: Fix adding forced cache decisions to existing cache files
Timo Sirainen [Mon, 22 Jan 2018 15:38:32 +0000 (17:38 +0200)] 
lib-index: Fix adding forced cache decisions to existing cache files

If a field already existed in the cache file, the cache decision from the
file was always used. This caused force-decisions to be ignored.

7 years agomdbox: Fix rebuilding when dovecot.map.index is missing map/ref extension
Timo Sirainen [Mon, 20 Nov 2017 15:03:47 +0000 (17:03 +0200)] 
mdbox: Fix rebuilding when dovecot.map.index is missing map/ref extension

The rebuild kept just repeatedly failing with:
Error: mdbox map .../dovecot.map.index corrupted: missing map extension

7 years agoimap: support for FETCH SNIPPET
Josef 'Jeff' Sipek [Thu, 4 Jan 2018 17:44:16 +0000 (12:44 -0500)] 
imap: support for FETCH SNIPPET

7 years agolib: Call prctl(PR_SET_DUMPABLE) only when PR_SET_DUMPABLE env variable is set
Sergey Kitov [Tue, 21 Nov 2017 11:27:18 +0000 (13:27 +0200)] 
lib: Call prctl(PR_SET_DUMPABLE) only when PR_SET_DUMPABLE env variable is set

7 years agolib: Add logging of prctl(PR_SET_DUMPABLE) failure.
Sergey Kitov [Wed, 22 Nov 2017 09:34:47 +0000 (11:34 +0200)] 
lib: Add logging of prctl(PR_SET_DUMPABLE) failure.

7 years agoimapc: Fix imap_features=no-msn-updates to not fail on SELECT
Timo Sirainen [Tue, 16 Jan 2018 16:17:00 +0000 (18:17 +0200)] 
imapc: Fix imap_features=no-msn-updates to not fail on SELECT

The initial EXISTS reply shouldn't be ignored, only the following ones.

7 years agoimapc: Add imapc_features=no-msn-updates
Timo Sirainen [Mon, 25 Dec 2017 09:10:19 +0000 (11:10 +0200)] 
imapc: Add imapc_features=no-msn-updates

This is a stricter version of fetch-msn-workarounds. The MSNs aren't trusted
at all. This means any new untagged EXISTS and EXPUNGE replies are ignored,
as well as untagged FETCH replies that don't include UID.

A potential downside with this feature is that UID FETCH/STORE commands
sent to expunged messages will likely fail without the IMAP client being
notified of the EXPUNGEs. New mails are also not noticed, so this should
be used only when it's known that the clients don't keep the connection
open for long.

7 years agoimapc: Fix sending initial FETCH after reconnection SELECTs mailbox
Timo Sirainen [Mon, 25 Dec 2017 14:11:26 +0000 (16:11 +0200)] 
imapc: Fix sending initial FETCH after reconnection SELECTs mailbox

Move sending the FETCH when the SELECT returns tagged OK reply instead of
delaying it until mailbox is next synced. Most importantly this allows
sending the FETCH before any retried commands that are also sent after
SELECT receives tagged reply.

7 years agoimapc: gmail-migration: Fetch X-GM-MSGID for new mails as well
Timo Sirainen [Mon, 25 Dec 2017 20:48:00 +0000 (22:48 +0200)] 
imapc: gmail-migration: Fetch X-GM-MSGID for new mails as well

I'm not sure why it was originally restricted only for the initial FETCH.
Fetching GUIDs for new mails can be just as useful.

7 years agoimapc: Move imapc_mailbox_fetch_state*() to imapc-mailbox.c
Timo Sirainen [Mon, 25 Dec 2017 18:21:40 +0000 (20:21 +0200)] 
imapc: Move imapc_mailbox_fetch_state*() to imapc-mailbox.c

Mainly to make the next commit smaller.

7 years agoimapc: Handle untagged UIDVALIDITY immediately
Timo Sirainen [Mon, 25 Dec 2017 17:19:09 +0000 (19:19 +0200)] 
imapc: Handle untagged UIDVALIDITY immediately

This is part of the changes to fix mailbox resyncing after reconnect.

7 years agoimapc: If mailbox select fails, rollback any changes done to it
Timo Sirainen [Mon, 25 Dec 2017 17:34:31 +0000 (19:34 +0200)] 
imapc: If mailbox select fails, rollback any changes done to it

Required by the following changes that start adding changes immediately
after SELECT. If the initial syncing doesn't finish successfully, these
changes need to be reverted.

7 years agoimapc: Keep "selected" state TRUE only while mailbox is successfully SELECTed
Timo Sirainen [Mon, 25 Dec 2017 17:33:33 +0000 (19:33 +0200)] 
imapc: Keep "selected" state TRUE only while mailbox is successfully SELECTed

7 years agoimapc: Fix leaking mail_index_view on delayed expunge handling
Timo Sirainen [Wed, 17 Jan 2018 13:05:38 +0000 (15:05 +0200)] 
imapc: Fix leaking mail_index_view on delayed expunge handling

Fixes:
Panic: Leaked view for index (in-memory index): Opened in imapc-mailbox.c:47

7 years agolib-imap-client: Avoid "Unknown tag" errors for aborted commands
Timo Sirainen [Wed, 17 Jan 2018 13:03:06 +0000 (15:03 +0200)] 
lib-imap-client: Avoid "Unknown tag" errors for aborted commands

If mailbox is closed before all command replies were received, the commands
were aborted but they'll still receive the replies from server. Remember
the aborted commands' tag numbers so they can be ignored.

7 years agolib-imap-client: Fix reason text when unselecting mailbox aborts commands
Timo Sirainen [Wed, 17 Jan 2018 13:02:09 +0000 (15:02 +0200)] 
lib-imap-client: Fix reason text when unselecting mailbox aborts commands

7 years agolib-imap-client: Add asserts for reconnect_command_count
Timo Sirainen [Mon, 25 Dec 2017 19:31:05 +0000 (21:31 +0200)] 
lib-imap-client: Add asserts for reconnect_command_count

7 years agolib-imap-client: Delay sending more commands while SELECT is running
Timo Sirainen [Mon, 25 Dec 2017 19:29:06 +0000 (21:29 +0200)] 
lib-imap-client: Delay sending more commands while SELECT is running

7 years agolib-imap-client: After reconnection send retried commands last
Timo Sirainen [Mon, 25 Dec 2017 16:49:15 +0000 (18:49 +0200)] 
lib-imap-client: After reconnection send retried commands last

Previously only SELECT was sent before others. This allows sending more
commands on reconnection before the retried commands.

7 years agodoveadm: client - Fix connecting to UNIX sockets that don't need authentication
Timo Sirainen [Wed, 8 Nov 2017 14:03:17 +0000 (16:03 +0200)] 
doveadm: client - Fix connecting to UNIX sockets that don't need authentication

Trying to access doveadm UNIX socket that didn't require authentication
failed with:

Error: doveadm server sent invalid handshake: ...

7 years agodoveadm: client - Cleanup: Rename handshaked to authenticate_sent
Timo Sirainen [Wed, 8 Nov 2017 14:01:11 +0000 (16:01 +0200)] 
doveadm: client - Cleanup: Rename handshaked to authenticate_sent

This better describes what it does.

7 years agodoveadm-server: Fix protocol handshake order
Timo Sirainen [Wed, 8 Nov 2017 12:06:00 +0000 (14:06 +0200)] 
doveadm-server: Fix protocol handshake order

With version 1.1 protocol, server sent the authentication "+" or "-" line
before the VERSION. doveadm client accepts the VERSION reply either before
or after, so this change doesn't break it. It makes the protocol cleaner
though.

Based on patch by Manuel Mausz

7 years agodoveadm-server: Add client_connection.preauthenticated
Timo Sirainen [Wed, 8 Nov 2017 12:04:12 +0000 (14:04 +0200)] 
doveadm-server: Add client_connection.preauthenticated

7 years agolib-ssl-iostream: Verify SSL server's hostname against cert if it's non-NULL
Timo Sirainen [Tue, 31 Oct 2017 21:37:44 +0000 (23:37 +0200)] 
lib-ssl-iostream: Verify SSL server's hostname against cert if it's non-NULL

The hostname verification was skipped when handshake-callback wasn't used.
All of the existing code used the callback though, so this doesn't fix
any bugs.

7 years agolib-ssl-iostream: Fix checking cert validity when handshake callback isn't used
Timo Sirainen [Tue, 31 Oct 2017 17:49:56 +0000 (19:49 +0200)] 
lib-ssl-iostream: Fix checking cert validity when handshake callback isn't used

7 years agolib-ssl-iostream: Split host to connected_host and sni_host
Timo Sirainen [Wed, 1 Nov 2017 10:58:46 +0000 (12:58 +0200)] 
lib-ssl-iostream: Split host to connected_host and sni_host

Using the same variable for both was causing confusion.

7 years agocassandra: Fix crash when using prepared statements
Timo Sirainen [Thu, 14 Dec 2017 18:56:36 +0000 (20:56 +0200)] 
cassandra: Fix crash when using prepared statements

Broken by cae3c6903c10682429f9849ab1a25093e3f538e4

7 years agodriver-cassandra: Free statement pool on update
Aki Tuomi [Thu, 7 Dec 2017 07:48:51 +0000 (09:48 +0200)] 
driver-cassandra: Free statement pool on update

Otherwise the pool memory will leak. This was happening with non-prepared
statements when version was older than 4.

7 years agodoveconf: add hostname to output
Jarkko Mourujärvi [Thu, 28 Dec 2017 11:53:14 +0000 (13:53 +0200)] 
doveconf: add hostname to output

7 years agolib-http: Only depend on iostream openssl lib if building with openssl
Aki Tuomi [Thu, 28 Dec 2017 08:47:28 +0000 (10:47 +0200)] 
lib-http: Only depend on iostream openssl lib if building with openssl

Fixes build without openssl

7 years agolib-storage: mail_storage_set_index_error() - handle NULL index error
Timo Sirainen [Mon, 25 Dec 2017 16:24:35 +0000 (18:24 +0200)] 
lib-storage: mail_storage_set_index_error() - handle NULL index error

This avoids assert-crashing later on in mail*_get_last_internal_error().

This could potentially be an assert instead of setting it as "BUG", but
it looks like there are various code paths in lib-index that return -1
without setting an error. (That's to avoid duplicate error logging,
although it could now be fixed with mail_index_set_error_nolog().)

7 years agolib-storage: Set index error on transaction commit() callback
Timo Sirainen [Mon, 25 Dec 2017 16:18:14 +0000 (18:18 +0200)] 
lib-storage: Set index error on transaction commit() callback

The commit callback is setting errors to storage. However, it's being
called from mail_index_transaction_commit() whose callers are expecting
the error to be in index. If that index error was attempted to be used,
it could have been wrong or NULL. Fix this by setting the same storage
error also to the index.

7 years agolib-index: Add mail_index_set_error_nolog()
Timo Sirainen [Mon, 25 Dec 2017 16:17:57 +0000 (18:17 +0200)] 
lib-index: Add mail_index_set_error_nolog()

7 years agolib-http: test-http-client - conditionally depend on openssl
Aki Tuomi [Thu, 7 Dec 2017 06:20:02 +0000 (08:20 +0200)] 
lib-http: test-http-client - conditionally depend on openssl

Fixes compiling without openssl, broken by c45da70c

7 years agolib: rename bswap_*() to i_bswap()
Josef 'Jeff' Sipek [Fri, 17 Nov 2017 16:37:45 +0000 (11:37 -0500)] 
lib: rename bswap_*() to i_bswap()

7 years agodoveadm-auth-server: Further fix json problems
Aki Tuomi [Wed, 15 Nov 2017 12:29:59 +0000 (14:29 +0200)] 
doveadm-auth-server: Further fix json problems

Remove excess comma from start, forgotten in 3e06a782584ea2c4ae2a8cb0451e9952f05f9dc8

7 years agodoveadm-auth-server: Send comma only if we are sending field too
Aki Tuomi [Wed, 15 Nov 2017 08:28:37 +0000 (10:28 +0200)] 
doveadm-auth-server: Send comma only if we are sending field too

Fixes json output

7 years agoman: doveadm proxy -a parameter doesn't support TCP sockets
Timo Sirainen [Thu, 9 Nov 2017 14:30:34 +0000 (16:30 +0200)] 
man: doveadm proxy -a parameter doesn't support TCP sockets

7 years agolib-master: Fix SSL_TXT_SSLV2 check in settings
Martti Rannanjärvi [Wed, 10 Jan 2018 10:26:10 +0000 (12:26 +0200)] 
lib-master: Fix SSL_TXT_SSLV2 check in settings

Include <openssl/ssl.h> in src/lib-master/master-service-ssl-settings.c
so SSL_TXT_SSLV2 is defined there when defined in the header.

7 years agodoveadm-server: Switch to TCP connection's ioloop while sending logs to remote
Aki Tuomi [Wed, 3 Jan 2018 15:26:38 +0000 (17:26 +0200)] 
doveadm-server: Switch to TCP connection's ioloop while sending logs to remote

Fixes:
Warning: I/O leak: 0x558d7c074ed0 (ostream-file.c:349, fd 16)
Panic: file ioloop.c: line 127 (io_remove_full): assertion failed: (io->callback != NULL)

7 years agoimapc: Add imapc_features=fetch-empty-is-expunged
Timo Sirainen [Mon, 30 Oct 2017 09:19:17 +0000 (11:19 +0200)] 
imapc: Add imapc_features=fetch-empty-is-expunged

When FETCH returns an empty mail, the mail is assumed to be expunged.

7 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.

7 years agocassandra: Include the used timestamp in logged queries
Timo Sirainen [Sat, 4 Nov 2017 12:33:52 +0000 (14:33 +0200)] 
cassandra: Include the used timestamp in logged queries

7 years agocassandra: Rename cassandra_sql_statement.pending_timestamp to just timestamp
Timo Sirainen [Mon, 6 Nov 2017 09:00:06 +0000 (11:00 +0200)] 
cassandra: Rename cassandra_sql_statement.pending_timestamp to just timestamp

7 years agolib: printf_format_fix*() - Support '*' in precision
Timo Sirainen [Thu, 19 Oct 2017 10:05:41 +0000 (13:05 +0300)] 
lib: printf_format_fix*() - Support '*' in precision

We're commonly using "%.*s"

7 years agolib: printf_format_fix*() - Move minimum field width check to its own function
Timo Sirainen [Thu, 19 Oct 2017 10:02:34 +0000 (13:02 +0300)] 
lib: printf_format_fix*() - Move minimum field width check to its own function

7 years agolib: printf_format_fix*() - Use the same 4 digits as maximum precision length
Timo Sirainen [Thu, 19 Oct 2017 10:26:27 +0000 (13:26 +0300)] 
lib: printf_format_fix*() - Use the same 4 digits as maximum precision length

I forgot the precision can also be used to truncate strings, not just
specify the precision for floating point numbers. So it makes more sense
that the limit is the same as for minimum field width.

7 years agolib: printf_format_fix*() - Be over-strict in what format strings are allowed
Timo Sirainen [Tue, 17 Oct 2017 14:39:32 +0000 (17:39 +0300)] 
lib: printf_format_fix*() - Be over-strict in what format strings are allowed

The checks could have been bypassed by some invalid format strings that were
handled differently by the printf_format_fix*() code and libc. For example
"%**%n" was passed through as ok, but glibc handled the %n in it.

Found by cPanel Security Team.

7 years agolib: fix illumos build issue
Josef 'Jeff' Sipek [Thu, 9 Nov 2017 15:52:12 +0000 (10:52 -0500)] 
lib: fix illumos build issue

The recent performance improvements to the net_addr2ip() code broke
build on illumos which has a 's_addr' #define in netinit/in.h.

7 years agodoveadm dump: Add "multiplex" dump type
Timo Sirainen [Fri, 22 Dec 2017 13:12:30 +0000 (15:12 +0200)] 
doveadm dump: Add "multiplex" dump type

This allows dumping all channels from istream-multiplex stream.

7 years agodoveadm dump: Allow doveadm_cmd_dump.test() to be NULL
Timo Sirainen [Fri, 22 Dec 2017 13:11:45 +0000 (15:11 +0200)] 
doveadm dump: Allow doveadm_cmd_dump.test() to be NULL

This means that there's no auto-detection for the dump type.

7 years agolib: istream-multiplex - Return error if the last packet wasn't fully read
Timo Sirainen [Fri, 22 Dec 2017 13:10:00 +0000 (15:10 +0200)] 
lib: istream-multiplex - Return error if the last packet wasn't fully read

7 years agodoveadm: Fix potential crash or reading garbage from doveadm-server
Timo Sirainen [Fri, 22 Dec 2017 13:07:28 +0000 (15:07 +0200)] 
doveadm: Fix potential crash or reading garbage from doveadm-server

The connection's input buffer may have been reallocated or otherwise moved
while checking for log input.

7 years agodsync: Add missing transaction flags when performing UID renumbering
Timo Sirainen [Wed, 9 Aug 2017 10:17:15 +0000 (13:17 +0300)] 
dsync: Add missing transaction flags when performing UID renumbering

The transaction didn't have MAILBOX_TRANSACTION_FLAG_SYNC or
MAILBOX_TRANSACTION_FLAG_NO_NOTIFY (with DSYNC_BRAIN_FLAG_NO_NOTIFY).

This caused replication-dsync to unnecessarily trigger another dsync
replication notification.

7 years agodsync: Add debug logging for .dovecot-sync.lock locking/unlocking
Timo Sirainen [Thu, 28 Dec 2017 08:27:27 +0000 (10:27 +0200)] 
dsync: Add debug logging for .dovecot-sync.lock locking/unlocking

7 years agodsync: Add per-mailbox sync lock that is always used.
Timo Sirainen [Thu, 28 Dec 2017 12:10:23 +0000 (14:10 +0200)] 
dsync: Add per-mailbox sync lock that is always used.

Both importing and exporting gets the lock before they even sync the
mailbox. The lock is kept until the import/export finishes. This guarantees
that no matter how dsync is run, two dsyncs can't be working on the same
mailbox at the same time.

This lock is in addition to the optional per-user lock enabled by the -l
parameter. If the -l parameter is used, the same lock timeout is used for
the per-mailbox lock. Otherwise 30s timeout is used.

This should help to avoid email duplication when replication is enabled for
public namespaces, and maybe in some other rare situations as well.

7 years agolib: Make file_lock_free(NULL) no-op
Timo Sirainen [Thu, 28 Dec 2017 17:40:29 +0000 (19:40 +0200)] 
lib: Make file_lock_free(NULL) no-op

7 years agoUpdated copyright notices to include the year 2018.
Stephan Bosch [Mon, 1 Jan 2018 21:42:08 +0000 (22:42 +0100)] 
Updated copyright notices to include the year 2018.

7 years agolib-storage: mailbox_list_index - Don't overwrite INBOX's flags with prefix/INBOX's
Timo Sirainen [Thu, 14 Dec 2017 00:11:28 +0000 (02:11 +0200)] 
lib-storage: mailbox_list_index - Don't overwrite INBOX's flags with prefix/INBOX's

This made the real INBOX appear as if it was \NoSelect

7 years agolib-storage: mailbox_list_index - indentation cleanup
Timo Sirainen [Thu, 14 Dec 2017 00:10:27 +0000 (02:10 +0200)] 
lib-storage: mailbox_list_index - indentation cleanup

7 years agolib-storage: mailbox_list_index - List prefix/INBOX if it necessary
Timo Sirainen [Wed, 13 Dec 2017 23:39:32 +0000 (01:39 +0200)] 
lib-storage: mailbox_list_index - List prefix/INBOX if it necessary

7 years agoLAYOUT=fs: Fix listing prefix/INBOX
Timo Sirainen [Wed, 13 Dec 2017 23:36:50 +0000 (01:36 +0200)] 
LAYOUT=fs: Fix listing prefix/INBOX

Removed some confusing special case code that didn't seem to work very well.
Implemented this now properly so that prefix/INBOX is listed as \NoSelect
mailbox whenever it has children.

It's not actually possible to differentiate between INBOX and prefix/INBOX
in the storage for a inbox=yes namespace, because they both are converted
into the same storage_name=INBOX.

7 years agoLAYOUT=fs: List INBOX as \NoInferiors when necessary
Timo Sirainen [Wed, 13 Dec 2017 23:34:25 +0000 (01:34 +0200)] 
LAYOUT=fs: List INBOX as \NoInferiors when necessary

7 years agoLAYOUT=index: List INBOX as \NoInferiors when necessary
Timo Sirainen [Wed, 13 Dec 2017 23:31:10 +0000 (01:31 +0200)] 
LAYOUT=index: List INBOX as \NoInferiors when necessary

7 years agoLAYOUT=Maildir++: List INBOX as \NoInferiors when necessary
Timo Sirainen [Wed, 13 Dec 2017 23:23:45 +0000 (01:23 +0200)] 
LAYOUT=Maildir++: List INBOX as \NoInferiors when necessary

7 years agolib-storage: Add mail_namespace_is_inbox_noinferiors()
Timo Sirainen [Wed, 13 Dec 2017 23:23:01 +0000 (01:23 +0200)] 
lib-storage: Add mail_namespace_is_inbox_noinferiors()

7 years agoimapc: Don't skip listing "INBOX" when INBOX/ namespace prefix is used.
Timo Sirainen [Fri, 8 Dec 2017 14:14:11 +0000 (16:14 +0200)] 
imapc: Don't skip listing "INBOX" when INBOX/ namespace prefix is used.

The INBOX was still listed as part of the autocreated mailboxes, unless
MAILBOX_LIST_ITER_NO_AUTO_BOXES was used.

7 years agopop3: Include mail user variables in logout format
Aki Tuomi [Mon, 4 Dec 2017 09:18:24 +0000 (11:18 +0200)] 
pop3: Include mail user variables in logout format

7 years agopop3: Simplify logout format variable handling
Aki Tuomi [Mon, 4 Dec 2017 09:15:15 +0000 (11:15 +0200)] 
pop3: Simplify logout format variable handling

7 years agoimap: Include mail user variables in logout format
Aki Tuomi [Mon, 4 Dec 2017 09:04:09 +0000 (11:04 +0200)] 
imap: Include mail user variables in logout format

7 years agoimap: Simplify logout format variable handling
Aki Tuomi [Mon, 4 Dec 2017 09:03:45 +0000 (11:03 +0200)] 
imap: Simplify logout format variable handling

7 years agolib-storage: Log an error when mailbox list index is rebuilt due to header fsck flag
Timo Sirainen [Wed, 29 Nov 2017 13:20:29 +0000 (15:20 +0200)] 
lib-storage: Log an error when mailbox list index is rebuilt due to header fsck flag

7 years agolib-storage: Rebuild list index when doing doveadm force-resync
Timo Sirainen [Wed, 29 Nov 2017 13:14:02 +0000 (15:14 +0200)] 
lib-storage: Rebuild list index when doing doveadm force-resync

7 years agoLAYOUT=index: Rebuild list index if INBOX is missing on inbox=yes namespace
Timo Sirainen [Wed, 29 Nov 2017 12:51:02 +0000 (14:51 +0200)] 
LAYOUT=index: Rebuild list index if INBOX is missing on inbox=yes namespace

This avoids having to manually rebuild the list index afterwards if it
becomes lost.

7 years agolib-storage: Add rebuild reason for mail_storage.list_index_corrupted()
Timo Sirainen [Wed, 29 Nov 2017 13:39:45 +0000 (15:39 +0200)] 
lib-storage: Add rebuild reason for mail_storage.list_index_corrupted()

This is done in a bit kludgy way to keep API backwards compatible.
v2.3 cleans this up.

7 years agolib-storage: Remove obsolete comment
Timo Sirainen [Wed, 29 Nov 2017 12:38:38 +0000 (14:38 +0200)] 
lib-storage: Remove obsolete comment

7 years agodirector: Fix logging disconnection error reasons
Timo Sirainen [Tue, 28 Nov 2017 17:01:19 +0000 (19:01 +0200)] 
director: Fix logging disconnection error reasons

The previous commit set errno=0, which weren't logged. If error string is
provided, it doesn't matter what the errno is set (as long as it's not 0),
so we'll just use EINVAL.

7 years agodirector: Log connection stats for all types of disconnections
Timo Sirainen [Tue, 28 Nov 2017 13:06:27 +0000 (15:06 +0200)] 
director: Log connection stats for all types of disconnections