Repository navigation
Conversation
One limit on mail.Outgoing, checked in Deliver, so size is a fact about a message rather than about how it arrived. 10MB, matching what the SMTP paths already accept; refused with the size and the limit. Fixes micro#1465
|
The cap is in the right place, but it never fires — the test is one byte short of testing anything. big := strings.Repeat("x", maxOutgoingBytes) // exactly 10485760
...
if n := len(m.Body) + len(m.HTML); n > maxOutgoingBytes { // 10485760 > 10485760 == falseRun on this branch: That error is the whole diagnosis. The first assertion ( Worth noting because it nearly went the other way: had the test asserted only Two changes and this is good:
What checks out, for the record: Two small things about the description rather than the code:
Generated by Claude Code |
Five doors send mail from an account here and none of them bounded the body. The compose form has its own 40KB limit, so the uncapped ones are the tool, the JSON and form handlers behind /mail, and a mail client over submission. The check goes in Deliver, where all five meet, so how big a message may be is a fact about the message rather than about which door it came through — the same argument that put routing there. The reason is the store rather than the wire: a body is re-marshalled and re-written on every later delivery to anybody, so one oversized message makes every account holding it slower forever. Ten megabytes is the number the SMTP and submission servers already accept, which keeps one figure in an operator's head — the comment no longer claims it is the same measurement, because it is not: those cap the encoded message with headers and base64, this caps the text before any of that. The test built a message of exactly maxOutgoingBytes and asserted it was refused, but the check is `>`, so it was a message at the limit being allowed — and the failure it actually caught was the local-delivery path saying it could not find the recipient. One byte over now, and the reason is written down. Co-authored-by: Dev9269 <157703342+Dev9269@users.noreply.github.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P2r4ca9UPPf7FDk7y8eJLr
|
Merged as 1373c79 — thank you. Putting the check in Two changes on the way in. The test was passing a message exactly at the limit. The comment claimed parity with the SMTP limit, and it is a different measurement. Your store-side rationale is the stronger one anyway and is what the comment leads with: a body is re-marshalled and re-written on every later delivery, so one oversized message makes every account holding it slower forever. Carried in by hand rather than through the merge button, since the fix had to go on top and I cannot push to your fork — your commit is credited as co-author. Generated by Claude Code |
|
You're right on both counts, and the first one is the important one. The test was one byte short — Fixed in 50c0792:
Also tightened the comment on Thanks for reading it closely enough to catch the dead test. |
|
@Dev9269 — thank you for your contribution to Mu. We're requesting your explicit permission to relicense your outgoing-mail size-limit contribution in #1467, incorporated in commit 1373c79, including the portions retained or modified in later Mu versions. The proposal is in #2180: future Mu runtime releases would be source-available, free for personal/internal use, with a paid licence required for commercial resale or hosting. Micro would also offer separate proprietary commercial licences. MUCP and the SDKs remain permissively licensed. Existing AGPL grants would remain valid. If you agree, please reply with the following confirmation (identifying the rights-holding entity if you are acting for one):
This request concerns only the identified contribution, not future contributions. Attribution will be preserved. If any portion belongs to an employer, co-author or another party and you cannot grant permission for it, please identify that limitation instead. If you would prefer a separate agreement or do not agree, please say so; silence will not be treated as consent. For reference, the current draft is Mu Runtime Licence draft 1.0. |
|
I hold the relevant rights, or am authorised by the rights holder, in my contribution identified above. I grant Micro XYZ Ltd a worldwide, perpetual, irrevocable, non-exclusive, royalty-free copyright licence to use, reproduce, modify, distribute and sublicense that contribution and derivative works as part of Mu under the proposed Mu Runtime Licence and under separate proprietary commercial licences, including granting customers rights to modify, redistribute and provide hosted services. This is an additional permission; it does not revoke existing AGPL grants or transfer my copyright. |
|
@Dev9269 Thank you — I've recorded your explicit permission and confirmation of authority for the identified contribution in #1467. The record links directly to your reply in the licensing transition document in #2180. Your copyright and attribution remain yours, and existing AGPL grants remain intact. This permission is limited to the identified contribution and its derivatives; it is not being treated as permission for unrelated or future contributions, or as a separate patent grant. It also doesn't create any support obligation for you. Thanks for helping us clarify this. |
One limit on mail.Outgoing, checked in Deliver, so size is a fact about a message rather than about how it arrived. 10MB, matching what the SMTP paths already accept (smtp.go, submission.go) and the 1MB the JSON API caps at today.
Refused with the size and the limit, per the issue. A test says an oversized send is refused and the refusal names the number.
Fixes #1465