Phishing emails are the digital equivalent of a wolf in sheep’s clothing—deceptive, persuasive, and often successful at stealing credentials or installing malware. The good news? You don’t need a PhD in cybersecurity to defend your inbox. By configuring a few smart email filters, you can dramatically reduce the number of malicious messages that reach you. In this guide, we’ll walk through a beginner-friendly, step‑by‑step process that works for the most popular email platforms: Gmail, Microsoft Outlook/Office 365, and on‑premise Exchange servers. Grab a coffee, fire up your mailbox, and let’s get started.
What You’ll Need
- A working email account (Gmail, Outlook/Office 365, or Exchange)
- Administrator access for corporate accounts (optional but recommended)
- Basic familiarity with your email client’s settings menu
- Patience for testing and fine‑tuning filters
- Access to your email’s header view (for advanced rule creation)
Step 1: Identify Common Phishing Indicators
Before you set any filters, you need to know what to look for. Phishing emails often share these traits:
- Suspicious sender domains – e.g.,
example‑secure.cominstead ofexample.com - Urgent language – “Your account will be closed!”
- Misleading URLs – Links that display one address but point to another (hover to inspect)
- Attachments with executable extensions – .exe, .js, .scr, .zip containing scripts
- Mismatched “From” and “Reply‑To” fields
Knowing these patterns will help you craft precise filter rules that catch malicious mail without flagging legitimate messages.
Step 2: Enable Built‑In Spam Protection
Both Gmail and Outlook already ship with powerful anti‑phishing engines. Turning them on fully is your first line of defense.
- Gmail: Go to
Settings > See all settings > Filters and Blocked Addresses. EnsureSpamis set toAlways send to Spam folder. Also, enablePhishing protectionunderSecurity > Safe Browsingin your Google Account. - Outlook/Office 365: In the web portal, navigate to
Settings (gear) > View all Outlook settings > Junk email. TickFilter junk emailandPhishing messages are moved to Junk. For admin‑controlled tenants, enableSafe LinksandSafe Attachmentspolicies in the Microsoft 365 Defender portal.
These built‑in tools catch the low‑hanging fruit, but sophisticated attacks often slip through. That’s why we’ll add custom filters.
Step 3: Create a Custom Filter for Suspicious Domains
Most phishing attempts use look‑alike domains. You can block them with a simple rule.
- Gmail: Click
Create a filterat the bottom of theFilters and Blocked Addressespage. In theFromfield, enter a pattern like*@*.paypa1.com(note the “1” instead of “l”). Then clickCreate filterand chooseDelete itorMark as spam. - Outlook (web): Go to
Settings > View all Outlook settings > Mail > Rules. Add a new rule:When the sender address includes "paypa1.com" → Move to Junk. Save the rule. - Exchange (on‑premise): Use the Exchange Management Shell:
New-TransportRule -Name "Block PayPa1 Phishing" -FromAddressContainsWords "paypa1.com" -DeleteMessage $true
Test the rule by sending yourself a harmless email from a test account using the flagged domain. If the message lands in Junk, you’re good to go.
Step 4: Filter Emails Containing Executable Attachments
Malware often hides in attachments with dangerous extensions. Blocking them at the gateway stops the payload before it reaches a user.
- Gmail: In the same
Create a filterdialog, use theHas attachmentcheckbox and addfilename:*.exe OR filename:*.js OR filename:*.scrto theHas the wordsfield. ChooseDelete it. - Outlook: Rule creation:
When a message has an attachment that includes any of these words: .exe, .js, .scr → Delete. - Exchange: PowerShell command:
New-TransportRule -Name "Block Executable Attachments" -AttachmentExtensionMatchesWords "exe","js","scr","zip" -DeleteMessage $true
Remember to whitelist trusted sources (e.g., your IT department) by adding an exception rule that Except if the sender is in the address book.
Step 5: Set Up a URL Reputation Filter
Phishers love to embed malicious links. Many email services let you scan URLs against known bad lists.
- Gmail (via Google Workspace): Enable
Advanced phishing protectionin the Admin console underSecurity > Gmail > Phishing. Turn onProtect against malicious URLs. - Outlook/Office 365: In Microsoft 365 Defender, create a
Safe Links policythatBlock URLs that are known to be unsafe. Set the action toRedirect to a warning page. - Exchange (on‑premise): Install the
Microsoft Exchange Online Protection (EOP) connectoror use a third‑party URL filtering engine likeProofpoint. Example PowerShell for EOP:Set-HostedContentFilterPolicy -Identity "Default" -RedirectMessageTo "[email protected]" -PhishThreshold 0.8
After enabling, send a test email with a known phishing URL (e.g., http://example.phishingsite.test) to confirm the warning appears.
Step 6: Implement a “Mark as Phishing” Button Training Routine
Technology alone isn’t enough; users need to learn to report suspicious mail. Most platforms let you add a custom button that forwards the message to a security mailbox.
- Gmail: In Google Workspace, go to
Security > Phishing > User reported phishingand enable theReport phishingbutton. Emails reported are automatically sent to the admin console for analysis. - Outlook: In the Exchange admin center, enable the
Report Messageadd‑in. Users can clickPhishingand the message is routed to[email protected].
Run a short training session: show a fake phishing email, ask participants to use the button, and explain what happens behind the scenes. The more reports you get, the better your filters become.
Common Mistakes to Avoid
Even seasoned admins trip up on a few classic errors:
- Over‑blocking: A rule that deletes everything with
.zipattachments will also discard legitimate software updates. Always addexceptionsfor trusted senders. - Forgetting to test: Deploying a rule straight to production can cause a flood of false positives. Use a
Test modeor apply the rule to a small group first. - Ignoring email headers: Phishers spoof the
Fromfield, but theReceivedandMessage‑IDheaders often reveal the true source. Filters that only look at the visible address miss these clues. - Not updating block lists: Threat actors constantly register new domains. Schedule a weekly review of your blocked domain list or subscribe to an automated feed (e.g.,
PhishTank).
Tips and Tricks
Here are a few pro‑level shortcuts that keep your inbox clean without sacrificing productivity:
- Use wildcard patterns: In Gmail,
*@*.example[.]comcatches any sub‑domain, even if the attacker adds “mail.” or “login.” in front. - Leverage DMARC reports: Enable DMARC for your domain and review the aggregate reports. They highlight spoofed senders, which you can add to your block list.
- Combine SPF and DKIM checks: In Exchange, enable
Sender ID verificationandDKIM validation. Messages that fail both can be auto‑quarantined. - Set a quarantine period: Instead of deleting immediately, move suspicious mail to a
Quarantinefolder for 7 days. Users can retrieve false positives, and admins can review trends.
Frequently Asked Questions
Will these filters affect my legitimate newsletters?
Only if the newsletters contain any of the flagged patterns (e.g., executable attachments). Add the newsletter’s sending address to an Allow list in your filter settings to prevent accidental blocking.
How often should I review my filter rules?
At a minimum once a month. Phishing tactics evolve quickly, and a rule that was effective six weeks ago may become obsolete or overly aggressive.
Can I automate the block‑list updates?
Yes. Many security vendors provide RSS or JSON feeds of newly identified phishing domains. Use a small script (PowerShell, Python, or even a Google Apps Script) to pull the feed daily and append new entries to your filter’s block list.
Conclusion
Phishing attacks are a moving target, but a well‑configured set of email filters gives you a sturdy defensive wall. By enabling built‑in spam protection, creating custom domain and attachment rules, scanning URLs, and training users to report suspicious messages, you dramatically lower the risk of credential theft and malware infection. Remember to test, fine‑tune, and review your rules regularly—security is a marathon, not a sprint. Stay vigilant, keep your filters fresh, and enjoy a cleaner, safer inbox.



