The release pipeline also builds linux/386, where uint and int are 32 bits
wide: comparing the days of the related emails filter with math.MaxInt64
and the 20 GB disk quota of the Stalwart test users didn't compile there.
Also cap the days so that the time.Duration can't overflow.
- jmaptest and opencloud_full: use Stalwart 0.16.27 and stalwart-cli 1.0.13
- use the BCP 47 locale "en-US" in the Stalwart configuration snapshots,
Stalwart rejects "en_US" since 0.16.20
- TestGroupwareVacation: Stalwart 0.16.27 keeps isEnabled when other
vacation properties change, expect true now
- TestWs: Stalwart may return a different but equivalent newState when
nothing changed, and announces new mail with EmailDelivery (since 0.16.16)
Identity/get and EmailSubmission were sent without
urn:ietf:params:jmap:submission, and all address book calls were sent with
the mail instead of the contacts capability. Stalwart rejects such calls
with unknownMethod since 0.16.x, which breaks the account bootstrap
(GET /groupware/accounts) and the address books.
Also use the calendar type for creating, updating and deleting calendars
(same capability, no change in behaviour).
The groupware branch had downgraded the go directive to 1.25 because the
build images were only available for 1.25 at the time. main requires
Go 1.26 by now (e.g. github.com/go-acme/lego/v5), so use 1.26.0 again,
like main does.
Assisted-by: Claude Code:claude-opus-5-5
* fix jmap.SetVacationResponse: was using JMAP create instead of update
with a patch; did so by using the modify template function as with
most other JMAP APIs
* better HTTP status code handling for the responses received from
Stalwart
* add support for not caching JMAP session retrieval failures in the
Groupware backend, by setting the error TTL to 0
* introduce a new toplevel package pkg/http for plain HTTP related
functions
* move these functions from pkg/jmap to pkg/http, including tests:
- PeekResponse
- DumpHttpRequest
- DumpHttpResponse
* also look into the OC_INSECURE environment variable to allow
accepting insecure TLS certificates
* rename GROUPWARE_ALLOW_INSECURE_TLS to GROUPWARE_TLS_INSECURE to
align with the nomenclature used by other backend services
* split off the Stalwart integration test boilerplate into a new
jmaptest package, in order to be able to use it from the groupware
package as well
* remove the JMAP Session patching in tests and, instead, pick random
free local ports for HTTP and IMAPS manually, and set those
explicitly in the Stalwart testcontainer, so that we can set the
PUBLIC_URL environment variable that Stalwart then uses to define the
URLs that are served as part of the JMAP Sessions (API URL, etc...)
* introduce configuration settings for TLS insecurity, tracing requests
and responses
* use more secure implementation when replacing JMAP placeholders in
URL templates, path escaping them to avoid injection
* add more efficient tracing of HTTP requests and responses between the
Groupware backend and the JMAP server, with the possibility of
specifying a maximum body size to trace, to avoid blowing up the logs
* use more efficient string building for HTTP Authorization headers
* change internal API to use streams (io.Reader) instead of reading
JSON responses fully into memory before parsing them
* implement supplier templating to allow addressbooks and contacts to
come from various sources ("suppliers", thus) as opposed to solely
from JMAP
* add creating, deleting, updating, getting changes
* add some search filter parameters, currently incomplete
* by adding a predicate that can analyze a filter and inform the
template methods whether the filter is applicable for that supplier
or not
* this fixed /groupware/accounts/.../addressbooks/.../contacts
* retrofit from using self-referencing generics parameters that were
introduced with Go 1.26, will re-enable when we upgrade to 1.26
* re-introduce a 'ptr' func since we don't have the new 'new' func yet
that comes with 1.26
* fix the inline dockerfile for building the stalwart:cli container,
cannot be based on scratch since we need a shell and wget, and it
should thus retain the alpine container as its base
* remove stdin_open and tty from the container attributes, not needed
* add instructions and container to create a key and certificate pair
for the built-in IDM LDAP as we need it to listen on LDAPS for
Stalwart, which has been disabled by default with
https://github.com/opencloud-eu/opencloud/pull/2880
* add environment variables to point to the certificates
* update services/groupware/DEVELOPERS.md with up-to-date instructions,
using Stalwart 0.16