config 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ##### My (demuredemeanor) offlineimaprc
  2. # Uses tabstop=4; shiftwidth=4 tabs; foldmarker={{{,}}};
  3. # https://notabug.org/demure/dotfiles
  4. # legacy repo http://github.com/demure/dotfiles
  5. # vim:set syntax=sh:
  6. ## This is heavily inspired by Mark H. Nichols's post
  7. # http://zanshin.net/2015/01/19/teaching-a-homely-mutt-new-tricks/
  8. #
  9. # which in turn was inspired by Steve Losh's post
  10. # http://stevelosh.com/blog/2012/10/the-homely-mutt/
  11. #
  12. # Aside from using my accounts, and eventually a few tweaks,
  13. # I am /not/ using OS X's keychain...
  14. # I am using pass now, which is working quite well
  15. # https://github.com/sup-heliotrope/sup/wiki/Securely-Store-Password
  16. ### Main Settings ### {{{
  17. [general]
  18. #ui = ttyui
  19. ui = blinkenlights
  20. ## ui = quiet
  21. #accounts = emu,sdf,gmail,vps
  22. accounts = sdf,gmail,vps
  23. pythonfile=~/.config/neomutt/offlineimap.py
  24. fsync = False
  25. ### End Main ### }}}
  26. ### sdf ### {{{
  27. [Account sdf]
  28. localrepository = sdf-Local
  29. remoterepository = sdf-Remote
  30. postsynchook = [ -e $HOME/.notmuch-config ] && notmuch new
  31. [Repository sdf-Local]
  32. type = Maildir
  33. localfolders = ~/.mail/sdf
  34. [Repository sdf-Remote]
  35. ## This is set due to an annoying error by the exparimental xoauth2
  36. # https://bbs.archlinux.org/viewtopic.php?id=206424
  37. auth_mechanisms = GSSAPI, CRAM-MD5, PLAIN, LOGIN
  38. maxconnections = 3
  39. type = IMAP
  40. remoteuser = demure
  41. remotehost = ma.sdf.org
  42. remoteport = 993
  43. ssl = yes
  44. ## temp setting due to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907079
  45. ## Left in place due to issue with MA cert size?
  46. ssl_version = tls1_2
  47. sslcacertfile = /etc/ssl/certs/ca-certificates.crt
  48. remotepasseval = get_pass("mail-sdf-imap")
  49. realdelete = True
  50. ### End sdf ### }}}
  51. ### vps ### {{{
  52. [Account vps]
  53. localrepository = vps-Local
  54. remoterepository = vps-Remote
  55. postsynchook = [ -e $HOME/.notmuch-config ] && notmuch new
  56. [Repository vps-Local]
  57. type = Maildir
  58. localfolders = ~/.mail/vps
  59. [Repository vps-Remote]
  60. maxconnections = 3
  61. type = IMAP
  62. remoteuser = demure@demu.red
  63. remotehost = mail.gandi.net
  64. remoteport = 993
  65. ssl = yes
  66. sslcacertfile = /etc/ssl/certs/ca-certificates.crt
  67. remotepasseval = get_pass("mail-vps")
  68. realdelete = True
  69. ### End vps ### }}}
  70. ### gmail ### {{{
  71. [Account gmail]
  72. localrepository = gmail-Local
  73. remoterepository = gmail-Remote
  74. ## Needs GmailMaildir set
  75. synclabels = yes
  76. ## Where sync labels are stored
  77. labelsheader = X-Keywords
  78. postsynchook = [ -e $HOME/.notmuch-config ] && notmuch new
  79. [Repository gmail-Local]
  80. type = GmailMaildir
  81. localfolders = ~/.mail/gmail
  82. nametrans = lambda folder: {'drafts': '[Gmail]/Drafts',
  83. 'sent': '[Gmail]/Sent Mail',
  84. 'flagged': '[Gmail]/Starred',
  85. 'trash': '[Gmail]/Trash',
  86. 'archive': '[Gmail]/All Mail',
  87. }.get(folder, folder)
  88. [Repository gmail-Remote]
  89. ## This is set due to an annoying error by the exparimental xoauth2
  90. # https://bbs.archlinux.org/viewtopic.php?id=206424
  91. auth_mechanisms = GSSAPI, CRAM-MD5, PLAIN, LOGIN
  92. maxconnections = 1
  93. type = Gmail
  94. remoteuser = demuredemeanor@gmail.com
  95. ssl_version = tls1_2
  96. ssl = yes
  97. sslcacertfile = /etc/ssl/certs/ca-certificates.crt
  98. remotepasseval = get_pass("mail-gmail")
  99. ## This setting removes mail for good, default of 'no' just strips gmail label (think inbox)
  100. realdelete = True
  101. nametrans = lambda folder: {'[Gmail]/Drafts': 'drafts',
  102. '[Gmail]/Sent Mail': 'sent',
  103. '[Gmail]/Starred': 'flagged',
  104. '[Gmail]/Trash': 'trash',
  105. '[Gmail]/All Mail': 'archive',
  106. }.get(folder, folder)
  107. folderfilter = lambda folder: folder in ['[Gmail]/Drafts',
  108. '[Gmail]/Sent Mail',
  109. '[Gmail]/Starred',
  110. '[Gmail]/Trash',
  111. '[Gmail]/All Mail',
  112. 'INBOX',
  113. 'People',
  114. 'Orders',
  115. 'Bulletin',
  116. ]
  117. ### End gmail ### }}}