sender_acl can be set through edit/mailbox but was never returned by
get/mailbox, so an API client could not read back what it had written,
and get/mailbox/all / get/mailbox/{mailbox} both omitted it.
Add the mailbox's internal send-as ACL (the sender_acl table rows with
external = 0) to mailbox_details as sender_acl, an array of send_as
values, mirroring the field edit/mailbox accepts. It is added in the same
block as the other detailed fields, so the lightweight get/mailbox/reduced
endpoint is unaffected.
Fixes#7011
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Three defects in add/time_limited_alias:
The description was read as $_data['description'] without a guard. When a
client omits it, null is bound to spamalias.description, which is TEXT NOT
NULL, so the insert raises a PDOException. The global exception handler is
terminal, so process_add_return() never echoes anything and the caller sees
HTTP 200 with an empty body while no alias was created. Default it to an
empty string instead.
The validity guard used a single condition whose else branch also caught the
success case, so every valid validity was overwritten with the 8760 hour
default and the parameter did nothing. Only invalid values were rejected.
Nest the range check so a valid value survives.
The OpenAPI spec documented only username and domain, while the code also
reads description, validity and permanent. Spec driven clients therefore
could not construct a working request. Document all three.
spamalias.description is the only NOT NULL description column in the schema,
which is why the same unguarded read in add/domain and add/resource does not
fail, both of those columns are nullable.
This does not change the generic exception handling. A database error is
still swallowed into an empty HTTP 200, and the message the handler builds
carries the raw PDOException, so surfacing it to API clients would need
sanitising first. That is left for a separate change.
Refs #7287
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Initial plan
* Add MTA-STS support for alias domains
Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
* Improve domain normalization and code style in mta-sts.php
Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
* Add error handling for idn_to_ascii in mta-sts.php
Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
* Add database error handling for alias domain query
Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
* Add ACME certificate support for MTA-STS on alias domains
Query alias_domain table to find aliases with MTA-STS enabled target domains and request certificates for mta-sts.<alias-domain> subdomains.
Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
* compose: bump image tag to 1.95
* Add MTA-STS DNS records display for alias domains in UI
When viewing an alias domain's DNS diagnostics, check if the target domain has MTA-STS enabled and display the required DNS records for the alias domain.
Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
Co-authored-by: DerLinkman <niklas.meyer@servercow.de>
* Allow making spam aliases permanent
* added german translation
* updated Spamalias Twig + Rename in Spam Alias
* compose: update image tags to align to vendor version
---------
Co-authored-by: DerLinkman <niklas.meyer@servercow.de>