Timo Sirainen [Tue, 5 Jun 2018 11:22:08 +0000 (14:22 +0300)]
lib-compression: deflate ostream - Use Z_FINISH on final flush
Nowadays we have o_stream_finish(), so we can differentiate between
intermediate flush and final flush. Using this allows istream-zlib to
cleanly see that the stream ends.
Timo Sirainen [Tue, 5 Jun 2018 10:25:30 +0000 (13:25 +0300)]
lib: Add i_stream_nonseekable_try_seek()
This can be used by istreams to more easily implement seeking backwards when
it has to be done by first seeking back to offset 0 and reading from there.
Timo Sirainen [Thu, 31 May 2018 13:52:54 +0000 (16:52 +0300)]
imapc: Don't use RFC822.SIZE values for message body size calculation
If the RFC822.SIZE doesn't match the exact stream size, the body size
calculation will become wrong. The only downside to this patch is that
now the body size will need to be calculated by parsing the stream, but
there shouldn't be any need to do that unless the body was already
FETCHed, so it shouldn't cause any extra IMAP traffic.
Timo Sirainen [Thu, 31 May 2018 13:49:34 +0000 (16:49 +0300)]
lib-storage: Don't set virtual_size from index record if it's already set
The existing virtual_size may be a correct one, while the one in the index
may be wrong. This will be an especially important fix with the next
commit, because it would make the existing inexact_total_sizes=FALSE wrong.
Timo Sirainen [Mon, 4 Jun 2018 16:37:15 +0000 (19:37 +0300)]
lib-storage: Don't enforce creation of vsize header.
It's useful for caching quota=count and for STATUS (X-SIZE). If neither is
used the header shouldn't be created and kept up-to-date. If the header is
enabled, it also triggers creation of per-email vsize records.
Hannu Ylitalo [Tue, 29 May 2018 07:29:50 +0000 (10:29 +0300)]
dovecot.service: Update LimitNOFILE=65535
Current value of 8192 is too low for most production setups and it needs
to be changed every time something is deployed. Setting the default to
65535 is enough for most production environments so this would be one
task less when deploying a production platform.
Sergey Kitov [Mon, 19 Mar 2018 14:10:49 +0000 (16:10 +0200)]
global: Replace "if(auth_debug){i_debug(...)}" with e_debug(event, ...)
event is one of: global auth::auth_event,
auth_client_connection->event, auth_request->event,
login-common::event_auth. These event have category "auth".
Sergey Kitov [Mon, 19 Mar 2018 12:50:31 +0000 (14:50 +0200)]
global: Remove unnecessary checks for mail_debug and auth_request->debug
These checks are performed before calling auth_request_log_debug() and
push_notification_driver_debug(), while the same checks are performed
inside of these functions, and they return without doing anything.
Stephan Bosch [Sat, 26 May 2018 12:49:01 +0000 (14:49 +0200)]
lib-smtp: client: Avoid sending an XCLIENT command longer than 512 bytes.
Send several separate XCLIENT commands instead. This way, it complies with the
base SMTP line length limit and with Postfix' original specification for the
XCLIENT command.
With the XCLIENT fields that Dovecot currently uses, this is very unlikely to
happen. Still, this needs to be fixed to make things reliable.
Stephan Bosch [Sat, 26 May 2018 13:44:43 +0000 (15:44 +0200)]
lib-smtp: server: Provide full proxy data to the conn_proxy_data_updated() callback.
Before, it would only provide the fields that were updated, meaning that some
fields would remain unset, which caused problems for LMTP when more than one
XCLIENT command was sent or the ADDR field was not specified.
Stephan Bosch [Sat, 26 May 2018 11:12:26 +0000 (13:12 +0200)]
lda: Allow -f sender to omit domain.
Several people complained about the original enforcement of the presence of a
domain (added for v2.3.0) to be too restrictive. Apparently, this legitimately
happens with bounce messages on certain platforms.
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.
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.
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.