- Use Python 3
- Adjust config.ini sample, rename to config.ini
- Set IMAP mailbox login configuration
- Decide to run single folder (recursive) or all folders
- Set operation mode (
[test]
|export
|delete
|detach
)
- Run
email_attachment_remover.py
- Run it on a fast Internet connection as it has to download all mails and attachments and partly upload it again
- Python Script: download all gmail attachments
- Stack Overflow: Python IMAP locate emails with attachments in INBOX and move them to a folder
- Strip attachments from an email message (Python recipe)
- IMAP mail server attachment handler (Python recipe)
- Github: imap_detach
- Automatically Download Email Attachments Using Python. (Python3)
- Python Script: imap-delete-attachments
- Fetch emails before a given date
- pymap-copy: Copy and transfer IMAP mailboxes