-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathofflineimaprc
61 lines (51 loc) · 1.79 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
[general]
accounts = main
maxsyncaccounts = 1
# gmail is the only server I use which has a broken and slow IMAP implementation
[Account main]
localrepository = main-local
remoterepository = main-remote
autorefresh = 0.5
quick = 10
# Local maildir folder
[Repository main-local]
type = Maildir
localfolders = ~/Mail
sep = .
restoreatime = no
maxconnections = 5
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail']
nametrans = lambda folder: re.sub('spam', '[Gmail].Spam',
re.sub('drafts', '[Gmail].Drafts',
re.sub('sent', '[Gmail].Sent Mail',
re.sub('starred', '[Gmail].Starred',
re.sub('trash', '[Gmail].Trash',
re.sub('important', '[Gmail].Important',
re.sub('archive', '[Gmail].All Mail',
re.sub('_', ' ', folder))))))))
# The remote server with the slow and broken IMAP
[Repository main-remote]
type = Gmail
keepalive = 60
holdconnectionopen = yes
ssl_version = tls1_2
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
realdelete = no
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail']
nametrans = lambda folder: re.sub(' ', '_',
re.sub('.*Spam$', 'spam',
re.sub('.*Drafts$', 'drafts',
re.sub('.*Sent Mail$', 'sent',
re.sub('.*Starred$', 'starred',
re.sub('.*Trash$', 'trash',
re.sub('.*Important$', 'important', folder)))))))
## For testing
#readonly = true
# Tell mutt about the folders we have
[mbnames]
enabled = yes
filename = ~/.mutt/mailboxes
header = "mailboxes "
peritem = "%(foldername)s"
sep = " "
footer = "\n"