Raise the body limit of the raw sends to fit an SMTP-sized message #88

Merged
calvin merged 1 commit from raw-body-limit into master 2026-11-13 01:50:03 +00:00
Owner

The raw-send paths (/api/v2/messages/raw, /kantoor/v1/messages/raw) carry a message as base64 in JSON and were capped by Plug at 8,000,000 bytes, about 6 MB of message. They now take a body that fits a message of the SMTP maximum (25 MiB); every other JSON path keeps the 8 MB cap. The decoded message is checked against the message limit (message_too_large, 422), and /kantoor/... bodies are no longer read by the browser parser before the key check.

🤖 Generated with Claude Code

The raw-send paths (`/api/v2/messages/raw`, `/kantoor/v1/messages/raw`) carry a message as base64 in JSON and were capped by Plug at 8,000,000 bytes, about 6 MB of message. They now take a body that fits a message of the SMTP maximum (25 MiB); every other JSON path keeps the 8 MB cap. The decoded message is checked against the message limit (`message_too_large`, 422), and `/kantoor/...` bodies are no longer read by the browser parser before the key check. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Raise the body limit of the raw sends to fit an SMTP-sized message
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2c41ed0dfe
POST /api/v2/messages/raw and POST /kantoor/v1/messages/raw carry the whole
message as base64 in JSON, but Plug's 8,000,000 byte default capped the body
at about 6 MB of message, while SMTP takes 25 MiB. A path-matched parser
(KartaWeb.RawJSONParser) now takes 37,049,688 bytes on those two paths only.

Karta.Sending refuses a raw message over the SMTP limit once decoded
(message_too_large, 422; also for the Postal and Mailgun sends).

The Kantoor paths were also read by the browser parser, before the key was
checked and with the default limit; they are now left unread like the other
API paths.
calvin merged commit 6e9805f171 into master 2026-11-13 01:50:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
external/karta!88
No description provided.