‹ All projects

Spam Cleanup - A Gmail and Outlook Setup Guide

The idea

Both Gmail and Outlook can clean up junk mail on their own forever, with no scripts and no scheduled jobs, if you set them up once. The trick is not deleting anything you actually want, so the guide uses three tiers:

  • Known junk: senders and domains you've already identified are deleted and blocked immediately.
  • Promotions: anything classified as an ad gets a 7-day grace period so you can glance at it, then it's deleted automatically.
  • Unsure: new senders that look promotional go to a Review folder, and you promote them to tier one or two after a spot-check.

Gmail

A filter on category:promotions older_than:7d with Delete it handles tier two using Gmail's own classifier. Tier one is a filter on specific senders plus Block, and tier three is a Review label.

Outlook

Sweep clears a sender's history and keeps them out going forward. Rules handle the rest, starting narrow with specific senders, because keyword rules are blunter than Gmail's classifier. The Blocked senders list sends known junk straight to the Junk folder.

› Read the full step-by-step guide

Gmail: one-time cleanup

  1. Search for category:promotions.
  2. Select all, then "Select all conversations that match this search".
  3. Delete in bulk.
  4. Repeat with category:promotions older_than:30d in:anywhere to catch anything outside the inbox tab.

Gmail: automatic deletion (tier 2)

  1. Settings › See all settings › Filters and Blocked Addresses › Create a new filter.
  2. In "Has the words", enter category:promotions older_than:7d.
  3. Click Create filter, check Delete it (and optionally Skip the Inbox), and save.

Gmail: known junk (tier 1)

  1. Create another filter with From set to the addresses or domains, e.g. spammer1.com OR spammer2.com, and check Delete it.
  2. To block formally, open one email from the sender › three-dot menu › Block.

Gmail: unsure senders (tier 3)

  1. Create a label called Review.
  2. Create a filter for the keywords you're unsure about, with Apply the label: Review and Skip the Inbox.
  3. Check it periodically and move confirmed junk senders to your tier 1 filter.

Outlook: one-time cleanup with Sweep

  1. Right-click an email from the sender › Sweep.
  2. Choose Delete all from [sender] and/or Always move messages from [sender] to Deleted Items.
  3. Repeat for each known spam sender.

Outlook: automatic deletion with Rules

  1. Settings › Mail › Rules › Add new rule.
  2. Set a condition: From specific domains (safest), or Subject includes phrases like % off, limited time, exclusive offer.
  3. Set the action to Delete and save. Start narrow and widen carefully.

Outlook: blocking and review

  1. Settings › Mail › Junk email › add addresses or domains under Blocked senders and domains.
  2. For unsure senders, create a Review folder and a rule that moves your looser keyword set there instead of deleting it. Check it weekly.

A note for work accounts

On a managed Microsoft 365 tenant, an admin policy may restrict auto-delete rules for retention or compliance reasons. If a rule silently doesn't save, that's usually why, and it's a question for IT.