offlineimaprc 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [general]
  2. ui = ttyui
  3. accounts = Gmail
  4. pythonfile = ~/bin/getnetrc
  5. [Account Gmail]
  6. localrepository = Gmail-Local
  7. remoterepository = Gmail-Remote
  8. postsynchook = notmuch new
  9. [Repository Gmail-Local]
  10. type = Maildir
  11. localfolders = ~/Mail/Gmail
  12. nametrans = lambda folder: {'archive': '[Gmail]/All Mail',
  13. 'drafts': '[Gmail]/Drafts',
  14. 'important': '[Gmail]/Important',
  15. 'sent': '[Gmail]/Sent Mail',
  16. 'spam': '[Gmail]/Spam',
  17. 'starred': '[Gmail]/Starred',
  18. 'trash': '[Gmail]/Trash',
  19. }.get(folder, folder)
  20. [Repository Gmail-Remote]
  21. type = Gmail
  22. remoteusereval = get_login("offlineimap")
  23. remotepasseval = get_password("offlineimap")
  24. realdelete = no
  25. maxconnections = 3
  26. sslcacertfile = /etc/ssl/certs/ca-certificates.crt
  27. # https://bbs.archlinux.org/viewtopic.php?pid=1588425#p1588425
  28. auth_mechanisms = LOGIN
  29. # Translate to something reasonable on disk
  30. # Fuck yeah it's python.
  31. nametrans = lambda folder: {'[Gmail]/All Mail': 'archive',
  32. '[Gmail]/Drafts': 'drafts',
  33. '[Gmail]/Important': 'important',
  34. '[Gmail]/Sent Mail': 'sent',
  35. '[Gmail]/Spam': 'spam',
  36. '[Gmail]/Starred': 'starred',
  37. '[Gmail]/Trash': 'trash',
  38. }.get(folder, folder)
  39. # Only sync folders that return True from lamda
  40. # Fuck yeah it's python.
  41. folderfilter = lambda folder: folder in ['[Gmail]/All Mail',
  42. '[Gmail]/Drafts',
  43. '[Gmail]/Important',
  44. '[Gmail]/Sent Mail',
  45. '[Gmail]/Spam',
  46. '[Gmail]/Starred',
  47. '[Gmail]/Trash',
  48. 'ML/wmfall',
  49. 'ML/wikitech-l',
  50. 'ML/mediawiki-l',
  51. 'ML/ops',
  52. 'ML/github',
  53. 'ML/debian-devel',
  54. 'ML/debian-security',
  55. 'ML/debian-user',
  56. 'ML/debian-bugs',
  57. 'ML/coreboot',
  58. 'ML/unicode',
  59. 'CR',
  60. 'CI',
  61. 'pipelinebot',
  62. 'auto',
  63. 'task',
  64. 'INBOX',
  65. ]