- Webhooks still receive it, with
email.spam.isJunk: true. See Webhook Structure. - IMAP shows it in the
Junkfolder instead ofINBOXand the scope folders. See IMAP Behavior. - The mailbox API lists it under
folder=junk, and the email API returnsspam.is_junk.
Filter levels
Set the level in the Mailboxes & SMTP dashboard or withPUT /api/e2/spam-filter. It applies to the whole account and to emails received after the change.
Each email gets a level from 0 (none) to 4 (clear) for spam, phishing, fraud, malware and impersonation. Failed authentication (for example a DMARC failure) can raise a level, but standard and lenient only act when the classifier itself backs the level:
- For spam, phishing and fraud, the classifier gives a probability for each level. “Likely” means at least a 70% chance of that level or higher.
- For malware and impersonation, the classifier says how likely the label is. “Likely” means at least an 80% chance.
Prompt injection (text aimed at an AI reading the email) is checked too, but never marks an email as junk by itself.
Unless the level is
off, an email that fails the receiving server’s spam check or virus scan is also marked as junk. A failed virus scan counts as clear malware.
Guard rules
Guard rules take precedence over the filter level:- The
junkaction marks matching emails as junk without blocking them. - The
allowaction marks matching emails as not junk, even if the filter would flag them. - The
blockaction still blocks delivery entirely.
Correcting a verdict
Moving a message betweenINBOX and Junk in an email client, or setting isJunk with PATCH /api/e2/mailboxes/{id}/messages/{messageId} or is_junk with PATCH /api/e2/emails/{id}, records your decision for the email across the account. Automatic verdicts never override a decision you made.
The webhook and API report why an email was marked: classifier, ses_spam, guard_rule or user.