Simple Node.js helper to automatically keep your IMAP inbox and trash folders clean.
- Inbox cleaner: Moves emails older than
xdays into an archive folder (e.g.,Archive/{YEAR}) - Trash cleaner: Deletes emails in the trash folder older than
xdays - Can be scheduled with a cron job
- Set the number of days to keep emails in each folder
- Optionally skip unseen or flagged emails
- Clone the repository
- Install dependencies:
npm install
Create your config files in the /config folder.
To clean your inbox, run:
npm run clean-inbox
# or directly with node:
node clean-inbox.jsTo clean your trash folder, run:
npm run clean-trash
# or directly with node:
node clean-trash.js