Skip to content

Strip attachments from local mbox files

License

Notifications You must be signed in to change notification settings

benradey/emailstripper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emailstripper

Extract attachments from local mbox files.

The goal is to reduce the size of the mbox file and store attachments you want to keep separately.

My use case is preparing the mbox files I got from Gmail with Google Takeout for storage. I extract the attachments and remove those I don't need to keep.

The code is written in Python and it:

  • walks over mbox files in a directory
  • walks over messages in an mbox file
  • finds attachments larger than a certain size (currently 200 kB hardcoded)
  • stores the attachment to a folder
  • replaces the attachment in the message with a line of text
  • replaces the message in the mbox file

About

Strip attachments from local mbox files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%