Email Forwarding Rules Attackers Love
Find the hidden forwarding settings and inbox rules intruders plant in hijacked mailboxes, then block and monitor them.
Key takeaways
- Inbox rules and forwarding settings can persist through password resets and quietly leak or hide mail.
- Warning signs include outside forwarding addresses, rules that delete or move security and payment messages, and rules with blank or odd names.
- Check every place a mailbox can redirect mail: forwarding, filters, delegates, connected apps and server-side rules.
- Organizations should block automatic external forwarding by default, alert on new rules and keep audit logs.
After taking over a mailbox, an intruder often creates forwarding settings or inbox rules that copy your mail elsewhere, or hide messages that would give them away. These settings can keep working after you change your password, so checking them is an essential part of both routine security and cleanup.
Rules are attractive to attackers because they are ordinary features. Nothing is installed, nothing looks broken, and the mail system obediently does the work. This article shows where to look and how administrators can limit the risk.
What the intruder wants
Two goals explain most malicious rules.
Keep listening. Forwarding sends copies of incoming mail to an outside address, so the intruder keeps reading invoices, reset links and private conversations even if they lose the password.
Keep you in the dark. While they send mail from your account or insert themselves into a thread, they need you not to see the replies. A rule moves or deletes them before you notice.
This pairing is a standard part of business email compromise: the criminal answers a supplier or customer from your real account, and a rule makes sure you never see the conversation.
What suspicious rules look like
| Pattern | Example | Why it is a warning |
|---|---|---|
| External forward or redirect | Send all mail to an unfamiliar address | Ongoing copy outside your control |
| Delete on keyword | Messages containing "invoice", "payment", "password" | Hides money and security traffic |
| Move to rarely seen folder | Into RSS Feeds, Archive, Notes or Junk | Looks harmless, is never read |
| Mark as read | Applied to a specific contact | Removes the bold unread cue |
| Odd or empty name | A single dot, a space or random letters | Easy to overlook in a list |
| Targets security senders | Alerts from your provider or bank | Suppresses the warnings |
None of these proves compromise by itself. You may well have a rule that files bank statements. The question is whether you or your administrator created it and whether it still makes sense.
Every place mail can be redirected
Look further than the filter list.
- Account-level forwarding. A single setting that sends everything to another address.
- Inbox rules or filters. Conditions with actions such as forward, redirect, delete or move.
- Auto-reply. Can disclose information or deliver a message to everyone who writes.
- Delegates and shared access. Another account that can read or send as you.
- Send-as and reply-to settings. A changed reply address routes answers to someone else.
- Connected apps. Third-party applications with permission to read mail, often granted through consent phishing.
- Retrieval settings. POP or IMAP access, app passwords and other clients that download copies.
- Blocked senders and safe senders. Blocking a bank or colleague is another way to hide messages.
Checking a personal mailbox
Menu names vary between providers and change over time, but the places are consistent.
- In Gmail, open all settings and review the forwarding tab, the filters tab, and the accounts section for delegation and send-as addresses.
- In Outlook webmail, open mail settings and review rules and forwarding, plus junk mail lists.
- In Apple Mail and other desktop apps, check local rules and also sign in to the webmail version, since rules stored on the server run even when your computer is off.
- In your account security page, review connected apps, app passwords and signed-in devices.
Open each rule and read all of its conditions and actions. An innocent name can wrap a harmful action. If you find something you did not create, take a screenshot and note the destination address before deleting it, then follow the full cleanup in recovering a hacked account.
Auditing in Microsoft 365
Administrators can inspect mailboxes with the Exchange Online PowerShell module. After connecting with Connect-ExchangeOnline, these commands list rules for one user, including hidden ones, and mailboxes with account-level forwarding:
Get-InboxRule -Mailbox [email protected] -IncludeHidden |
Select-Object Name, Enabled, ForwardTo, ForwardAsAttachmentTo, RedirectTo, DeleteMessage, MoveToFolder
Get-Mailbox -ResultSize Unlimited |
Where-Object { $_.ForwardingSmtpAddress -or $_.ForwardingAddress } |
Select-Object UserPrincipalName, ForwardingSmtpAddress, ForwardingAddress, DeliverToMailboxAndForward Hidden rules shown by -IncludeHidden include some that the system creates itself, so investigate before removing anything. Cmdlets and parameters evolve; check Microsoft's current documentation.
Also review mail flow rules at the organization level and any inbound or outbound connectors. An attacker with administrator access can redirect mail for many people at once. Google Workspace administrators have comparable settings and audit logs in the admin console.
Reading logs for rule activity
A rule list shows the present. Logs can show when a rule appeared, from where and what happened around it. In an organization, search the audit log for operations that create or change inbox rules, set mailbox forwarding, add mailbox permissions or grant consent to applications. The exact operation names differ between platforms and have changed over time, so use the vendor's current reference.
When you find a creation event, note the time, source IP address, client or user agent and the session it belongs to. Then look backward for the sign-in that started that session and forward for what the same session did: messages read, files downloaded, mail sent. Look for sign-ins from that address on other accounts.
Interpret locations carefully. Mobile carriers, cloud services and VPNs can make a legitimate sign-in appear far away, and an intruder can route through a network near you. Combine several clues before deciding either way.
Logs are only useful if they exist. Check your retention period before you need it, and consider exporting logs to separate storage that a compromised administrator account cannot erase.
A quarterly review you can finish quickly
Make rule checking a calendar task with a clear owner. For each important mailbox, especially finance, executives and shared accounts:
- Export the list of rules and forwarding settings.
- Compare it with the last export and explain every difference.
- Confirm each external destination still has a business reason and an approver.
- Remove rules left behind by former staff or finished projects.
- Check delegates and application grants in the same sitting.
Shared mailboxes deserve particular attention because several people assume someone else is watching them. See shared mailboxes and distribution lists for how access is usually arranged.
Preventing and detecting abuse
For organizations:
- Disable automatic forwarding to external domains by default, with a documented exception process. Microsoft 365 offers controls in outbound spam policy and remote domain settings; Google Workspace can restrict automatic forwarding.
- Alert on events such as a new inbox rule with forward or delete actions, a new forwarding address, a new delegate or a new app consent.
- Keep audit logs long enough to investigate, and confirm that mailbox auditing is on.
- Require strong sign-in, ideally passkeys or security keys, and block legacy protocols that skip the second factor.
- Restrict user consent to third-party apps so an administrator approves access to mail.
- Include rules in offboarding and incident checklists.
For individuals:
- Check forwarding and filters a few times a year.
- Read security alerts about new forwarding, which some providers send and some show as a banner.
- Protect the account with a unique password and a second factor, as in how to secure your email account.
Responding to a finding
If you find a malicious rule, assume the account was accessed and treat the event seriously.
- Record the rule, including conditions, destination and any timestamps in logs.
- Disable it, then reset the password and revoke all sessions and app tokens.
- Remove unknown authentication methods and recovery details.
- Search logs and other mailboxes for the same destination address.
- Work out which messages were forwarded or deleted, and recover deleted ones while retention allows.
- Warn anyone in affected threads by phone, especially about payments.
- Involve legal or privacy staff where personal data may have left the organization.
Deleting the rule first and asking questions later destroys useful evidence. Disabling it stops the leak while keeping the details.
Legitimate forwarding done carefully
Forwarding has honest uses, such as consolidating an old address. Keep it to destinations you control, write down why it exists and review it. Remember that forwarded mail can fail SPF at the destination, and that your protection is only as strong as the weaker of the two mailboxes. At work, forwarding to a personal account usually breaches policy; ask for an approved way to read mail on your own device. For sorting your own mail safely, see filters, labels and rules.
If you inherit a mailbox or take over administration from someone else, run this review on the first day. Old exceptions are easy to accept as normal simply because they were already there.
Common questions
Will changing my password remove forwarding?
Do not count on it. Forwarding and rules are mailbox settings. Remove them yourself and confirm they stay removed.
Why did you receive no warning?
Not every provider alerts on new rules, and an intruder can delete the alert or filter it. That is why periodic manual checks matter.