Separate accepted and rejected email attachments
21 September 2026
Preserve the received email and classify each attachment separately. A message containing one valid PDF, one renamed text file and one unsupported attachment needs three item outcomes. “Email processed” tells the sender and the operator too little.
Classify the three items
Imagine a test inbox receives a readable PDF invoice, plain text renamed invoice-copy.pdf and an unsupported but harmless file. Give the parent message an intake reference and each attachment its own item ID. Record the name supplied by the sender separately from the observed type and validation result.
| Input | Example technical outcome | Next action |
|---|---|---|
| Genuine PDF | Accepted for the permitted PDF intake checks. | Route to the ordinary workflow only after the required checks pass. |
| Text file with PDF extension | Declared type and observed content do not agree. | Record the mismatch and reject or isolate it under the agreed file policy. |
| Unsupported attachment | This workflow has no authorised handler for the format. | Record unsupported and route it for the approved review or rejection process. |
A structurally readable PDF is not automatically malware-free or suitable for the intended business task. Equally, “unsupported” does not by itself establish malicious content. OWASP recommends layers of file validation rather than trusting an extension alone. OWASP file upload guidance
Report the mixed outcome without dropping the evidence
Link all three outcomes to the original message. Record which file entered the normal queue, which was blocked and which awaits a decision. Keep access to rejected or isolated material restricted. The parent can report intake complete with exceptions while the individual review remains open.
If the sender later supplies a corrected attachment, link the new intake to the failed item rather than overwriting the original submission. Check that replaying one item cannot run the valid invoice again. This makes the technical decision understandable without making a claim that every attachment succeeded.
Part of the Deduplicate PDF email attachments without losing their case guide.
Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).
