-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I tried sending email with a small attachment and it failed:
{"time":"2025-10-12T12:01:04.419338607Z","level":"ERROR","msg":"failed to send email","error":"fork/exec /usr/local/bin/deno: argument list too long"}
Turns out we send email body inside json passed on cmdline:
execve("/usr/local/bin/deno", ["/usr/local/bin/deno", "run", "--allow-net", "--allow-import", "--allow-env", "--allow-sys", "--no-prompt", "--quiet", "--allow-read=/smallweb/email-body,/usr/local/bin/deno,/home/smallweb/.cache/deno/npm/registry.npmjs.org", "--allow-write=/smallweb/email-body/data", "/home/smallweb/.cache/smallweb/sandbox/0.28.3/mod.ts", "{\"command\":\"email\",\"entrypoint\":\"file:///smallweb/email-body/main.ts\",\"msg\":\".....lots of bytes here
i think we could change mod.ts to take it via stdin or tmpfile, what do you think? I think tmpfile makes most sense since reading email into ram by golang isn't good for OOM either, eg if attachment is a video.
Metadata
Metadata
Assignees
Labels
No labels