Skip to content

Instantly share code, notes, and snippets.

@CGenie
Created January 30, 2019 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CGenie/382b67f1cb52e143772d72bae02256c9 to your computer and use it in GitHub Desktop.
Save CGenie/382b67f1cb52e143772d72bae02256c9 to your computer and use it in GitHub Desktop.
offlineimaprc
[general]
accounts = gg
maxsyncaccounts = 3
[Account gg]
localrepository = gg-Local
remoterepository = gg-Remote
synclabels = yes
#autorefresh = 1
#quick = 5
presynchook = /config/presync.sh gg
postsynchook = /config/postsync.sh gg
[Repository gg-Local]
type = GmailMaildir
localfolders = /mnt/mail/gg
sync_deletes = yes
nametrans = lambda folder: {'archive': '[Gmail]/All Mail', 'Trash': '[Gmail]/Trash'}.get(folder, folder)
[Repository gg-Remote]
type = Gmail
remoteuser = ***
sync_deletes = yes
expunge = yes
realdelete = yes
oauth2_client_id = ***
oauth2_client_secret = ***
oauth2_request_url = ***
oauth2_refresh_token = ***
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
ssl_version = tls1_2
folderfilter = lambda foldername: foldername not in ['[Gmail]/Drafts', '[Gmail]/Important', '[Gmail]/Sent Mail', '[Gmail]/Spam', '[Gmail]/Starred']
nametrans = lambda foldername: {'[Gmail]/All Mail': 'archive', '[Gmail]/Trash': 'Trash'}.get(foldername, foldername)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment