Timo Sirainen [Fri, 10 Apr 2020 16:08:24 +0000 (19:08 +0300)]
lib: Fix str_begins() unit test
c05976729405180c565aad464cb494c731a640b3 replaced all strncmp() calls to
str_begins(). This caused str_begins() to be tested against str_begins()
itself, which obviously always works. Reverted the change.
Timo Sirainen [Thu, 14 Oct 2021 22:11:06 +0000 (00:11 +0200)]
imap-login: proxy: Fix STARTTLS failure message
The error message blindly skipped over 3 bytes after the tagged "S " reply.
This was okay if the reply was "NO", but wrong if the reply was "BAD". Also
nothing really guarantees that a broken server couldn't have just returned
a truncated "S " string, in which case the error would point to garbage.
Timo Sirainen [Thu, 14 Oct 2021 22:21:30 +0000 (00:21 +0200)]
lib: Fix memory pool names with DEBUG_SILENT=1
When compiling with --enable-devel-checks and running with DEBUG_SILENT=1,
the memory pool names were skipping over the first 8 bytes in the name.
This was supposed to be done only if the name begins with MEMPOOL_GROWING.
Timo Sirainen [Wed, 2 Mar 2022 14:39:30 +0000 (09:39 -0500)]
dsync: Fix hierarchical mailbox name parts individually
For example with filesystem-based mailbox formats it's not allowed to create
"box/../child" mailbox. With previous code dsync just gave up and created
the mailbox name based on its GUID. This is now improved to instead try to
insert '_' character after each hierarchy separator so the newly fixed
mailbox name is "box/_../child".
This commit removes the read support that was left behind to allow for more
gradual migration from lzma/xz.
The code had bugs. Additionally, there is no benefit in keeping it around.
bzip2 or zstd (at maximum compression level) are likely better choices for
archival. For non-archival usecases, a light compression algorithm like
zstd (at low to medium compression level) or lz4 are better choices.
Siavash Tavakoli [Mon, 25 Oct 2021 11:23:56 +0000 (12:23 +0100)]
lib-lua: Add a minimal interface to lib-http
Adds the ability to
- Creating http clients
- Creating http requests
- Adding arbitrary headers and payload to the http request
- Submitting the request to remote server and getting the response
Markus Valentin [Thu, 3 Mar 2022 13:21:00 +0000 (14:21 +0100)]
imapc: imapc_connection_disconnect_full() - Only conditionally abort
Only abort commands if there are no reconnect commands. Otherwise these
still will be handled and the commands memory will be freed after handling
them.
If the imapc connection was already disconnected when calling
imapc_connection_disconnect() it didn't clean up the commands and
especially the command pools.
build-aux: run-test.sh.in - Capture exit codes before set -e ends the script
With set -e, the script ends on any nonzero exit code and that would
leave the valgrind output unchecked. Fix the exit code capture so
valgrind output is correctly shown.
Stephan Bosch [Tue, 1 Feb 2022 00:33:53 +0000 (01:33 +0100)]
lmtp: lmtp-proxy - Use port 24 as default for proxy.
LMTP has no officially registered default service port, but 24 is the de-facto
standard. When client connects through TCP, the local client port number is used
to setup the proxy connection as well. However, when the client connects through a
unix socket, there is no port number to use and a default is needed.
This manual page uses the \' groff sequence. Usually, the intent to
generate an apostrophe, but that sequence actually renders as a an acute
accent.
For an apostrophe or a single closing quote, use plain '. For single
opening quote, i.e. a straight downward line ' like the one used in
shell commands, use \(aq.
Timo Sirainen [Mon, 21 Feb 2022 22:07:11 +0000 (23:07 +0100)]
dsync: If modseqs aren't permanent, assume HIGHESTMODSEQ=0
Otherwise the HIGHESTMODSEQ is just whatever happens to be in the in-memory
view of the index, which most likely isn't the true HIGHESTMODSEQ. Using 0
makes it clear that the HIGHESTMODSEQ isn't valid and can't be used.
Timo Sirainen [Wed, 24 Feb 2021 16:57:24 +0000 (18:57 +0200)]
lib-storage: Fix renaming mailbox hierarchies with FULLDIRNAME
If INDEX/INDEXPVT/INDEXCACHE/CONTROL were specified separately, they
weren't being renamed correctly. This mainly meant that if there was
a "foo/bar" folder, renaming "foo" to "foo2" wouldn't work correctly.
Karl Fleischmann [Tue, 15 Feb 2022 15:22:06 +0000 (16:22 +0100)]
lib: Remove deprecated src_pos_r parameter from base64_decode()
The src_pos_r parameter in base64_decode() has been deprecated in commit afa3db0a6f15e1b1038cb47f0632baa8f23d0f67 and is now removed - both from
the function as well as all it's calls.