Skip to content

Sort email messages that were downloaded from GMail using getmail into folders based on GMail labels

Notifications You must be signed in to change notification settings

kgodey/gmailsort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GMail sorting scripts

These scripts help sort email messages that were downloaded from GMail using getmail 4.34.0+ into folders based on GMail labels. Currently, only the maildir format is supported. There are three scripts:

  • mailparse.py: This looks at all the e-mails in a maildir and returns a list of unique labels. I recommend running this before setting up the next two scripts. It takes one command line argument – the path to the maildir to be parsed.

  • sortchats.py: This sorts all the chats in a set of maildirs into one "Chats" folder. A group of origin directories and a destination directory is configurable via the gmailsort_settings.py file. See example_settings.py for more information.

  • mailsort.py: This sorts the emails in one origin maildir into folders based on labels. It needs a lot of configuration in gmailsort_settings.py please check out example_settings.py for more information.


This is a highly customised set of scripts, so please read the code carefully before using. That said, I'd like it to be more general purpose in the future – here are my todos:

  • Use a non-Python configuration file.
  • Make mailparse.py configurable.
  • Allow more options for destination maildirs.
  • Support mbox.

About

Sort email messages that were downloaded from GMail using getmail into folders based on GMail labels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages