Skip to main content

Email Intake

8 requirements · 14 scenarios

Sender Allowlist Verification

JR-email-intake-001
The sender address SHALL be verified against the domain/email allowlist before any processing occurs (SecurityValidatorStage).
2 test scenarios
  • Allowlisted sender proceeds to processing JR-email-intake-001.1
  • Non-allowlisted sender is rejected JR-email-intake-001.2

Anti-Spoofing Validation

JR-email-intake-002
SPF, DKIM, and DMARC validation SHALL be applied; emails failing anti-spoofing checks SHALL be rejected.
2 test scenarios
  • Email passing SPF/DKIM/DMARC is admitted JR-email-intake-002.1
  • Email failing anti-spoofing is rejected JR-email-intake-002.2

Bot and Self-Send Filtering

JR-email-intake-003
Self-sent emails (from Junior's own sending address) and emails bearing the X-Junior-Bot header SHALL be silently skipped without triggering a workflow or sending a reply.
2 test scenarios
  • Self-sent email is silently dropped JR-email-intake-003.1
  • X-Junior-Bot header suppresses processing JR-email-intake-003.2

Attachment Type Validation

JR-email-intake-004
Only DOCX, PDF, and XLSX attachments SHALL be processed; unsupported attachment types SHALL trigger a failure notification to the sender.
2 test scenarios
  • Supported attachment proceeds to workflow JR-email-intake-004.1
  • Unsupported attachment type triggers notification JR-email-intake-004.2

Ticket-Based Thread Reconstruction

JR-email-intake-005
Thread association SHALL use a ticket ID extracted from the email subject or body (TicketManagerStage); In-Reply-To and References headers are secondary signals.
2 test scenarios
  • Ticket ID in subject links email to existing thread JR-email-intake-005.1
  • Missing ticket ID falls back to header-based threading JR-email-intake-005.2

HTML Body Structured Conversion

JR-email-intake-006
Email HTML body SHALL be converted to structured plain text with email-line- prefixed bookmarks for instruction-to-source citation tracking.
1 test scenario
  • HTML email body is converted with bookmarks JR-email-intake-006.1

STOP and APPLY Command Detection

JR-email-intake-007
Email bodies SHALL be parsed for STOP (job cancellation) and APPLY (edit application) command patterns before general workflow routing.
2 test scenarios
  • STOP command cancels active job JR-email-intake-007.1
  • APPLY command triggers edit application JR-email-intake-007.2

Failure Notification to Sender

JR-email-intake-008
If an email cannot be processed, the sender SHALL receive an error reply within the session SLA explaining what went wrong.
1 test scenario
  • Processing failure triggers error reply JR-email-intake-008.1