Setup guide · Mail Cleanup

Set up Mail Cleanup with Apple Mail, Gmail, Yahoo and iCloud

Most people only need Apple Mail and one click. Big mailboxes go faster when connected directly with an app password.

Which way to connect

Each rule reaches your mail in one of two ways. You choose per rule, under “Runs on”.

Apple Mail (easiest)

Uses the accounts already set up in Apple Mail: Gmail, Yahoo, iCloud, Outlook, Microsoft 365, Exchange and others. No passwords to create. It can be slow when a mailbox holds a lot of mail.

Directly on an account (fastest)

The app signs in to the mail server itself, so Apple Mail doesn’t need to be open and big mailboxes are handled quickly. Each account needs an app password: a 16-letter password made for one app. Your normal password won’t work.

Not sure? Start with Apple Mail. If a Preview takes too long, add your biggest mailboxes directly and switch their rules to that account.

Apple Mail

  1. Open Mail and make sure your accounts are there. To add one: Mail > Add Account…, pick the provider and sign in.
  2. For each account, open Mail > Settings > Accounts > Mailbox Behaviors and check that deleted messages go to the Trash mailbox. If they don’t, Mail Cleanup won’t move anything in that account (it only previews), so nothing can be lost.
  3. In Mail Cleanup, click Allow access to Mail… at the bottom of the window and choose OK in the macOS prompt.
  4. Add rules. New rules run on Apple Mail unless you pick an account under “Runs on”.

Clicked “Don’t Allow” by mistake? Open System Settings > Privacy & Security > Automation, find Mail Cleanup and turn on Mail.

Gmail

Gmail needs 2-Step Verification turned on before it offers app passwords.

  1. Sign in to your Google Account with the Gmail address you want to clean.
  2. Go to Security > How you sign in to Google > 2-Step Verification and turn it on (a phone number is enough). Open 2-Step Verification
  3. Open the App passwords page, or type “App passwords” in the search box at the top of your Google Account.
  4. Type a name such as Mail Cleanup and click Create.
  5. Google shows a 16-letter password in four groups. Copy it now; it is shown only once. The spaces don’t matter.
  6. In Mail Cleanup: Accounts > Add account > Gmail. Username: your full Gmail address. Paste the app password, click Test connection, then Save.

“The setting you are looking for is not available for your account” means 2-Step Verification is off, the account signs in only with a passkey or security key (add a phone as well), it uses Advanced Protection, or it is a work or school account whose admin turned app passwords off. In those cases, keep this account’s rules on Apple Mail.

Yahoo

  1. Sign in at login.yahoo.com with the Yahoo address you want to clean.
  2. Open Account info > Account security.
  3. Scroll to App passwords and click Generate app password (or Generate and manage app passwords).
  4. Type a name such as Mail Cleanup and click Generate password.
  5. Copy the 16-letter password Yahoo shows. It is shown only once.
  6. In Mail Cleanup: Accounts > Add account > Yahoo. Username: your full Yahoo address. Paste the app password, click Test connection, then Save.

Yahoo may ask you to confirm with a code by text or email first. That’s normal.

iCloud

Your Apple Account needs two-factor authentication, which most have already.

  1. Sign in at account.apple.com.
  2. Open Sign-In and Security > App-Specific Passwords.
  3. Click Generate (or +), type a name such as Mail Cleanup, and click Create.
  4. Copy the password Apple shows (four groups of letters).
  5. In Mail Cleanup: Accounts > Add account > iCloud. Username: your iCloud email address (for example name@icloud.com). Paste the password, click Test connection, then Save.

Outlook / Microsoft 365

Microsoft no longer lets apps sign in to Outlook.com, Hotmail, Live and most Microsoft 365 work accounts with an app password. It needs its own Microsoft sign-in, which Mail Cleanup doesn’t support yet. Use Apple Mail for these accounts instead:

  1. In Mail, choose Mail > Add Account… > Microsoft Exchange.
  2. Enter your Outlook or work email address and choose Sign In, then sign in on Microsoft’s page.
  3. Back in Mail Cleanup, keep this account’s rules on “Apple Mail” (the default).

If your organisation still allows IMAP passwords, you can try Accounts > Add account > Outlook / Microsoft 365 (server outlook.office365.com, port 993). If Test connection fails, use Apple Mail.

Troubleshooting

“Invalid credentials” when testing an account

The password is right but it’s your normal password. Gmail and Yahoo only accept an app password here: a new 16-letter password made for this app. Create one (see Gmail or Yahoo) and paste it in.

Keychain asks “MailCleanup wants to use…”

Your app passwords are stored in the macOS Keychain. After the app is updated, macOS asks once more. Choose Always Allow.

Preview through Apple Mail is slow

Mail has to look through every folder. Turn on “Inbox only” for rules that don’t need other folders, or add big mailboxes directly and set their rules to that account.

Nothing is moved in one Apple Mail account

That account doesn’t move deleted mail to Trash in Mail’s settings, so Mail Cleanup only previews it. See Apple Mail, step 2.

Getting mail back

Moved mail goes to the account’s Trash folder. Open Trash in Mail or on the web and move it back. Every move is listed on the Log tab.

Still stuck? Email help@fearlessmove.com. Please don’t send your passwords.