Desktop tool for cleaning IMAP mailboxes with rule-based filters, safe trash mode, multi-folder support, and undo for trash operations.
Deutsche Dokumentation: README-DE.md
- Multi-account IMAP support for GMX, Gmail, and Outlook
- Secure password storage via
keyringwith session-only fallback - Rule-based filters for age, sender, subject, and size
- Multi-folder support beyond INBOX-only processing
- Safe mode (trash) plus unsafe mode for permanent deletion
- Undo for safe-mode deletions
- Large-mail scanner with tabular selection
- Configurable logging via
UMAIL_CLEANER_LOG_LEVEL - Modular architecture:
imap_client.py,models.py,workers.py
Double-click START.bat
pip install -r requirements.txt
python mail_imap_cleaner_v1.py- Add an IMAP account
- Check or auto-detect the trash folder
- Define a rule or use the large-mail scanner
- Select the target folder
- Execute in safe mode
- Undo the last deletion if needed
- Config file:
%USERPROFILE%\.mail_cleaner\config.json - Passwords are not stored in the JSON file
- Safe mode is active by default
pytest tests -v- IMAP uses encrypted connections (
IMAP4_SSL) - Safe mode moves mails to trash by default
- Undo available for all safe-mode actions
- Without
keyring, passwords are held in the current session only
- GMX (
imap.gmx.net:993) - Gmail (
imap.gmail.com:993) with App Password - Outlook (
outlook.office365.com:993) - Any IMAP4 provider with standard SSL
Gmail login fails? Enable two-factor authentication and create an App Password at myaccount.google.com/apppasswords
Keyring is missing?
Install via pip install keyring.
Trash folder not detected? Set it manually in the account dialog.
Part of the doc-bricks mail suite:
| Tool | Description |
|---|---|
| MailProcessor | System tray launcher for all Universal Mail Tools |
| UniversalDocsGrabber | Download documents and attachments from IMAP mail |
| UniversalInvoiceMail | Extract invoices and receipts from IMAP mail |
