Configure Spam Actions and Subject Prefixes in Exchange Online
Question details
Configure separate actions and subject prefixes for spam, high-confidence spam, phishing, and bulk mail in Exchange Online.

- Product
- Microsoft Exchange Online
- Device & OS
- not provided
- Scenario
- Mail-flow rules use spam confidence level (SCL) conditions and X-Forefront-Antispam-Report header patterns to prepend subjects, change SCL values, and redirect messages.
- Observed behavior
- Messages are redirected, but subject prefixes are not consistently applied and delivery does not reliably reach the intended mailbox folders.
Sign in with permissions to review Exchange mail-flow rules and Microsoft Defender anti-spam policies. Collect representative message headers, the expected prefix and destination for each category, and the current rule conditions, actions, exceptions, and priority.
Review mail-flow rules and anti-spam policy actions together
Use this review to identify overlapping rules, mismatched conditions, or policy actions that conflict with the intended prefix and delivery behavior.
Mail-flow rules, spam classification, redirection, and mailbox Junk Email processing are separate parts of message handling. A successful redirect does not prove that a subject-prefix condition matched or that the destination mailbox will place the message in the intended folder.
Available anti-spam actions depend on the verdict and policy type. Do not assume every category supports a custom subject prefix or that transport rules can override protected phishing handling.
Open the Exchange admin center and go to Mail flow > Rules. Open each relevant rule and review its enabled state, mode, priority, conditions, exceptions, subject-prefix action, SCL modification, and redirect action. Check whether an earlier rule stops further rule processing.
Open a representative message's full headers and compare its SCL and X-Forefront-Antispam-Report values with the conditions in Mail flow > Rules. Confirm that each text pattern matches the actual header content. A header visible after delivery is not proof that it was available when a particular transport rule ran.
In the Microsoft Defender portal, go to Email & collaboration > Policies & rules > Threat policies > Anti-spam. Open the policy that applies to the recipient and review its scope and actions for spam, high-confidence spam, phishing, and bulk mail. If an applicable verdict offers a subject-prefix action, review that setting; otherwise, use a supported action for that verdict.
In Mail flow > Rules, confirm the redirect recipient. Then open that recipient's mailbox in Outlook on the web and check Inbox, Junk Email, and Settings > Mail > Rules. Redirection selects a recipient, not a mailbox folder; final placement can depend on filtering and mailbox processing.

Test each action independently and escalate persistent prefix failures
Use controlled tests to determine whether the failure comes from condition matching, subject modification, redirection, or final delivery processing.
Document Exchange Online Rule Tests with WPS Office
WPS Office does not configure Exchange Online or repair spam filtering. It provides a free, lightweight alternative for documenting rule settings, comparing test results, and preparing support reports, with a familiar interface and Microsoft Office file compatibility for easy migration.

Frequently Asked Questions
Why does redirection work when the subject prefix does not?
The redirect may be applied by a different rule, while the prefix rule may not match, may be skipped, or may interact with other processing. Check Exchange admin center > Mail flow > Rules for priority, exceptions, and stop-processing settings, then test the prefix action on its own.
Can an Exchange Online redirect rule send a message directly to Junk Email?
A redirect action selects the destination recipient, not a mailbox folder. Review the applicable policy in Microsoft Defender > Email & collaboration > Policies & rules > Threat policies > Anti-spam, then check the destination mailbox's Junk Email folder and mailbox rules.
Is an X-Forefront-Antispam-Report pattern enough to identify every spam category?
Do not assume one header pattern reliably covers every category or processing stage. Compare actual message headers with the rule's matching expression and verify the condition through controlled tests. SCL alone also does not uniquely identify every phishing or bulk-mail verdict.
What should I send Microsoft support if subject prefixes still fail?
Use Microsoft 365 admin center > Support > Help & support. Include the relevant rule settings and priority, anti-spam policy, affected message IDs and timestamps, full headers, message trace results, and the expected prefix and delivery destination for each test.




