Skip to content

Instantly share code, notes, and snippets.

@jcayzac
Created October 22, 2013 01:54
Show Gist options
  • Select an option

  • Save jcayzac/7094030 to your computer and use it in GitHub Desktop.

Select an option

Save jcayzac/7094030 to your computer and use it in GitHub Desktop.
Export GMail inbox messages as EML files
118 messages to export:
curl -s -L -b "$GMAIL_COOKIE" 'https://mail.google.com/mail/h/?st=[0-100:100]' | grep -Eo 'th=[0-9a-f]+"' | while read LINE; do echo >&2 -n '.' ; curl -s -L -b "$GMAIL_COOKIE" "https://mail.google.com/mail/h/1khzd2wj8gtee/?&v=om&th=${LINE:3:16}" | tr -d '\r' >"$(uuidgen).eml" ; done
…then drag'n'drop to a Thunderbird folder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment