]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
8 years agolib-storage: Try to avoid opening mailbox list index on mailbox access
Timo Sirainen [Mon, 10 Jul 2017 11:37:04 +0000 (14:37 +0300)] 
lib-storage: Try to avoid opening mailbox list index on mailbox access

Perform the STATUS (and other relevant) updates only if syncing or
transaction commits changed anything. This could be optimized further to
check even more strongly whether the seen changes could cause changes to
the list index, but it's probably not worth the effort.

8 years agolib-storage: Storage backend sync_init()s no longer need to check if mailbox is open
Timo Sirainen [Mon, 10 Jul 2017 11:20:50 +0000 (14:20 +0300)] 
lib-storage: Storage backend sync_init()s no longer need to check if mailbox is open

The previous change guarantees it.

8 years agolib-storage: mailbox_sync_init() - open mailbox immediately if it's not open yet
Timo Sirainen [Mon, 10 Jul 2017 11:19:47 +0000 (14:19 +0300)] 
lib-storage: mailbox_sync_init() - open mailbox immediately if it's not open yet

This simplifies the work for plugins that want to hook into
mailbox.sync_init() so they no longer have to handle the "mailbox isn't
opened" case.

8 years agoimap: Don't do autoexpunging when IMAP client is hibernated
Timo Sirainen [Mon, 10 Jul 2017 10:56:49 +0000 (13:56 +0300)] 
imap: Don't do autoexpunging when IMAP client is hibernated

8 years agolib-fs: Add init function that can use fs string directly
Aki Tuomi [Tue, 2 May 2017 11:01:16 +0000 (14:01 +0300)] 
lib-fs: Add init function that can use fs string directly

This avoids doing splitting the fs driver and args
everywhere and ensures that separators are consistent.

8 years agolib: remove support for Boehm GC
Josef 'Jeff' Sipek [Wed, 5 Jul 2017 13:08:41 +0000 (16:08 +0300)] 
lib: remove support for Boehm GC

There were several issues with our usage of Boehm GC:

 - it didn't help with memory fragmentation
 - it is not very efficient
 - it was rarely enabled & used

Proper use of a GC would involve radical changes to how we write code
and cause portability issues.  We can get most of the benefits of a GC
with data stacks and alloc-only memory pools.

8 years agovirtual: If virtual_uid is not assigned skip it
Aki Tuomi [Thu, 6 Jul 2017 09:40:33 +0000 (12:40 +0300)] 
virtual: If virtual_uid is not assigned skip it

We cannot lookup mails with uid 0, so if we see
that mail has virtual uid 0, do not attempt to look it
up from index, but skip it.

Fixes Panic: file mail-index-map.c: line 549 (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0)

8 years agovirtual: Append virtual mailbox name to open reason on box alloc
Aki Tuomi [Wed, 5 Jul 2017 12:20:32 +0000 (15:20 +0300)] 
virtual: Append virtual mailbox name to open reason on box alloc

8 years agovirtual: Append virtual mailbox information to get stream reason
Aki Tuomi [Wed, 5 Jul 2017 12:20:18 +0000 (15:20 +0300)] 
virtual: Append virtual mailbox information to get stream reason

8 years agovirtual: Expunge virtual mails if backend box is deleted
Aki Tuomi [Wed, 5 Jul 2017 11:24:49 +0000 (14:24 +0300)] 
virtual: Expunge virtual mails if backend box is deleted

When mail is added to a mailbox and then deleted, expunge
the sequences from virtual index in sync.

Fixes Error: Unexpectedly lost Mailbox ID 4

8 years agovirtual: Do not mark broken folder as initialized
Aki Tuomi [Mon, 3 Jul 2017 10:53:49 +0000 (13:53 +0300)] 
virtual: Do not mark broken folder as initialized

Otherwise it won't get repaired

8 years agovirtual: Fix highest_mailbox_id if it's wrong
Aki Tuomi [Mon, 3 Jul 2017 10:53:31 +0000 (13:53 +0300)] 
virtual: Fix highest_mailbox_id if it's wrong

8 years agovirtual: Force header rewrite if header not found or crc32 changed
Aki Tuomi [Mon, 3 Jul 2017 10:25:35 +0000 (13:25 +0300)] 
virtual: Force header rewrite if header not found or crc32 changed

Otherwise the header gets only partially written

8 years agolib-storage: Clarify keywords handling in mail_save_finish
Aki Tuomi [Thu, 29 Jun 2017 10:22:32 +0000 (13:22 +0300)] 
lib-storage: Clarify keywords handling in mail_save_finish

8 years agovirtual: Fix keywords handling
Aki Tuomi [Wed, 28 Jun 2017 10:45:19 +0000 (13:45 +0300)] 
virtual: Fix keywords handling

Keywords are per-mail object, and should be treated as one. The old
code left pointer to keywords dandling which lead into double-free.
Now the ctx->data is treated in similar way as other backends.

Fixes Panic: file mail-index.c: line 417 (mail_index_keywords_unref): assertion failed: (keywords->refcount > 0)
Fixes Panic: file mail-storage.c: line 2311 (mailbox_save_context_reset): assertion failed: (!ctx->unfinished)

8 years agovirtual: Fix recent flag updates
Aki Tuomi [Tue, 27 Jun 2017 11:19:16 +0000 (14:19 +0300)] 
virtual: Fix recent flag updates

View must be updated before looking up seqs

8 years agovirtual: Call mailbox_save_context_deinit before freeing context
Aki Tuomi [Thu, 29 Jun 2017 10:46:06 +0000 (13:46 +0300)] 
virtual: Call mailbox_save_context_deinit before freeing context

Otherwise dest_mail does not get free'd

8 years agovirtual: Use mailbox_notify_list API when mailbox_list_index is enabled
Aki Tuomi [Tue, 27 Jun 2017 09:51:51 +0000 (12:51 +0300)] 
virtual: Use mailbox_notify_list API when mailbox_list_index is enabled

8 years agovirtual: Generate GUID for virtual folder
Aki Tuomi [Tue, 27 Jun 2017 07:54:08 +0000 (10:54 +0300)] 
virtual: Generate GUID for virtual folder

GUID is generated when index is first created
or the rules change.

8 years agolib-storage: Add type checking for mailbox_list_notify_wait
Aki Tuomi [Tue, 27 Jun 2017 09:42:27 +0000 (12:42 +0300)] 
lib-storage: Add type checking for mailbox_list_notify_wait

8 years agolmtp: client_input_data_write_local() refactored
Sergey Kitov [Thu, 6 Jul 2017 12:51:17 +0000 (15:51 +0300)] 
lmtp: client_input_data_write_local() refactored

loops in client_input_data_write_local() and in client_deliver_next()
are merged as they are essentially the same loop,
client_deliver_next() renamed to client_deliver_to_rcpts().

8 years agolmtp: Fix for wrong session id of mail user when saving mail, quota checking on
Sergey Kitov [Thu, 6 Jul 2017 12:45:24 +0000 (15:45 +0300)] 
lmtp: Fix for wrong session id of mail user when saving mail, quota checking on

When quota is checked mail user is allocated with custom ":quota" session id
suffix without incrementing service user session id counter

8 years agolib-storage: Use ST_CHANGED in mailbox-watch
Aki Tuomi [Thu, 6 Jul 2017 11:45:26 +0000 (14:45 +0300)] 
lib-storage: Use ST_CHANGED in mailbox-watch

Allows notifying sub-second changes.

8 years agolib, lib-storage: Move INOTIFY_ST_CHANGED to ST_CHANGED in lib
Aki Tuomi [Thu, 6 Jul 2017 11:44:40 +0000 (14:44 +0300)] 
lib, lib-storage: Move INOTIFY_ST_CHANGED to ST_CHANGED in lib

Allows reusing this elsewhere

8 years agolib: file_create_locked() - Treat mkdir() EEXIST error as success
Timo Sirainen [Thu, 6 Jul 2017 10:24:31 +0000 (13:24 +0300)] 
lib: file_create_locked() - Treat mkdir() EEXIST error as success

This can happen in race conditions when multiple processes are mkdir()ing
the same directory. It shouldn't result in failure.

8 years agovirtual: Avoid assert-crash if backend mailbox's have_guid lookup fails
Timo Sirainen [Thu, 6 Jul 2017 08:24:35 +0000 (11:24 +0300)] 
virtual: Avoid assert-crash if backend mailbox's have_guid lookup fails

The MAIL_ERROR_NOTFOUND can happen if the mailbox was already deleted.
Other errors aren't expected to happen and possibly point to a bug.

Fixes:
Panic: file mail-storage.c: line 1831: unreached

8 years agodoveadm: Fix a typo in doveadm-print-flow function name
Martti Rannanjärvi [Wed, 5 Jul 2017 11:38:19 +0000 (14:38 +0300)] 
doveadm: Fix a typo in doveadm-print-flow function name

doveadm_print_flow_print_heder() -> doveadm_print_flow_print_header()

8 years agonotify-status: Add notify-status plugin
Aki Tuomi [Tue, 4 Jul 2017 11:22:19 +0000 (14:22 +0300)] 
notify-status: Add notify-status plugin

This enables updating a dictionary with mailbox
status information when the mailbox changes.

It requires notify_status_dict setting for specifying
the dict where the data is stored.

One can optionally use notify_status_mailbox patterns
for specifying which box(es) the status update is done.
Subsequent patterns are notify_status_mailbox2 and so forth.

One can also specify data format using notify_status_value
plugin setting.

8 years agolib-http: server: Implemented API for handling the incoming request payload in the...
Stephan Bosch [Mon, 27 Mar 2017 22:03:04 +0000 (00:03 +0200)] 
lib-http: server: Implemented API for handling the incoming request payload in the background.

It allows forwarding the incoming payload to an output stream (e.g. iostream-temp) or to a buffer.
The maximum size of the payload is configurable. The client will get a 413 error if the maximum is exceeded.

8 years agolib-http: server: Explicitly record the number of references held for a request by...
Stephan Bosch [Sat, 17 Jun 2017 13:51:09 +0000 (15:51 +0200)] 
lib-http: server: Explicitly record the number of references held for a request by the application from within the callback.

8 years agolib-http: server: Allow holding only a reference to the request payload stream, rathe...
Stephan Bosch [Tue, 28 Mar 2017 22:17:50 +0000 (00:17 +0200)] 
lib-http: server: Allow holding only a reference to the request payload stream, rather than the request itself.

This mimics the http-client behavior in this case.
It makes the implementation of the background payload handling API in subsequent commits a little simpler.

8 years agolib-http: server: Changed http_server_request_is_complete() from an inline to a norma...
Stephan Bosch [Mon, 27 Mar 2017 18:44:37 +0000 (20:44 +0200)] 
lib-http: server: Changed http_server_request_is_complete() from an inline to a normal function.

8 years agolib-http: server: Restructured http-server-private.h.
Stephan Bosch [Mon, 27 Mar 2017 18:34:21 +0000 (20:34 +0200)] 
lib-http: server: Restructured http-server-private.h.

8 years agolib-http: server: Improved documentation in http-server.h.
Stephan Bosch [Mon, 27 Mar 2017 18:18:18 +0000 (20:18 +0200)] 
lib-http: server: Improved documentation in http-server.h.

8 years agolib-http: server: Restructured http-server.h.
Stephan Bosch [Mon, 27 Mar 2017 17:50:31 +0000 (19:50 +0200)] 
lib-http: server: Restructured http-server.h.

8 years agodsync: fix splitting login from host
Thomas Reifferscheid [Mon, 3 Jul 2017 20:06:21 +0000 (22:06 +0200)] 
dsync: fix splitting login from host

Using strchr() was splitting login and host at the first
occurrence of '@' which leads to troublesome behaviour.
When calling strace one would notice the misbehaviour:

execve("/usr/sbin/ssh", ["ssh", "-lthomas", "domain.org@10.8.13.2"

using strrch() however splits login and host at the last occurrence
of '@'.

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
8 years agoquota-status: Support recipient_delimiter
Aki Tuomi [Mon, 3 Jul 2017 15:40:47 +0000 (18:40 +0300)] 
quota-status: Support recipient_delimiter

8 years agoquota-status: Use pooled memory for globals
Aki Tuomi [Mon, 3 Jul 2017 15:31:56 +0000 (18:31 +0300)] 
quota-status: Use pooled memory for globals

8 years agolmtp: Use message_detail_address_parse
Aki Tuomi [Mon, 3 Jul 2017 15:27:53 +0000 (18:27 +0300)] 
lmtp: Use message_detail_address_parse

8 years agolib-mail: Add unit test for message detail address parser
Aki Tuomi [Mon, 3 Jul 2017 16:00:14 +0000 (19:00 +0300)] 
lib-mail: Add unit test for message detail address parser

8 years agolib-mail: Add message_detail_address_parse
Aki Tuomi [Mon, 3 Jul 2017 15:18:36 +0000 (18:18 +0300)] 
lib-mail: Add message_detail_address_parse

Parses e.g. username+foo@domain into
username@domain with detail foo, when
delimiter is set to +

8 years agoimapc: Prefech - Initialize cached stream only if needed
Timo Sirainen [Mon, 3 Jul 2017 18:08:02 +0000 (21:08 +0300)] 
imapc: Prefech - Initialize cached stream only if needed

If the mail is immediately accessed for other purposes (e.g. fetching
message flags), there's no need to go through all the trouble of
initializing the mail stream.

8 years agolib-storage: Fix ITERINDEX to leave \NoSelect parents after deleting child mailbox
Timo Sirainen [Fri, 30 Jun 2017 10:46:22 +0000 (13:46 +0300)] 
lib-storage: Fix ITERINDEX to leave \NoSelect parents after deleting child mailbox

For example if "a/b" was created and deleted, "a" should be left behind.
(Or at least it shouldn't have left "a" to mail root directory and kept it
invisible since it didn't exist in index dir.)

8 years agodbox: Check mailbox existence from index directory with ITERINDEX
Timo Sirainen [Mon, 26 Jun 2017 16:06:26 +0000 (19:06 +0300)] 
dbox: Check mailbox existence from index directory with ITERINDEX

8 years agodbox: Use mail_index_header.last_temp_file_scan instead of directory's atime
Timo Sirainen [Wed, 28 Jun 2017 16:46:01 +0000 (19:46 +0300)] 
dbox: Use mail_index_header.last_temp_file_scan instead of directory's atime

This will be required for the following ITERINDEX change.

8 years agolib-index, lib-storage: Add mail_index_header.last_temp_file_scan
Timo Sirainen [Wed, 28 Jun 2017 16:41:21 +0000 (19:41 +0300)] 
lib-index, lib-storage: Add mail_index_header.last_temp_file_scan

Also add index_mailbox_update_last_temp_file_scan() for easily updating it.

This is reusing an old "sync timestamp" field. Because it was a timestamp,
it doesn't matter if the old data still exists in it. This field could have
been added as an extension, but that's more work and this feature is generic
enough that it should be useful for many of the mail storage backends.

8 years agodbox: Cleanup - reorganize old temp file cleanup code
Timo Sirainen [Mon, 26 Jun 2017 15:59:17 +0000 (18:59 +0300)] 
dbox: Cleanup - reorganize old temp file cleanup code

No functional changes. In preparation for the next commits.

8 years agolib-storage: Check for storage existence from index dir with ITERINDEX
Timo Sirainen [Mon, 26 Jun 2017 16:30:11 +0000 (19:30 +0300)] 
lib-storage: Check for storage existence from index dir with ITERINDEX

The root path creation doesn't really even seem to be necessary, because any
mailbox access will automatically mkdir the missing directories anyway.
Although writing other files might not work so well, such as
mail_attribute_dict that points inside the mail directory.

This change simply changes the mailboxes/ directory to be looked up from
index directory instead of the mail root directory. It also mkdirs the
index/mailboxes/ directory afterwards if it didn't exist. So practically
this change shouldn't break anything, since the mailboxes/ directory should
always exist for both root and the indexes.

8 years agolib-storage: mailbox_list_get_permissions() - Use index dir with ITERINDEX
Timo Sirainen [Mon, 26 Jun 2017 15:50:24 +0000 (18:50 +0300)] 
lib-storage: mailbox_list_get_permissions() - Use index dir with ITERINDEX

8 years agolib-storage: mailbox_list_get_permissions() - Use index dir for storage without mails
Timo Sirainen [Mon, 26 Jun 2017 15:46:30 +0000 (18:46 +0300)] 
lib-storage: mailbox_list_get_permissions() - Use index dir for storage without mails

The index dir might still exist.

8 years agolib-storage: Cleanup - move code to mailbox_list_get_permissions_stat()
Timo Sirainen [Mon, 26 Jun 2017 15:41:27 +0000 (18:41 +0300)] 
lib-storage: Cleanup - move code to mailbox_list_get_permissions_stat()

Comments changed also a bit, but no functional changes.

8 years agolib-storage: Cleanup - Use mailbox_permissions_copy() instead of duplicating it
Timo Sirainen [Mon, 26 Jun 2017 15:23:01 +0000 (18:23 +0300)] 
lib-storage: Cleanup - Use mailbox_permissions_copy() instead of duplicating it

8 years agolib-storage: Add mailbox_permissions_copy()
Timo Sirainen [Mon, 26 Jun 2017 15:19:17 +0000 (18:19 +0300)] 
lib-storage: Add mailbox_permissions_copy()

8 years agolib-storage: Add mail_location=..:ITERINDEX
Timo Sirainen [Mon, 26 Jun 2017 17:10:17 +0000 (20:10 +0300)] 
lib-storage: Add mail_location=..:ITERINDEX

This changes mailbox list iteration to work using INDEX directory instead of
the normal mail directory. This can be helpful when the indexes are stored
on a faster storage.

8 years agoimap: Add more error checking to NOTIFY parameter parsing
Timo Sirainen [Fri, 30 Jun 2017 14:51:34 +0000 (17:51 +0300)] 
imap: Add more error checking to NOTIFY parameter parsing

This should make it clearer to realize when invalid syntax is being used
rather than just ignoring the problem.

8 years agoimap: Fix NOTIFY parameter parsing by reverting earlier change
Timo Sirainen [Fri, 30 Jun 2017 14:33:15 +0000 (17:33 +0300)] 
imap: Fix NOTIFY parameter parsing by reverting earlier change

I misread the RFC and wrote broken tests.
Reverts 64d2efdc4b0bdf92249840e9db89b91c8dc0f3a3

8 years agolib-storage: Add BROKENCHAR to mail_location
Timo Sirainen [Fri, 30 Jun 2017 12:02:40 +0000 (15:02 +0300)] 
lib-storage: Add BROKENCHAR to mail_location

This makes the mailbox_list_settings.broken_char configurable. Mainly useful
with imapc when remote server doesn't contain valid mUTF-7 mailbox names.

8 years agolib-storage: Fix mailbox delete to not delete childrens' INDEX or CONTROL dirs
Timo Sirainen [Fri, 30 Jun 2017 10:56:54 +0000 (13:56 +0300)] 
lib-storage: Fix mailbox delete to not delete childrens' INDEX or CONTROL dirs

If mail_location had separate INDEX and/or CONTROL set, deleting a mailbox
with children caused the childrens' index and/or control directories to be
deleted (but the mail/ALT directories weren't).

I'm not sure why the _FLAG_MAILBOX_FILES was treated as a special case
earlier. It shouldn't make a difference.

8 years agolib-storage: mailbox_list_delete_mailbox_nonrecursive() - Fix error handling
Timo Sirainen [Tue, 27 Jun 2017 12:39:12 +0000 (15:39 +0300)] 
lib-storage: mailbox_list_delete_mailbox_nonrecursive() - Fix error handling

It should return error on unexpected readdir(), closedir() and unlink()
failures. Also fix handling a race condition with another process deleting
the mailbox at the same time.

8 years agolib-storage: mailbox_list_delete_trash() - Don't ignore errors
Timo Sirainen [Tue, 27 Jun 2017 13:56:08 +0000 (16:56 +0300)] 
lib-storage: mailbox_list_delete_trash() - Don't ignore errors

8 years agolib-storage: Use mailbox_list_delete_finish_ret() for fs & maildir++ layout
Timo Sirainen [Tue, 27 Jun 2017 13:37:16 +0000 (16:37 +0300)] 
lib-storage: Use mailbox_list_delete_finish_ret() for fs & maildir++ layout

Fixes a problem where e.g. index directory existed but mail root didn't,
and the mailbox couldn't be fully deleted. This was especially a problem
with ITERINDEX enabled.

8 years agolib-storage: Add mailbox_list_delete_finish_ret()
Timo Sirainen [Tue, 27 Jun 2017 13:36:56 +0000 (16:36 +0300)] 
lib-storage: Add mailbox_list_delete_finish_ret()

This simplifies deletion logic for mailbox list backends.

8 years agolib-storage: mailbox_list_delete_finish() - Return whether anything was deleted
Timo Sirainen [Tue, 27 Jun 2017 13:13:34 +0000 (16:13 +0300)] 
lib-storage: mailbox_list_delete_finish() - Return whether anything was deleted

8 years agolib-storage: Add mailbox_list_get_last_mail_error()
Timo Sirainen [Tue, 27 Jun 2017 13:16:21 +0000 (16:16 +0300)] 
lib-storage: Add mailbox_list_get_last_mail_error()

8 years agolib-storage: Add comments to mailbox-list-delete.h
Timo Sirainen [Tue, 27 Jun 2017 12:57:10 +0000 (15:57 +0300)] 
lib-storage: Add comments to mailbox-list-delete.h

8 years agolib: Fix file_create_locked() unit test to delete temp file afterwards
Timo Sirainen [Wed, 28 Jun 2017 20:37:22 +0000 (23:37 +0300)] 
lib: Fix file_create_locked() unit test to delete temp file afterwards

Also removed a path string that was never used.

8 years agolib-storage: Add VOLATILEDIR setting to mail_location
Timo Sirainen [Wed, 21 Jun 2017 22:28:57 +0000 (01:28 +0300)] 
lib-storage: Add VOLATILEDIR setting to mail_location

This is useful for creating temporary locks that could exist in tmpfs.
Currently this is used for .vsize.lock and dovecot.autoexpunge.lock.

8 years agolib-storage: Move autoexpunge lock creation to a generic mail_user_lock_file_create()
Timo Sirainen [Wed, 21 Jun 2017 23:44:12 +0000 (02:44 +0300)] 
lib-storage: Move autoexpunge lock creation to a generic mail_user_lock_file_create()

8 years agolib-storage: mailbox_autoexpunge_lock() - Don't hide ENOENT error
Timo Sirainen [Wed, 21 Jun 2017 23:33:03 +0000 (02:33 +0300)] 
lib-storage: mailbox_autoexpunge_lock() - Don't hide ENOENT error

It means that the user's home directory doesn't exist, which is pretty
unexpected. Home directory is supposed to be created when the storage is
initialized.

8 years agolib-storage: mailbox_autoexpunge_lock() - small cleanup
Timo Sirainen [Wed, 21 Jun 2017 23:32:10 +0000 (02:32 +0300)] 
lib-storage: mailbox_autoexpunge_lock() - small cleanup

No functional changes - just reorganizing code and adding comments.

8 years agolib-storage: Use file_lock_set_*_on_free() for dovecot.autoexpunge.lock
Timo Sirainen [Wed, 21 Jun 2017 23:24:08 +0000 (02:24 +0300)] 
lib-storage: Use file_lock_set_*_on_free() for dovecot.autoexpunge.lock

8 years agolib-storage: Move .vsize.lock creation to a generic mailbox_lock_file_create()
Timo Sirainen [Wed, 21 Jun 2017 23:19:18 +0000 (02:19 +0300)] 
lib-storage: Move .vsize.lock creation to a generic mailbox_lock_file_create()

8 years agolib-storage: Move .vsize.lock creation to its own function
Timo Sirainen [Wed, 21 Jun 2017 23:07:16 +0000 (02:07 +0300)] 
lib-storage: Move .vsize.lock creation to its own function

8 years agolib-storage: Use file_lock_set_*_on_free() for .vsize.lock
Timo Sirainen [Wed, 21 Jun 2017 23:05:16 +0000 (02:05 +0300)] 
lib-storage: Use file_lock_set_*_on_free() for .vsize.lock

This avoids storing the lock_path and lock_fd separately.

8 years agolib-storage: Fix error logging for failing to create .vsize.lock
Timo Sirainen [Wed, 21 Jun 2017 22:56:18 +0000 (01:56 +0300)] 
lib-storage: Fix error logging for failing to create .vsize.lock

8 years agolib: file_create_locked() - Add settings to mkdir() missing parent directories
Timo Sirainen [Wed, 28 Jun 2017 14:48:01 +0000 (17:48 +0300)] 
lib: file_create_locked() - Add settings to mkdir() missing parent directories

8 years agolib: Add unit test for file_create_locked()
Timo Sirainen [Wed, 28 Jun 2017 14:40:20 +0000 (17:40 +0300)] 
lib: Add unit test for file_create_locked()

8 years agolib: Add file_lock_set_close_on_free()
Timo Sirainen [Wed, 21 Jun 2017 22:52:29 +0000 (01:52 +0300)] 
lib: Add file_lock_set_close_on_free()

8 years agolib: Add file_lock_set_unlink_on_free()
Timo Sirainen [Wed, 21 Jun 2017 22:47:51 +0000 (01:47 +0300)] 
lib: Add file_lock_set_unlink_on_free()

8 years agolib: file_create_locked() - update lock path after link()
Timo Sirainen [Thu, 22 Jun 2017 07:35:16 +0000 (10:35 +0300)] 
lib: file_create_locked() - update lock path after link()

8 years agolib: Add file_lock_set_path()
Timo Sirainen [Thu, 22 Jun 2017 06:05:06 +0000 (09:05 +0300)] 
lib: Add file_lock_set_path()

8 years agolib: Add file_lock_get_path()
Timo Sirainen [Wed, 21 Jun 2017 22:42:56 +0000 (01:42 +0300)] 
lib: Add file_lock_get_path()

This allows getting the file path from the lock without having to preserve
it separately.

8 years agolib-storage: Fail at startup if root mail directory isn't a directory
Timo Sirainen [Mon, 26 Jun 2017 16:19:44 +0000 (19:19 +0300)] 
lib-storage: Fail at startup if root mail directory isn't a directory

8 years agolib-ssl-iostream: Fixed deinitialization of openssl library.
Stephan Bosch [Fri, 7 Apr 2017 13:36:58 +0000 (15:36 +0200)] 
lib-ssl-iostream: Fixed deinitialization of openssl library.

Previously, it also dereferenced the library when it was never initialized in the first place.

8 years agolib-program-client: Fixed unix socket test suite's test server to properly read input...
Stephan Bosch [Mon, 22 May 2017 15:41:54 +0000 (17:41 +0200)] 
lib-program-client: Fixed unix socket test suite's test server to properly read input from client.

It did not read all available input in the input handler.

8 years agolib-storage: Don't autocreate mailbox during deletion.
Timo Sirainen [Mon, 26 Jun 2017 16:44:43 +0000 (19:44 +0300)] 
lib-storage: Don't autocreate mailbox during deletion.

Trying to delete a nonexistent autocreated mailbox first created it and then
immediately deleted it.

8 years agolib-storage: Make mailbox_is_autocreated() public
Timo Sirainen [Tue, 27 Jun 2017 11:22:50 +0000 (14:22 +0300)] 
lib-storage: Make mailbox_is_autocreated() public

This also removes duplicated code from acl plugin.

8 years agosdbox: Don't create index directory when trying to open nonexistent mailboxes
Timo Sirainen [Tue, 27 Jun 2017 13:55:34 +0000 (16:55 +0300)] 
sdbox: Don't create index directory when trying to open nonexistent mailboxes

8 years agopop3-migration: Drop lines with only spaces or tabs from comparison
Timo Sirainen [Wed, 28 Jun 2017 12:50:11 +0000 (15:50 +0300)] 
pop3-migration: Drop lines with only spaces or tabs from comparison

Zimbra drops out those lines from IMAP BODY[HEADER] replies.

8 years agolib-http: client: Drop peer immediately if it has no more linked queues and it is...
Stephan Bosch [Fri, 20 Jan 2017 00:10:04 +0000 (01:10 +0100)] 
lib-http: client: Drop peer immediately if it has no more linked queues and it is not connected and not waiting for a backoff timeout.

It is currently unlikely to happen at this point, but it is better to make sure it is handled appropriately.
The pending shared HTTP client changes will make this a likely event.
This surfaced as a problem for the HTTP proxy.

8 years agolib-storage: mail_add_temp_wanted_fields() - delay opening stream
Timo Sirainen [Sun, 25 Jun 2017 06:10:52 +0000 (09:10 +0300)] 
lib-storage: mail_add_temp_wanted_fields() - delay opening stream

Allows plugins to call it in mail.get_stream() without infinite loop.

8 years agoglobal: Fixed missing or out-of-date copyright notices.
Stephan Bosch [Fri, 23 Jun 2017 14:45:24 +0000 (16:45 +0200)] 
global: Fixed missing or out-of-date copyright notices.

8 years agodsync: Use header hashing version 3
Timo Sirainen [Fri, 23 Jun 2017 08:15:32 +0000 (11:15 +0300)] 
dsync: Use header hashing version 3

8 years agopop3-migration: Replace trailing whitespace removal with new header hashing version
Timo Sirainen [Fri, 23 Jun 2017 08:02:24 +0000 (11:02 +0300)] 
pop3-migration: Replace trailing whitespace removal with new header hashing version

This is now done by message_header_hash(), which makes it work correctly
also for dsync+imapc.

Reverts 0cf3b30b86e6c39f43b8e13a718cd078187ca86d, except for the unit tests.

8 years agolib-mail: message_header_hash_more() - add v3 that strips spaces
Timo Sirainen [Fri, 23 Jun 2017 08:00:37 +0000 (11:00 +0300)] 
lib-mail: message_header_hash_more() - add v3 that strips spaces

This helps with Zimbra, which strips away trailing whitespaces in
BODY[HEADER].

8 years agolib-mail: test-message-header-hash - add more tests
Timo Sirainen [Fri, 23 Jun 2017 06:24:40 +0000 (09:24 +0300)] 
lib-mail: test-message-header-hash - add more tests

8 years agolib-mail: message_header_hash_more() - refactor to use switch()
Timo Sirainen [Fri, 23 Jun 2017 06:14:40 +0000 (09:14 +0300)] 
lib-mail: message_header_hash_more() - refactor to use switch()

8 years agoquota: Fix failing again if quota setting has invalid parameters
Timo Sirainen [Thu, 22 Jun 2017 08:43:05 +0000 (11:43 +0300)] 
quota: Fix failing again if quota setting has invalid parameters

This was broken by the recent quota parameter parsing changes.

8 years agoacl: Don't read/write dovecot-acl-list with acl_globals_only=yes
Timo Sirainen [Wed, 21 Jun 2017 22:12:56 +0000 (01:12 +0300)] 
acl: Don't read/write dovecot-acl-list with acl_globals_only=yes

It's only an optimization for the dovecot-acl files, which don't exist
with acl_globals_only=yes

8 years agolib/bits.c: Finish fix for compiling with gcc 3.0 .. 3.3
Timo Sirainen [Wed, 21 Jun 2017 13:54:25 +0000 (16:54 +0300)] 
lib/bits.c: Finish fix for compiling with gcc 3.0 .. 3.3