|
|
1 hónapja | |
|---|---|---|
| .. | ||
| README.md | 1 hónapja | |
| mailprobe.js | 1 hónapja | |
mailtest projectA live ctx.mail exercise running on the production server, against a real mail
provider. It exists because every other test in this repo runs against a fake
server on the dev host, and a fake cannot show what a provider actually does.
mailprobe.js is the function as deployed. Keep it in the repo so the next
person can see what was tested rather than rediscovering it.
mailtest on prodMAIL_IMAP_PASSWORD and MAIL_SMTP_PASSWORD, set over
PUT /api/v1/projects/mailtest/secrets/{name}mailprobe, route /mail/:op, reached at
/fn/mailtest/mail/<op>No credential is in the source. userSecret/passwordSecret name the
project secrets and the host resolves them, so neither this file nor an echoed
options object can leak one.
timeoutMs: 15000 is needed: the default wall budget is 2 s and a TLS IMAP
session plus a LOGIN does not fit in it.
| op | what it proves |
|---|---|
mailboxes |
LIST works and modified UTF-7 is decoded |
read |
a plain read of this mailbox EXCEEDS the 4 MiB per-run cap |
small |
smallerThanBytes is the documented remedy for that, and it works |
unseen |
a structured criteria object |
accents |
a non-ASCII criterion is REFUSED, not sent |
send |
SMTP over STARTTLS on 2525 |
roundtrip |
send to the readable mailbox, then fetch it back and assert bytes |
mail_too_large carried two different statuses (413 transport, 422
per-run cap) while the docs promised 413. Fixed: 422 everywhere.status, headers or body is read as a
response ENVELOPE and may hold nothing else, so a diagnostic field named
status fails the run with invalid_return - and inside a catch it hides
the error it was reporting.header is raw and FOLDED. A long accented subject arrives as
Subject:<CRLF> =?UTF-8?B?...?=<CRLF> =?UTF-8?B?...?=, with nothing on the
Subject: line. The obvious regex finds an empty subject; the next-obvious
one silently captures only the FIRST encoded word. See task #59.A send is accepted in ~1.3 s; the message is then found by UID SEARCH and
fetched back carrying \Recent and not \Seen, which is BODY.PEEK
proven against a genuinely new message. The lone . line survives and is not
doubled, quoted-printable is applied (the body shows stamp=3D), the accented
attachment filename uses RFC 2231, multipart/mixed is declared in the header
with multipart/alternative inside, and a send over 587 fails as
mail_timeout 504 with retryable: false after ~7 s - which is also live
confirmation that connect is capped at HALF the run budget.