Timo Sirainen [Mon, 23 Sep 2013 01:25:16 +0000 (04:25 +0300)]
master: Added reuse_port setting to inet_listeners, which enables SO_REUSEPORT if available.
After forking a new service process, a new listener socket is created for
each such inet_listener. Linux v3.9+ added SO_REUSEPORT feature, which
should distribute clients more uniformly to the processes. I'm not sure if
this makes any difference in BSDs.
At least in Linux v3.9 there was still a bug that if the number of listening
processes changed, some TCP handshakes might not finish. I don't see if this
has already been fixed, so this is probably safe to use only for services
whose process count doesn't change (e.g. process_min_avail is set high
enough).
Timo Sirainen [Sun, 22 Sep 2013 04:40:01 +0000 (07:40 +0300)]
maildir: Autocreate missing cur/ new/ tmp/ directories only with Maildir++ and imapdir.
\Noselect mailboxes aren't possible with those layouts, but with other
layouts they are and they shouldn't get automatically created just by
selecting them.
Timo Sirainen [Sun, 22 Sep 2013 03:30:47 +0000 (06:30 +0300)]
mbox: Fixed assert-crash due to wrong transaction_count handling.
This happened only when messages had been expunged by another session just
before saving a new message.
Timo Sirainen [Sun, 22 Sep 2013 01:14:23 +0000 (04:14 +0300)]
Fixes and improvements to istream-attachment-extractor error handling.
If an attachment saving failed, the mail was still saved to disk, just
without the attachments.
Timo Sirainen [Sat, 21 Sep 2013 22:40:11 +0000 (01:40 +0300)]
*-login: Added %{orig_user}, %{orig_username} and %{orig_domain} variables.
The original username is what the client sent to server before any
translations.
Timo Sirainen [Sat, 21 Sep 2013 02:05:22 +0000 (05:05 +0300)]
lib-storage: Don't create a settings cache for initial global settings read.
This fixes at least doveadm -A so that it doesn't connect to config process
for each user.
Timo Sirainen [Sat, 21 Sep 2013 00:49:22 +0000 (03:49 +0300)]
doveadm sync: When -1 parameter is used, ignore missing mailboxes in source.
Previously the syncs finished with "Mailbox changes caused a desync." and
exit code 2. This was especially common when the destination server had
new autocreated mailboxes and user logged in after the first dsync.
Timo Sirainen [Fri, 20 Sep 2013 23:55:27 +0000 (02:55 +0300)]
imapc: Don't log unnecessary errors at deinit about aborted hiearchy separator lookup.
The lookup is done asynchronously at startup. It doesn't matter if we never
get around to finishing it.
Timo Sirainen [Fri, 20 Sep 2013 00:54:31 +0000 (03:54 +0300)]
dbox: Fixed "UIDVALIDITY=0" error race condition.
If session 1 had mkdir()ed but not yet created the initial index, while
session 2 attempted to open the mailbox, it would create an empty index and
log the error.
Timo Sirainen [Thu, 19 Sep 2013 21:14:11 +0000 (00:14 +0300)]
istream-file: Assert-crash if read() fails with EBADF.
Something's already wrong at that point and it may not be safe to continue.
Also crashing makes it easier to debug such situation.
Stephan Bosch [Wed, 18 Sep 2013 20:24:11 +0000 (23:24 +0300)]
lib-http: http-url: Fixed return of proper error message in case of a failure to parse request target Host header.
Assigned the error to the parser object rather than returning it directly.
Stephan Bosch [Mon, 16 Sep 2013 23:40:17 +0000 (02:40 +0300)]
lib-http: http-client: Allow overriding all implicitly generated special headers.
Which are: Connection, Content-Length, Date, Expect, Host, and Transfer-Encoding.
Stephan Bosch [Sun, 15 Sep 2013 22:02:03 +0000 (01:02 +0300)]
lib-http: http-client: Fixed segfault caused by earlier improvement of connection output locking.
Segfault was triggered when an aborted request received a response.
Stephan Bosch [Sun, 15 Sep 2013 00:56:25 +0000 (03:56 +0300)]
lib-http: Added support for handling HTTP/1.0 messages explicitly.
This means that default connection persistence semantics are inverted for
HTTP/1.0 and keep-alive Connection option is recognized.
Stephan Bosch [Sun, 15 Sep 2013 00:55:11 +0000 (03:55 +0300)]
lib-http: http-request-parser: Added function to test whether payload from previous request is still being parsed.
This is needed in the server implementation to check whether a request is
completely read.
Stephan Bosch [Sun, 15 Sep 2013 00:44:42 +0000 (03:44 +0300)]
lib-http: Unified http-request.h and http-response.h headers.
Renamed struct http_response_header to struct http_header_field,
encapsulated the array in struct http_header and put it all in
http-header.h/c Added inline utility functions for header querying and
getting response/request payload size.
Stephan Bosch [Sun, 15 Sep 2013 00:39:45 +0000 (03:39 +0300)]
lib-http: Improved message header and body parsing for better RFC compliance.
Added pre-parsed transfer-encoding and connection header content (array) to
parsed message struct. Fixed message body handling for when both
transfer-encoding and content-length headers are missing. Now duplicates of
unique important message headers yield an error.
Stephan Bosch [Sun, 15 Sep 2013 00:35:04 +0000 (03:35 +0300)]
lib-http: Added support for asynchronous payload for requests.
This means that the payload stream passed to the request can be a
non-blocking socket stream from some other connection (e.g. proxy client
connection).
Stephan Bosch [Sun, 15 Sep 2013 00:33:44 +0000 (03:33 +0300)]
lib-http: http-client: Requests now automatically generate a Date header.
The used date value is normally the submission time of the request, but it
can be set explicitly.
Stephan Bosch [Sun, 15 Sep 2013 00:29:03 +0000 (03:29 +0300)]
lib-http: http-client: Fixed leak of ostream when request was resubmitted upon 417 response regarding 100-continue.
This would only occur when the server refuses Expect: 100-continue with a
417 response. The payload_output stream would be overwritten without being
freed first.