01What WT-JunkCleaner does
WT-JunkCleaner is in beta. It is ready for everyday use, but expect rough edges. Try Preview first, and please send problems or ideas to info@taucher.llc.
Every time it runs, WT-JunkCleaner goes through the Junk Email folder one message at a time:
- It reads the message headers: who it was sent to, any unsubscribe link, and the sender-authentication result that Microsoft stamped when the message arrived.
- If the sender proved it is who it claims to be, WT-JunkCleaner unsubscribes using the safest method the sender supports.
- It deletes the message, whether or not an unsubscribe happened or worked.
- If you turn it on, it lists the domains of persistent spammers in a CSV file you can use to block them.
- It writes a CSV log so you can see exactly what happened to each message.
Built-in safety rules
Out of the box, WT-JunkCleaner follows three rules:
| Rule | Why it matters |
|---|---|
| Only authenticated senders are contacted | Much junk is sent from forged addresses. Clicking "unsubscribe" in a forged message mostly tells the spammer your address is real, and some links are malicious. WT-JunkCleaner contacts a sender only if Microsoft's own check passed (dmarc=pass or compauth=pass). Everything else is deleted without any contact. |
| One-click unsubscribe is the default | The RFC 8058 one-click standard sends one small request to the sender's unsubscribe address. No web page is opened, nothing is rendered and no script runs. Major mailing platforms are required to support it. |
| Only safe links are opened | A link is used only if it is https and has a real host name. Plain http links, bare IP addresses and local names are refused, and at most 3 redirects are followed. |
Other unsubscribe methods are available in Settings, but every one of them is off by default.
If it cleared out your Junk folder and saved you time, you can help fund future development: Support WT-JunkCleaner ☕. You can also click Support on the Outlook ribbon or run WT-JunkCleaner support. It's entirely optional. Thank you!
02Requirements
- Windows 10 or 11 with Windows PowerShell 5.1 (built in) and .NET Framework 4.8 (built in).
- Classic Outlook for Windows (Microsoft 365 Apps, Outlook 2016 or later), 32- or 64-bit. The new Outlook and Outlook on the web do not support this kind of add-in. The Command Prompt and scheduled runs work regardless of which Outlook you use.
- A Microsoft 365 / Exchange Online mailbox.
- Internet access to the PowerShell Gallery during install. The installer downloads one Microsoft module:
Microsoft.Graph.Authentication. - No administrator rights are needed. Everything installs for your Windows user only.
03Installing
Download WT-JunkCleaner-Setup.cmd (v. 261031-1754). One self-contained installer for Windows 10 / 11 with classic Outlook. Prefer paper? Download this manual as a PDF.
- Close Outlook. If Outlook is open, the installer waits and asks you to close it.
- Download
WT-JunkCleaner-Setup.cmdfrom taucher.llc. It is one self-contained installer file. - Double-click
WT-JunkCleaner-Setup.cmd. Your browser or Windows SmartScreen may warn about a downloaded.cmdfile; choose to keep and run it. A window opens and shows each step. (If you received the WT-JunkCleaner folder instead, double-clickInstall.cmdin it.) - Wait for "WT-JunkCleaner is installed." The first install takes a minute or two while the modules download.
- Start Outlook. The WT-JunkCleaner group appears on the Home tab.
What the installer does
| Step | Detail |
|---|---|
| Copies the program | To %LOCALAPPDATA%\WT-JunkCleaner. This keeps it outside OneDrive, so syncing never locks the add-in file. If you already have a config.json, it is kept. |
| Installs modules | Microsoft.Graph.Authentication, which reads and deletes mail, for your user only. |
| Builds the add-in | Compiles JunkCleanerAddIn.dll with the C# compiler that is part of Windows. Visual Studio is not needed. |
| Registers the add-in | Under your user's registry keys, for both 32- and 64-bit Office. It also clears any earlier "disabled" flag Outlook recorded for it. |
| Adds a command | Puts the program folder on your PATH, so WT-JunkCleaner works in any new Command Prompt window. |
Versions are named v. YYMMDD-HHMM: the date and time of the build in Los Angeles (Pacific) time, so v. 261031-1720 was built October 31, 2026 at 5:20 PM. A larger number is newer. To see what you have installed, run WT-JunkCleaner version or look at the bottom of the Settings window. To install a newer version, close Outlook and run the new WT-JunkCleaner-Setup.cmd. Your settings and logs are kept.
04Your first run
Do the first run by hand so you can sign in to Microsoft 365 and see what WT-JunkCleaner would do before it changes anything.
- In Outlook, click Preview, or type
WT-JunkCleaner previewin a Command Prompt. - A Microsoft sign-in window opens. Sign in with your mailbox account and approve the Mail.ReadWrite permission. Your sign-in is remembered for later runs.
- Read the list. Each line shows what would happen (method, sender authentication, sender and subject). In preview nothing is unsubscribed or deleted.
- If any real mail shows up, add that sender to Keep senders in Settings.
- Click Clean Junk to do it for real.
If you want a few days to rescue real mail from Junk before it is deleted, set Only process messages older than to 2 or 3 days in Settings.
05Using it from Outlook
The add-in puts a WT-JunkCleaner group on the Home tab of the main Outlook window:
| Button | What it does |
|---|---|
| Clean Junk | Asks for confirmation, then opens a window and processes the Junk Email folder with your saved settings. The window stays open at the end so you can read the summary. Press Enter to close it. |
| Preview | Same as Clean Junk, but as a dry run. Nothing is unsubscribed or deleted. |
| Settings | Opens the Settings window (section 7). |
| Logs | Opens the folder that holds the CSV log of every run. |
| Support | Opens PayPal so you can support future development, if you want to. WT-JunkCleaner is free. |
| Help | Opens this manual. |
Outlook stays usable while WT-JunkCleaner runs, because the work happens in its own window.
06Using it from the Command Prompt
Open a new Command Prompt after installing and type:
| Command | What it does |
|---|---|
WT-JunkCleaner | Runs now with your saved settings. |
WT-JunkCleaner preview | Dry run. Shows what would happen and changes nothing. |
WT-JunkCleaner config | Opens the Settings window. |
WT-JunkCleaner logs | Opens the log folder. |
WT-JunkCleaner manual | Opens this manual. |
WT-JunkCleaner version | Shows the installed version. |
WT-JunkCleaner support | Opens PayPal to support future development (optional). |
WT-JunkCleaner help | Lists the commands and overrides. |
WT-JunkCleaner uninstall | Removes WT-JunkCleaner (section 13). |
One-time overrides
Options typed after WT-JunkCleaner apply to that run only. They do not change your saved settings.
WT-JunkCleaner -MaxMessages 50 WT-JunkCleaner -OlderThanDays 3 -HardDelete WT-JunkCleaner preview -Mailbox user@contoso.com WT-JunkCleaner -BlockMode CsvOnly
| Override | Meaning |
|---|---|
-Mailbox | me or a mailbox address such as user@contoso.com |
-MaxMessages | The most messages to process in this run |
-OlderThanDays | Only process messages received more than this many days ago |
-HardDelete | Permanently delete instead of moving to Deleted Items |
-AllowMailto, -AllowGetLinks, -ScanBody | Turn on the extra unsubscribe methods for this run |
-IncludeUnauthenticated | Also contact senders that failed authentication (not recommended) |
-BlockMode | Off or CsvOnly (write the spam-domain list) |
-LogFolder | Write this run's log to a different folder |
07Settings reference
Open Settings from the ribbon, with WT-JunkCleaner config, or by pressing F1 in the Settings window to get back to this manual. Settings are saved in %LOCALAPPDATA%\WT-JunkCleaner\config.json.
The buttons at the bottom are Save & Preview, Save & Run now, Help, Save and Cancel. The Support it ☕ link in the bottom-right corner opens PayPal.
General tab
| Setting | Default | Description |
|---|---|---|
| Mailbox | me | me means the account you sign in with. To clean another mailbox, enter its address. You need full access to that mailbox. |
| Deleted messages go to | Deleted Items | Deleted Items keeps messages recoverable. Permanently delete skips Deleted Items. |
| Only process messages older than | 0 (all) | Leaves recent junk alone for this many days, so you have time to rescue real mail. |
| Maximum messages per run | 500 | A safety limit on how many messages one run handles. |
| Keep senders | (empty) | One address or domain per line. Matching messages are never unsubscribed or deleted; they stay in Junk Email. A domain also matches its subdomains. |
| Log folder | …\WT-JunkCleaner\Logs | Where the CSV logs are written. Open log folder opens it. |
Unsubscribe tab
| Setting | Default | Description |
|---|---|---|
| One-click unsubscribe | Always on | RFC 8058 POST to the https unsubscribe link, used when the sender advertises one-click support. |
| Send mailto: unsubscribe emails | Off | Sends the sender's unsubscribe email from your mailbox. The first time, you will be asked to approve the Mail.Send permission. |
| Open https List-Unsubscribe links (GET) | Off | Opens the header link when one-click is not offered. |
| Look for a link in the message body | Off | A last resort: finds an "unsubscribe" or "opt out" link in the message body. |
| Also contact senders that FAIL authentication | Off | Not recommended. These senders are usually forged, and contacting them confirms your address. |
Opening a link from a spammer tells them your address is live. Turn on GET links or body scanning only if you trust the senders that end up in your Junk folder.
Spam domains tab
| Setting | Default | Description |
|---|---|---|
| Write a list of spam domains (CSV) | Off | After each run, writes SpamDomains_<date>.csv to the log folder. Nothing in your mailbox is changed. See section 9. |
| Its unsubscribe link is dead | On | Lists the sender's domain when the unsubscribe request failed (404, timeout, error). |
| It has no unsubscribe link | Off | Lists the domains of cold-outreach senders that offer no way out. |
| It failed sender authentication | Off | Lists the claimed domain of senders that failed authentication. This can list a real brand whose name was forged, which is why it is off. |
| Also list each sending subdomain seen | On | Lists enews9.example.com as well as example.com. |
| Never list these domains | Common free-mail and your own domains | Domains that are never listed, even if they meet a rule. |
Schedule tab
| Setting | Default | Description |
|---|---|---|
| Run automatically every day | Off | Creates or removes a Windows scheduled task named WT-JunkCleaner when you click Save. |
| Time | 6:00 AM | When the daily run starts. A run missed because the PC was off starts at your next sign-in. |
08How each message is handled
Each message in Junk Email goes through these steps in order:
Authentication-Results header is read, because that is the one Exchange Online stamped when the message arrived; lower copies can be forged. If it shows neither dmarc=pass nor compauth=pass, the message is marked Skipped and goes straight to step 5.After all messages are done, the log, the spam-domain list (if it is on) and the summary are written.
09Listing spam domains
A lot of spam comes from networks that rotate through many subdomains (for example enews1 to enews17.fund4ever.com) and whose unsubscribe links lead nowhere. Unsubscribing cannot stop these; blocking the domain can. WT-JunkCleaner does not block anything itself. Instead it can hand you a ready-made list.
Turn on Write a list of spam domains on the Spam domains tab in Settings. After each run you will find SpamDomains_<date>.csv in the log folder, with one domain per row and the reason it was listed. Parent domains come first, then the subdomains seen.
Using the list
| Who | What to do |
|---|---|
| You | In Outlook, open Junk → Junk E-mail Options → Blocked Senders and add the domains you want blocked. Mail from them then always goes to Junk Email, where WT-JunkCleaner clears it on the next run. |
| Your IT admin | Import the domains into the Microsoft 365 Defender Tenant Allow/Block List. That stops the mail for the whole organization before it is delivered. |
Exchange Online only applies the first 500 entries of a mailbox's Blocked Senders list, and all the junk lists together are limited to 510 KB. Add parent domains (such as fund4ever.com) rather than every subdomain.
10Running on a schedule
- Do one run by hand first (section 4), so your Microsoft 365 sign-in is saved.
- Open Settings → Schedule, check Run WT-JunkCleaner automatically every day, choose a time, and click Save.
- To check it, open Task Scheduler and find the task WT-JunkCleaner in the Task Scheduler Library. You can right-click it and choose Run to test it.
Scheduled runs use your Windows account, happen only while you are signed in to Windows, and open a minimized window. If your saved Microsoft 365 sign-in has expired, the sign-in window appears; complete it once and later runs go back to being silent.
11Reading the log
Each run writes WT-JunkCleaner_<date>_<time>.csv to the log folder. It opens in Excel.
| Column | Contents |
|---|---|
| Received | When the message arrived |
| From / To / Subject | Sender address, the To header, and the subject |
| Auth | dmarc=pass, compauth=pass, fail or none |
| Method | See the table below |
| Result | For example HTTP 200 (unsubscribed), Unsubscribe failed: … (404), No unsubscribe link, or Sender auth fail - not contacted |
| Deleted | True if the message was deleted |
| UnsubURL | The unsubscribe targets the sender listed |
| Method | Meaning |
|---|---|
OneClickPOST | RFC 8058 one-click request sent |
Mailto | Unsubscribe email sent from the mailbox |
HeaderGET / BodyGET | Header or body link opened |
Skipped | Sender failed authentication, so it was not contacted |
None | No usable unsubscribe method |
Kept | On the Keep senders list, so it was left in Junk Email |
Spam networks often list unsubscribe links that return 404. That is a sign the sender belongs on the spam-domain list, not a problem with WT-JunkCleaner.
12Troubleshooting
| Problem | What to do |
|---|---|
| No WT-JunkCleaner group in Outlook | Check that you are using classic Outlook; the new Outlook does not run this add-in. Then go to File → Options → Add-ins. If WT-JunkCleaner is under Disabled or Inactive, choose Manage: COM Add-ins → Go (or Disabled Items) and turn it on. Running the installer again with Outlook closed also clears the disabled flag. |
| Installer: "Add-in build failed" | Outlook was probably still open and holding the old add-in file. Close Outlook completely (check Task Manager for OUTLOOK.EXE) and run the installer again. |
| "WT-JunkCleaner is not recognized" | Open a new Command Prompt; windows that were already open don't see the PATH change. You can also run %LOCALAPPDATA%\WT-JunkCleaner\WT-JunkCleaner.cmd directly. |
| Sign-in window keeps appearing | Complete it once with the mailbox account. If your organization requires admin approval for the Microsoft Graph Command Line Tools app, an admin must grant consent once in Entra ID. |
| "Could not create SSL/TLS secure channel" | WT-JunkCleaner forces TLS 1.2/1.3. If you still see this error for a sender, their server is out of date. That sender's unsubscribe fails, but the message is still deleted. |
| Many 404 or timeout results | This is expected with spam networks. Turn on the spam-domain list (section 9). |
| "Over the size allowed on the server" | The 510 KB junk-list limit was reached. Remove old entries in Outlook (Junk → Junk E-mail Options → Blocked Senders), keeping parent domains rather than subdomains. |
| Real mail was deleted | With the default setting it is in Deleted Items; move it back. Add the sender to Keep senders, and consider Only process messages older than 2–3 days. |
| Scripts are blocked by policy | All launchers use -ExecutionPolicy Bypass for their own scripts only. If your organization blocks that through Group Policy, ask your administrator to allow the %LOCALAPPDATA%\WT-JunkCleaner folder. |
13Uninstalling
Close Outlook, then run WT-JunkCleaner uninstall, or run WT-JunkCleaner-Setup.cmd -Uninstall from a Command Prompt in the folder where you saved it. The uninstaller removes the add-in registration, the scheduled task, the PATH entry and the program files. It asks whether to keep your logs.
14References
| Topic | Source |
|---|---|
| Blocked/Safe Senders limits (500 synced entries, 65,535 total, 510 KB) | https://learn.microsoft.com/en-us/defender-office-365/configure-junk-email-settings-on-exo-mailboxes |
| Exchange Online Protection limits | https://learn.microsoft.com/en-us/office365/servicedescriptions/exchange-online-protection-service-description/exchange-online-protection-limits |
| Tenant Allow/Block List | https://learn.microsoft.com/en-us/defender-office-365/tenant-allow-block-list-about |
| RFC 8058, one-click unsubscribe | https://www.rfc-editor.org/rfc/rfc8058 |
| RFC 2369, List-Unsubscribe header | https://www.rfc-editor.org/rfc/rfc2369 |
| Microsoft Graph: list messages | https://learn.microsoft.com/graph/api/user-list-messages |
WT-JunkCleaner v. 261031-1754 · © 2026 WalterTaucher LLC. All rights reserved. · info@taucher.llc
15Licence & copyright
WT-JunkCleaner is free. Copyright © 2026 WalterTaucher LLC. All rights reserved. WT-JunkCleaner, including its software, add-in and documentation, is the property of WalterTaucher LLC. It may not be sold, rebranded, or redistributed without written permission.
Microsoft, Outlook, Exchange Online, Microsoft 365, Entra ID and Windows are trademarks of the Microsoft group of companies.
Questions, bug reports or feature requests: email info@taucher.llc. You'll reach the people who wrote the software.