]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agolib-http: test-http-payload: Ignore SIGPIPE.
Stephan Bosch [Fri, 9 Feb 2018 23:00:17 +0000 (00:00 +0100)] 
lib-http: test-http-payload: Ignore SIGPIPE.

7 years agolib-smtp: test-smtp-payload: Ignore SIGPIPE.
Stephan Bosch [Fri, 9 Feb 2018 21:09:47 +0000 (22:09 +0100)] 
lib-smtp: test-smtp-payload: Ignore SIGPIPE.

7 years agolib-http: server: Allow creating server with custom SSL settings.
Stephan Bosch [Fri, 9 Feb 2018 21:27:00 +0000 (22:27 +0100)] 
lib-http: server: Allow creating server with custom SSL settings.

Normally, the settings are obtained through lib-master, but that is not
really suitable for the test suite.

7 years agolib-smtp: server: Allow creating server with custom SSL settings.
Stephan Bosch [Fri, 9 Feb 2018 21:06:49 +0000 (22:06 +0100)] 
lib-smtp: server: Allow creating server with custom SSL settings.

Normally, the settings are obtained through lib-master, but that is not
really suitable for the test suite.

7 years agolib-smtp: client: Amend connection debug message with source ip:port.
Stephan Bosch [Sat, 17 Mar 2018 20:08:09 +0000 (21:08 +0100)] 
lib-smtp: client: Amend connection debug message with source ip:port.

Helps matching debug logs between client and server.

7 years agolib-smtp: test-smtp-payload: Keep the number of pending transactions constant.
Stephan Bosch [Sat, 17 Mar 2018 17:10:04 +0000 (18:10 +0100)] 
lib-smtp: test-smtp-payload: Keep the number of pending transactions constant.

Before, a window was used.

7 years agolib-smtp: test-smtp-payload: Make proper definition for the maximum number of paralle...
Stephan Bosch [Sat, 17 Mar 2018 17:05:01 +0000 (18:05 +0100)] 
lib-smtp: test-smtp-payload: Make proper definition for the maximum number of parallel transactions.

7 years agolib-http: test-http-payload: Add test for exchanging payload with unknown size.
Stephan Bosch [Sat, 10 Feb 2018 01:20:31 +0000 (02:20 +0100)] 
lib-http: test-http-payload: Add test for exchanging payload with unknown size.

This will force using the chunked transfer encoding.

7 years agolib-http: test-http-payload: server: Fix asynchronous listening.
Stephan Bosch [Sat, 17 Mar 2018 20:34:11 +0000 (21:34 +0100)] 
lib-http: test-http-payload: server: Fix asynchronous listening.

The listening socket was blocking and the io handler only accepted one connection per run.

7 years agolib-smtp: test-smtp-payload: server: Fix asynchronous listening.
Stephan Bosch [Sat, 17 Mar 2018 13:14:03 +0000 (14:14 +0100)] 
lib-smtp: test-smtp-payload: server: Fix asynchronous listening.

The listening socket was blocking and the io handler only accepted one connection per run.

7 years agolib-ssl-iostream: Add support for creating server and client test SSL settings.
Stephan Bosch [Fri, 9 Feb 2018 21:04:23 +0000 (22:04 +0100)] 
lib-ssl-iostream: Add support for creating server and client test SSL settings.

This is useful for building test cases with SSL support.

7 years agolib-master: If stats process wants no events, send nothing to it
Timo Sirainen [Wed, 23 May 2018 12:14:50 +0000 (15:14 +0300)] 
lib-master: If stats process wants no events, send nothing to it

Instead of sending everything to it..

7 years agolib-charset: test-charset can now be used to convert input file
Timo Sirainen [Mon, 21 May 2018 21:22:42 +0000 (00:22 +0300)] 
lib-charset: test-charset can now be used to convert input file

Usage: test-charset <charset> [<input path>]

If <input path> isn't specified, read input from stdin.  The input is
converted to UTF-8 and written to stdout.

7 years agodoveadm director: Remove unnecessary extra newlines from output
Timo Sirainen [Wed, 23 May 2018 14:13:23 +0000 (17:13 +0300)] 
doveadm director: Remove unnecessary extra newlines from output

7 years agolib-master: Move const char *error declaration inside ifdef HAVE_SSL
Martti Rannanjärvi [Thu, 24 May 2018 11:55:59 +0000 (14:55 +0300)] 
lib-master: Move const char *error declaration inside ifdef HAVE_SSL

This is so you can compile dovecot without ssl.

7 years agolib: io_loop_stop() should stop the ioloop immediately
Timo Sirainen [Tue, 22 May 2018 19:45:32 +0000 (22:45 +0300)] 
lib: io_loop_stop() should stop the ioloop immediately

Other timeouts or IOs shouldn't be called anymore.

7 years agolib: test-multiplex - Make sure alt istream's final input is read
Timo Sirainen [Wed, 23 May 2018 21:40:41 +0000 (00:40 +0300)] 
lib: test-multiplex - Make sure alt istream's final input is read

Previously the code trusted that the the alt istream's final IO callback was
called even after io_loop_stop().

7 years agocassandra: Fix empty binary parameters with prepared statements
Timo Sirainen [Wed, 23 May 2018 22:32:40 +0000 (01:32 +0300)] 
cassandra: Fix empty binary parameters with prepared statements

Fixes:
Panic: Trying to allocate 0 bytes

7 years agolib-smtp: server: Fix the enforcement of the maximum DATA command message size.
Stephan Bosch [Wed, 23 May 2018 13:54:53 +0000 (15:54 +0200)] 
lib-smtp: server: Fix the enforcement of the maximum DATA command message size.

The global setting from the server object was used, rather than the
per-connection setting. The latter is usually the one that is properly set,
while the global server setting is left at zero. For LMTP this meant that the
40 Mb implicit limit was still in force.

7 years agolib-smtp: client: Increase the default BDAT chunk size.
Stephan Bosch [Sat, 17 Mar 2018 17:00:54 +0000 (18:00 +0100)] 
lib-smtp: client: Increase the default BDAT chunk size.

Reduces the number of roundtrips and keeps the TCP window filled better.
The default is now based on the NET_BLOCK_SIZE definition.

7 years agolib: Define NET_BLOCK_SIZE.
Stephan Bosch [Tue, 22 May 2018 07:42:00 +0000 (09:42 +0200)] 
lib: Define NET_BLOCK_SIZE.

This defines the default size for data blocks transferred over the network. It
should be large enough to guarantee filling up the TCP window (for efficiency),
while still preventing sending much data while the peer has already rejected
the rest of the transfer.

7 years agofs-posix: Support FS_METADATA_WRITE_FNAME for fs_copy()
Timo Sirainen [Tue, 22 May 2018 13:06:15 +0000 (16:06 +0300)] 
fs-posix: Support FS_METADATA_WRITE_FNAME for fs_copy()

7 years agoauth: db-lua - Remove unnecessary pushnil usage
Aki Tuomi [Tue, 22 May 2018 06:23:32 +0000 (09:23 +0300)] 
auth: db-lua - Remove unnecessary pushnil usage

lua_pushstring is NULL-safe

7 years agolog: Fix the default prefix
Timo Sirainen [Tue, 22 May 2018 07:24:33 +0000 (10:24 +0300)] 
log: Fix the default prefix

"listen_fd(123): foo" is better than "listen_fd 14foo"

7 years agoman: doveadm-mailbox.1.in - Fix doveadm-search-query(7) section
Timo Sirainen [Tue, 22 May 2018 07:59:11 +0000 (10:59 +0300)] 
man: doveadm-mailbox.1.in - Fix doveadm-search-query(7) section

7 years agolib-storage: maildir - Remove unnecessary variable
Aki Tuomi [Mon, 21 May 2018 16:38:29 +0000 (19:38 +0300)] 
lib-storage: maildir - Remove unnecessary variable

7 years agolib-storage: maildir - Use index keywords only when saving mail
Aki Tuomi [Mon, 21 May 2018 11:31:58 +0000 (14:31 +0300)] 
lib-storage: maildir - Use index keywords only when saving mail

This fixes mail attachment keywords to work with maildir too.

7 years agolib-storage: maildir - Use array code for keywords when saving mail
Aki Tuomi [Mon, 21 May 2018 11:28:03 +0000 (14:28 +0300)] 
lib-storage: maildir - Use array code for keywords when saving mail

This is safer alternative and makes following change easier.

7 years agodirector: Make sure host's last_updown_change never shrinks.
Timo Sirainen [Sun, 20 May 2018 15:20:47 +0000 (18:20 +0300)] 
director: Make sure host's last_updown_change never shrinks.

Otherwise the ring might get into a loop where two HOST updates keep
fighting each others. This could probably happen if one update comes at
"desynced" state and other one in non-desynced state.

I'm not entirely sure if this is fixing such a loop or not, but it at least
shouldn't hurt.

7 years agoauth: Fix assert-crash if auth client sends 0 as ID
Timo Sirainen [Sun, 20 May 2018 18:32:12 +0000 (21:32 +0300)] 
auth: Fix assert-crash if auth client sends 0 as ID

This could be triggered by anyone having (local) write access to the auth
socket.

7 years agolib-index: Remove #if'ed out code
Timo Sirainen [Sun, 20 May 2018 22:30:36 +0000 (01:30 +0300)] 
lib-index: Remove #if'ed out code

Originally added by 0b2d4626c6fb4e40bc81c56d8227191f3c7e1ea3. Possibly
accidentally.

7 years agolib: Fix ioloop-poll and ioloop-select to work with io_add_istream()
Timo Sirainen [Sun, 20 May 2018 22:42:27 +0000 (01:42 +0300)] 
lib: Fix ioloop-poll and ioloop-select to work with io_add_istream()

7 years agoexample-config: Add log_debug and log_core_filter
Timo Sirainen [Thu, 26 Apr 2018 18:35:15 +0000 (21:35 +0300)] 
example-config: Add log_debug and log_core_filter

7 years agolib-master: Add improved log filter parsing
Timo Sirainen [Mon, 16 Apr 2018 12:00:27 +0000 (15:00 +0300)] 
lib-master: Add improved log filter parsing

It now supports parenthesis to perform ANDs within a query. For example:
"(ruleA1 ruleA2) ruleB (ruleC1 ruleC2 ruleC3)" has 3 ORed rules.

Rules can contain:

 - event:<name>
 - source:<filename>[:<line number>]
 - field:<key>=<value> can be used multiple times
 - cat[egory]:<value> can be used multiple times

For example:

event:http_request_finished (cat:error cat:storage)

This matches either the "http_request_finished" named event, or
alternatively any error event that belongs to "storage" category.

7 years agolib: Event filter - Source line number 0 now means "any"
Timo Sirainen [Thu, 26 Apr 2018 18:29:23 +0000 (21:29 +0300)] 
lib: Event filter - Source line number 0 now means "any"

7 years agolib: Event filter - Support wildcards in event names
Timo Sirainen [Thu, 26 Apr 2018 18:21:40 +0000 (21:21 +0300)] 
lib: Event filter - Support wildcards in event names

This allows for example log_debug=event:*

7 years agolib: event_add_str() - Ignore calls when value is NULL
Timo Sirainen [Sun, 29 Apr 2018 09:17:45 +0000 (12:17 +0300)] 
lib: event_add_str() - Ignore calls when value is NULL

Alternative could be to assert-crash instead. But perhaps this makes it
easier to use and avoids unnecessary assert-crashes?

7 years agodoveadm: Add mailbox cache compress
Timo Sirainen [Sun, 29 Apr 2018 10:45:05 +0000 (13:45 +0300)] 
doveadm: Add mailbox cache compress

7 years agolib-index: Add mail_cache_compress_forced()
Timo Sirainen [Sun, 29 Apr 2018 10:44:59 +0000 (13:44 +0300)] 
lib-index: Add mail_cache_compress_forced()

7 years agolib-iostream-ssl: Use default CA locations with client context
Aki Tuomi [Tue, 15 Mar 2016 07:21:49 +0000 (09:21 +0200)] 
lib-iostream-ssl: Use default CA locations with client context

If no CA settings are provided, fall back to default CA
settings from openssl library.

7 years agolib-index: fsck: Fix small log offsets to file's correct header size
Timo Sirainen [Sun, 20 May 2018 12:56:51 +0000 (15:56 +0300)] 
lib-index: fsck: Fix small log offsets to file's correct header size

Use the file's actual current header size, not
MAIL_TRANSACTION_LOG_HEADER_MIN_SIZE, which is nowadays smaller. This
resulted in unnecessary errors like:

Corrupted transaction log file ...: Invalid min_file_offset: ..., min_file_offset (24) < hdr_size (40)

7 years agolib-index: fsck: Don't change log_file_tail_offset=0
Timo Sirainen [Sun, 20 May 2018 12:55:03 +0000 (15:55 +0300)] 
lib-index: fsck: Don't change log_file_tail_offset=0

7 years agolib: bits - macros to simplify expressions when using -Wstrict-bool
Phil Carmody [Fri, 11 May 2018 06:19:21 +0000 (09:19 +0300)] 
lib: bits - macros to simplify expressions when using -Wstrict-bool

To be strict-bool compliant, your expressions need to be a bit verbose,
these might simplify things.

There are presently over 400 instances matching HAS_NO_BITS(), and nearly
1300 instances matching HAS_ANY_BITS(), so it's a very common pattern.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
7 years agolib: Fix potential crashes when writing to log fails with EAGAIN
Timo Sirainen [Fri, 18 May 2018 09:47:02 +0000 (12:47 +0300)] 
lib: Fix potential crashes when writing to log fails with EAGAIN

The ioloop may nowadays call ioloop context switch callbacks. Since log
writing can happen just about anywhere, the callbacks may be confused
and cause crashes or other weird behavior.

Even if the callbacks aren't called, all the extra code in ioloop can cause
potential problems. Especially any error logging in it wouldn't work properly
since it would just recurse back. So replace the ioloop code with just setting
the log fd to be blocking until the write succeeds.

This commit also removes comments about writes to a blocking terminal fd
causing EAGAINs. This seems unlikely. Probably I was just somehow
confused when originally seeing it and writing the code. If it actually
does happen now, it's still not breaking anything, but it could get into
a busy-loop of write()s constantly returning EAGAIN until they succeed.

7 years agoauth: Fix passwd-file logging on missing passwd-file
Aki Tuomi [Tue, 15 May 2018 11:32:41 +0000 (14:32 +0300)] 
auth: Fix passwd-file logging on missing passwd-file

This reduces log clutter in production systems that use per-domain
password files by logging the missing file information only
when auth_verbose=yes.

Broken in daabad64d90d6008215e234287255a56312e7b72

7 years agolib: Linux, OSX, etc: Avoid race conditions showing \xAB chars in ps title
Timo Sirainen [Fri, 18 May 2018 14:29:09 +0000 (17:29 +0300)] 
lib: Linux, OSX, etc: Avoid race conditions showing \xAB chars in ps title

With bad luck "ps" reads the process title when it hasn't been fully
written. Since the trailing NULs are written last and the previous code kept
the ps title otherwise filled with \xAB chars, this could have caused ps
to sometimes show the process title filled with \xAB chars (visible as '?')

7 years ago*-login: Fix non-global ssl=no configuration
Timo Sirainen [Fri, 18 May 2018 14:04:36 +0000 (17:04 +0300)] 
*-login: Fix non-global ssl=no configuration

For example local 127.0.0.2 { ssl=no } wasn't working.

7 years agolib-http: client: Drop the ioloop switch callback before freeing the global client...
Stephan Bosch [Fri, 18 May 2018 13:56:15 +0000 (15:56 +0200)] 
lib-http: client: Drop the ioloop switch callback before freeing the global client context.

This removes the possibility of recursion when the client context object somehow
triggers an ioloop switch (e.g., when debug logging starts blocking at that
inopportune moment).

7 years agolib-smtp: client: Fix assertion panic occurring when DATA dot stream cannot be finish...
Stephan Bosch [Fri, 18 May 2018 08:24:46 +0000 (10:24 +0200)] 
lib-smtp: client: Fix assertion panic occurring when DATA dot stream cannot be finished immediately.

If o_stream_finish() returns 0, o_stream_send_istream() would be called again
later which causes the panic. Instead, it should only call o_stream_finish() or
o_stream_flush() again to finish the last bit of the output.

Panic was:

Panic: file ostream.c: line 394 (o_stream_send_istream): assertion failed: (!_outstream->finished)

7 years agocassandra: Fix consistency=quorum to work
Timo Sirainen [Thu, 17 May 2018 13:29:28 +0000 (16:29 +0300)] 
cassandra: Fix consistency=quorum to work

Previously it could have been used by setting "consistency=", but this was
an accident.

7 years agolib-master: postlogin: Don't unreference already closed login-connection
Timo Sirainen [Thu, 17 May 2018 15:35:04 +0000 (18:35 +0300)] 
lib-master: postlogin: Don't unreference already closed login-connection

If the login-connection was already closed, this caused too many
unreferences.

Fixes:
Panic: file master-login.c: line 544 (master_login_conn_unref): assertion failed: (conn->clients == NULL)

7 years agosystemd: Indicate where changes should be made
Aki Tuomi [Tue, 24 Apr 2018 08:46:21 +0000 (11:46 +0300)] 
systemd: Indicate where changes should be made

7 years agosystemd: Increase file descriptors by default
Aki Tuomi [Tue, 24 Apr 2018 08:45:36 +0000 (11:45 +0300)] 
systemd: Increase file descriptors by default

7 years agosystemd: Allow writing to home by default
Aki Tuomi [Tue, 24 Apr 2018 08:45:07 +0000 (11:45 +0300)] 
systemd: Allow writing to home by default

7 years agosystemd: Remove NoNewPrivileges and CAP_BOUNDING_SET
Aki Tuomi [Tue, 24 Apr 2018 08:44:33 +0000 (11:44 +0300)] 
systemd: Remove NoNewPrivileges and CAP_BOUNDING_SET

These break sieve by preventing SUID binary as
sendmail_path.

7 years agofs-posix: Strip trailing "/" from filenames
Timo Sirainen [Tue, 15 May 2018 14:50:27 +0000 (17:50 +0300)] 
fs-posix: Strip trailing "/" from filenames

This is mainly because "doveadm fs delete -R" adds it to indicate to the
fs-driver that the whole directory is wanted to be deleted. This change
fixes fs-posix to work with NFS, where otherwise unlink("symlink-to-dir/")
fails with ENOTDIR. Without NFS the same call succeeds.

7 years agodoveadm force-resync: Add -f parameter to fsck index while opening it
Timo Sirainen [Mon, 14 May 2018 18:33:53 +0000 (21:33 +0300)] 
doveadm force-resync: Add -f parameter to fsck index while opening it

This probably should be done by default, but for now keep it optional
just in case there are any bugs in the fsck implementation.

7 years agolib-storage: Add MAILBOX_FLAG_FSCK to fsck index immediately after opening it
Timo Sirainen [Mon, 14 May 2018 18:31:59 +0000 (21:31 +0300)] 
lib-storage: Add MAILBOX_FLAG_FSCK to fsck index immediately after opening it

This can be used to fix a broken index that is causing mailbox_open() to
fail.

7 years agodoveadm: fix who/kick out of order response
Bjørnar Ness [Tue, 17 Apr 2018 14:04:02 +0000 (16:04 +0200)] 
doveadm: fix who/kick out of order response

doveadm-who and kick did not properly flush protocol output
after doveadm_print(), this caused out-of-order response to
clients, example:

C: <tab><tab>who<crlf>
S: +<crlf>
S: username<tab>[...]<missing_crlf>

correct response should have been
S: <username><tab>[...]<crlf>
S: +<crlf>

fixed by adding doveadm_print_flush() calls.

7 years agolib-storage: Return correct root path for PATH_TYPE_ALT_MAILBOX
Josef 'Jeff' Sipek [Fri, 11 May 2018 14:50:16 +0000 (10:50 -0400)] 
lib-storage: Return correct root path for PATH_TYPE_ALT_MAILBOX

mailbox_list_set_get_root_path(..., MAILBOX_LIST_PATH_TYPE_ALT_MAILBOX, ...)
must return one of three values:

1. if there is no alt storage, return NULL
2. if there is alt storage and MAILBOXDIR is set,
return ${alt_dir}/${mailbox_dir_name}
3. if there is alt storage but MAILBOXDIR is not set, return ${alt_dir}

Case number 3 was broken, and it mistakenly returned ${root_dir} - in other
words, it behaved as MAILBOX_LIST_PATH_TYPE_MAILBOX.

This correction changes the behavior, but this shouldn't cause
incompatibilities since:

1. it affects only storages that support alternate storage
2. it affects only configurations that use empty MAILBOXDIR

The only storage that supports alternate storage setting is dbox but dbox
defaults to MAILBOXDIR=mailboxes.  Additionally, it appears to be impossible
to override it to an empty string (setting it to an empty strings causes
dbox to override it with the default - "mailboxes").  Therefore, nobody
should be affected by this change.

7 years agosubmission: Perform variable substitution for the submission_relay_rawlog_dir setting.
Stephan Bosch [Sat, 12 May 2018 11:11:59 +0000 (13:11 +0200)] 
submission: Perform variable substitution for the submission_relay_rawlog_dir setting.

7 years agosubmission: Add support for making server rawlogs using the rawlog_dir setting.
Stephan Bosch [Sat, 12 May 2018 10:20:08 +0000 (12:20 +0200)] 
submission: Add support for making server rawlogs using the rawlog_dir setting.

Similar services like pop3 and imap already support this setting, but for
submission this was omitted.

7 years agosubmission: Substitute variables in settings.
Stephan Bosch [Sat, 12 May 2018 11:33:20 +0000 (13:33 +0200)] 
submission: Substitute variables in settings.

7 years agosubmission: Move assignment of verbose_proctitle.
Stephan Bosch [Mon, 14 May 2018 20:41:29 +0000 (22:41 +0200)] 
submission: Move assignment of verbose_proctitle.

Makes it more consistent with other services like imap.

7 years agolmtp: Fix segfault occurring when a user turns out to be over quota at DATA transfer.
Stephan Bosch [Mon, 14 May 2018 21:56:21 +0000 (23:56 +0200)] 
lmtp: Fix segfault occurring when a user turns out to be over quota at DATA transfer.

The LMTP recipient context was not updated with the final recipient address when
the RCPT command was accepted. This left a dangling struct smtp_address pointer
which triggered the segfault when used.

7 years agofs-posix: Fix fs_iter_next() to return any kinds of files.
Timo Sirainen [Mon, 14 May 2018 12:46:01 +0000 (15:46 +0300)] 
fs-posix: Fix fs_iter_next() to return any kinds of files.

Only regular files and symlinks were returned. It should return everything
else as well (fifos, sockets, devices).

7 years agoconfig: Fix crash in doveconf -n when hiding sensitive information
Aki Tuomi [Wed, 9 May 2018 07:19:02 +0000 (10:19 +0300)] 
config: Fix crash in doveconf -n when hiding sensitive information

Broken by fc02343f

7 years agolib: Add str_append_escaped and use it with str_escape
Aki Tuomi [Wed, 9 May 2018 07:18:39 +0000 (10:18 +0300)] 
lib: Add str_append_escaped and use it with str_escape

7 years agolib-storage: Harden check for imapdir list name
Josef 'Jeff' Sipek [Fri, 11 May 2018 14:53:46 +0000 (10:53 -0400)] 
lib-storage: Harden check for imapdir list name

Comparing char pointers to determine string equality is asking for trouble.
Use strcmp() instead.

7 years agolmtp: proxy: Add support for making proxy client rawlogs using the lmtp_proxy_rawlog_...
Stephan Bosch [Sat, 12 May 2018 10:27:37 +0000 (12:27 +0200)] 
lmtp: proxy: Add support for making proxy client rawlogs using the lmtp_proxy_rawlog_dir setting.

7 years agolmtp: Add support for making server rawlogs using the lmtp_rawlog_dir setting.
Stephan Bosch [Sat, 12 May 2018 10:18:27 +0000 (12:18 +0200)] 
lmtp: Add support for making server rawlogs using the lmtp_rawlog_dir setting.

7 years agolmtp: Properly apply the login_greeting setting.
Stephan Bosch [Sat, 12 May 2018 10:15:07 +0000 (12:15 +0200)] 
lmtp: Properly apply the login_greeting setting.

It got ignored during migration of lmtp service to lib-smtp.

7 years agosubmission: Truly enforce a configurable message size limit (default 40 MB).
Stephan Bosch [Fri, 6 Apr 2018 23:09:12 +0000 (01:09 +0200)] 
submission: Truly enforce a configurable message size limit (default 40 MB).

Before, it was only checking a provided SIZE parameter to the MAIL command and
not the size of the actually submitted message.

7 years agolmtp: Explicitly disable message size limit enforcement.
Stephan Bosch [Fri, 6 Apr 2018 23:08:34 +0000 (01:08 +0200)] 
lmtp: Explicitly disable message size limit enforcement.

7 years agosubmission: Actively enforce message size limit while copying message data.
Stephan Bosch [Fri, 6 Apr 2018 23:08:11 +0000 (01:08 +0200)] 
submission: Actively enforce message size limit while copying message data.

7 years agolmtp: Actively enforce message size limit while copying message data.
Stephan Bosch [Fri, 6 Apr 2018 23:06:13 +0000 (01:06 +0200)] 
lmtp: Actively enforce message size limit while copying message data.

This is actually currently not relevant to LMTP, but for future implementation
this code is added here already.

7 years agolib-smtp: server: Implement enforcement of maximum message size.
Stephan Bosch [Fri, 6 Apr 2018 23:05:15 +0000 (01:05 +0200)] 
lib-smtp: server: Implement enforcement of maximum message size.

7 years agolib-smtp: command parser: Provide more details in command data size limit error.
Stephan Bosch [Fri, 6 Apr 2018 23:03:58 +0000 (01:03 +0200)] 
lib-smtp: command parser: Provide more details in command data size limit error.

7 years agoconfigure: Create a definition for UOFF_T_MAX.
Stephan Bosch [Fri, 6 Apr 2018 23:00:46 +0000 (01:00 +0200)] 
configure: Create a definition for UOFF_T_MAX.

7 years agolib-smtp: server: Fix error message logged for errors occurring in data wrapper strea...
Stephan Bosch [Wed, 4 Apr 2018 22:34:49 +0000 (00:34 +0200)] 
lib-smtp: server: Fix error message logged for errors occurring in data wrapper stream during DATA transfer.

Used the connection stream rather than the data stream to obtain the error.
Obviously, there is no error on the low-level connection when there is a data
istream (e.g. message size) error.

7 years agolib-smtp: server: DATA command: Restore input handling upon failure.
Stephan Bosch [Fri, 11 May 2018 17:26:45 +0000 (19:26 +0200)] 
lib-smtp: server: DATA command: Restore input handling upon failure.

Fixes command hanging upon failure during data transfer.

7 years agoauth: Use PRIuUOFF_t to print process VSZ limit
Josef 'Jeff' Sipek [Fri, 11 May 2018 14:41:01 +0000 (10:41 -0400)] 
auth: Use PRIuUOFF_t to print process VSZ limit

This doesn't change the behavior, but it makes it more obviously correct.

7 years agoauth: Avoid comparison of ints of different signs on FreeBSD
Josef 'Jeff' Sipek [Fri, 11 May 2018 14:38:32 +0000 (10:38 -0400)] 
auth: Avoid comparison of ints of different signs on FreeBSD

For legacy reasons, rlim_t on FreeBSD is defined as int64_t.

7 years agoauth: test - make sure memory gets free'd
Aki Tuomi [Tue, 17 Apr 2018 09:11:05 +0000 (12:11 +0300)] 
auth: test - make sure memory gets free'd

7 years agoauth: Add test for lua password verify
Aki Tuomi [Tue, 17 Apr 2018 07:55:53 +0000 (10:55 +0300)] 
auth: Add test for lua password verify

7 years agoauth: db-lua - Add password_verify to auth request
Aki Tuomi [Thu, 12 Apr 2018 10:39:58 +0000 (13:39 +0300)] 
auth: db-lua - Add password_verify to auth request

Allows verifying passwords with dovecot when necessary

7 years agoauth: db-lua - Expose some auth request members
Aki Tuomi [Wed, 11 Apr 2018 09:39:51 +0000 (12:39 +0300)] 
auth: db-lua - Expose some auth request members

These are particularly useful for finding out if user
has already been authenticated.

7 years agoauth: db-lua - Remove extra space from log_error
Aki Tuomi [Wed, 11 Apr 2018 09:29:41 +0000 (12:29 +0300)] 
auth: db-lua - Remove extra space from log_error

This makes it possible to use the log_error method.

Broken in 9698cd24

7 years agoauth: Improve auth-master connections' error logging
Timo Sirainen [Fri, 4 May 2018 12:27:14 +0000 (15:27 +0300)] 
auth: Improve auth-master connections' error logging

Include connect and handshake times in the error message.

7 years agolib-master: Add auth connect & handshake times to master_login_auth_request errors
Timo Sirainen [Fri, 4 May 2018 11:14:35 +0000 (14:14 +0300)] 
lib-master: Add auth connect & handshake times to master_login_auth_request errors

7 years agolib-master: Add request time also for internal failure error messages
Timo Sirainen [Fri, 4 May 2018 11:10:49 +0000 (14:10 +0300)] 
lib-master: Add request time also for internal failure error messages

7 years agolib-master: Use more exact timestamp in master_login_auth_request failures
Timo Sirainen [Fri, 4 May 2018 11:03:46 +0000 (14:03 +0300)] 
lib-master: Use more exact timestamp in master_login_auth_request failures

7 years agolib-master: Improve error logging for master_auth_connection failures
Timo Sirainen [Fri, 4 May 2018 10:56:45 +0000 (13:56 +0300)] 
lib-master: Improve error logging for master_auth_connection failures

7 years agolib-master: Improve error logging for post-login script failures
Timo Sirainen [Fri, 4 May 2018 10:42:23 +0000 (13:42 +0300)] 
lib-master: Improve error logging for post-login script failures

7 years agolib-master: Improve error logging when master_login_connection gets disconnected
Timo Sirainen [Fri, 4 May 2018 10:23:07 +0000 (13:23 +0300)] 
lib-master: Improve error logging when master_login_connection gets disconnected

7 years agolib-master: Keep linked list of master_login_clients per connection
Timo Sirainen [Fri, 4 May 2018 10:07:50 +0000 (13:07 +0300)] 
lib-master: Keep linked list of master_login_clients per connection

This allows improving logging on connection errors.

7 years agofts: When indexing virtual mailbox, index each real mailbox entirely
Timo Sirainen [Thu, 3 May 2018 15:33:25 +0000 (18:33 +0300)] 
fts: When indexing virtual mailbox, index each real mailbox entirely

Index all the unindexed messages in them at once, instead of jumping between
real mailboxes and indexing them in small pieces.

7 years agofts: Indexing virtual mailbox didn't always index the last mails
Timo Sirainen [Thu, 3 May 2018 15:33:00 +0000 (18:33 +0300)] 
fts: Indexing virtual mailbox didn't always index the last mails

7 years agofts: Make sure indexing virtual mailbox doesn't recurse and index mail multiple times
Timo Sirainen [Thu, 3 May 2018 15:30:51 +0000 (18:30 +0300)] 
fts: Make sure indexing virtual mailbox doesn't recurse and index mail multiple times

7 years agocassandra: Use fallback_consistency on more types of errors
Timo Sirainen [Thu, 3 May 2018 14:06:04 +0000 (17:06 +0300)] 
cassandra: Use fallback_consistency on more types of errors

This could allow for example read_consistency=local-quorum with
read_fallback_consistency=quorum, so most of the time the reads are
from local datacenter, but in case it has problems you can switch to
other datacenters.