offlineimaprc.sample 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. [general]
  2. # GPG quirks, leave unconfigured
  3. ui = ttyui
  4. # you can use any name as long as it matches the 'account1, 'account2' in the rest
  5. # of the file
  6. accounts = account1, account2
  7. # this is where the `gpg-pw.py` file is on disk
  8. pythonfile=~/where/is/the/file/gpg-pw.py
  9. fsync = False
  10. # you can call this any way you like
  11. [Account account1]
  12. localrepository = account1-local
  13. remoterepository = account1-remote
  14. # no need to touch this
  15. status_backend = sqlite
  16. [Account account2]
  17. localrepository = account2-local
  18. remoterepository = account2-remote
  19. status_backend = sqlite
  20. # thi sis a gmail account
  21. [Repository account1-local]
  22. type = Maildir
  23. # create with maildirmake or by hand by creating cur, new, tmp
  24. localfolders = ~/Mail/Mailboxes/account1
  25. # standard Gmail stuff
  26. nametrans = lambda folder: { 'drafts': '[Gmail]/Drafts',
  27. 'sent': '[Gmail]/Sent mail',
  28. 'flagged': '[Gmail]/Starred',
  29. 'trash': '[Gmail]/Trash',
  30. 'archive': '[Gmail]/All Mail'
  31. }.get(folder, folder)
  32. [Repository account1-remote]
  33. maxconnections = 1
  34. type = Gmail
  35. ssl=yes
  36. # for osx, you might need to download the certs by hand
  37. #sslcacertfile=~/Mail/certs.pem
  38. #sslcacertfile=~/Mail/imap.gmail.com.pem
  39. # sslcacertfile=/etc/ssl/cert.pem
  40. # or use Linux's standard certs
  41. sslcacertfile=/etc/ssl/certs/ca-certificates.crt
  42. # your account
  43. remoteuser = account1@gmail.com
  44. remotepasseval = get_pass(account="account1@gmail.com", server="imap.gmail.com", passwd_file="passwords-gmail.txt.gpg")
  45. realdelete = no
  46. createfolders = no
  47. nametrans = lambda folder: {'[Gmail]/Drafts': 'drafts',
  48. '[Gmail]/Sent Mail': 'sent',
  49. '[Gmail]/Starred': 'star',
  50. '[Gmail]/Trash': 'trash',
  51. '[Gmail]/All Mail': 'archive',
  52. }.get(folder, folder)
  53. folderfilter = lambda folder: folder not in ['[Gmail]/Trash',
  54. '[Gmail]/Spam',
  55. ]
  56. [Repository account2-remote]
  57. # copy the stanza above, change the 'account' parameter of get_pass, etc.