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