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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
##
## OfflineIMAP Configuration
## ~/.offlineimaprc
##
## Weitian LI <liweitianux@gmail.com>
## 2015/02/03
##
## Reference:
## [1] ArchWiki - OfflineIMAP
## https://wiki.archlinux.org/index.php/OfflineIMAP
##
[general]
# Function 'mailpasswd': invoke gpg to decrypt passwords.
pythonfile = ~/.offlineimap/offlineimap.py
#
# List of accounts to be synced, separated by a comma.
accounts = gmail-aly, gmail-li, outlook-aly, outlook-li, sjtu, autistici
#accounts = outlook-aly, outlook-li, sjtu, autistici
#
# Control how many accuonts may be synced simulaneously
# NOTE: if you are using autorefresh and have more than one account,
# your must set this number to be >= to the number of accounts you
# have; since any given sync run never "finishes" due to a timer,
# you will never sync your additional accounts if this is 1.
maxsyncaccounts = 6
#
# UI: blinkenlights, ttyui, quiet (suppress anything but errors)
ui = TTY.TTYUI, Noninteractive.Basic, Noninteractive.Quiet
[Account example]
localrepository = example-local
remoterepository = example-remote
# Status cache
status_backend = sqlite
# Minutes between sycns
autorefresh = 15
# Number of quick-syncs between autorefreshes.
# Quick-syncs do not update if the only changes were to IMAP flags.
quick = 5
# pre and post sync hook to execute a external command.
#presynchook = imapfilter
#postsynchook = ~/.offlineimap/postsync.sh
#
[Repository example-local]
type = Maildir
localfolders = ~/Mail/example
#
[Repository example-remote]
# Remote repository can be IMAP or Gmail
type = IMAP
remotehost = imap.example.com
ssl = yes
sslcacertfile = ~/.offlineimap/ca-certificates.crt
remoteport = 993
remoteuser = username@example.com
#remotepass = password
remotepasseval = mailpasswd("example")
# Hold the connection open, instead of closing the connection once
# a sync is complete. (unit: seconds)
keepalive = 60
# Keep connection open between refreshes.
holdconnectionopen = yes
[Account gmail-aly]
localrepository = gmail-aly-local
remoterepository = gmail-aly-remote
status_backend = sqlite
autorefresh = 30
quick = 5
postsynchook = ~/.offlineimap/postsync.sh
#
[Repository gmail-aly-local]
type = Maildir
localfolders = ~/Mail/gmail-aly
#
[Repository gmail-aly-remote]
type = Gmail
remoteuser = aaronly.me@gmail.com
remotepasseval = mailpasswd("gmail-aly")
keepalive = 60
holdconnectionopen = yes
sslcacertfile = ~/.offlineimap/ca-certificates.crt
# Not sync the 'All Mail' folder
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail']
[Account gmail-li]
localrepository = gmail-li-local
remoterepository = gmail-li-remote
status_backend = sqlite
autorefresh = 15
quick = 5
postsynchook = ~/.offlineimap/postsync.sh
#
[Repository gmail-li-local]
type = Maildir
localfolders = ~/Mail/gmail-li
#
[Repository gmail-li-remote]
type = Gmail
remoteuser = liweitianux@gmail.com
remotepasseval = mailpasswd("gmail-li")
keepalive = 60
holdconnectionopen = yes
sslcacertfile = ~/.offlineimap/ca-certificates.crt
# Not sync the 'All Mail' folder
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail']
[Account outlook-aly]
localrepository = outlook-aly-local
remoterepository = outlook-aly-remote
status_backend = sqlite
autorefresh = 30
quick = 5
postsynchook = ~/.offlineimap/postsync.sh
#
[Repository outlook-aly-local]
type = Maildir
localfolders = ~/Mail/outlook-aly
#
[Repository outlook-aly-remote]
type = IMAP
remotehost = imap-mail.outlook.com
ssl = yes
sslcacertfile = ~/.offlineimap/ca-certificates.crt
remoteport = 993
remoteuser = aaronly.me@outlook.com
remotepasseval = mailpasswd("outlook-aly")
keepalive = 60
holdconnectionopen = yes
[Account outlook-li]
localrepository = outlook-li-local
remoterepository = outlook-li-remote
status_backend = sqlite
autorefresh = 15
quick = 5
postsynchook = ~/.offlineimap/postsync.sh
#
[Repository outlook-li-local]
type = Maildir
localfolders = ~/Mail/outlook-li
#
[Repository outlook-li-remote]
type = IMAP
remotehost = imap-mail.outlook.com
ssl = yes
sslcacertfile = ~/.offlineimap/ca-certificates.crt
remoteport = 993
remoteuser = liweitianux@live.com
remotepasseval = mailpasswd("outlook-li")
keepalive = 60
holdconnectionopen = yes
[Account sjtu]
localrepository = sjtu-local
remoterepository = sjtu-remote
status_backend = sqlite
autorefresh = 15
quick = 5
postsynchook = ~/.offlineimap/postsync.sh
#
[Repository sjtu-local]
type = Maildir
localfolders = ~/Mail/sjtu
#
[Repository sjtu-remote]
type = IMAP
remotehost = imap.sjtu.edu.cn
ssl = yes
sslcacertfile = ~/.offlineimap/ca-certificates.crt
remoteport = 993
remoteuser = liweitianux@sjtu.edu.cn
remotepasseval = mailpasswd("sjtu")
keepalive = 60
holdconnectionopen = yes
[Account autistici]
localrepository = autistici-local
remoterepository = autistici-remote
status_backend = sqlite
autorefresh = 60
quick = 5
postsynchook = ~/.offlineimap/postsync.sh
#
[Repository autistici-local]
type = Maildir
localfolders = ~/Mail/autistici
#
[Repository autistici-remote]
type = IMAP
remotehost = mail.autistici.org
ssl = yes
sslcacertfile = ~/.offlineimap/autistici_ca.crt
remoteport = 993
remoteuser = liweitianux@autistici.org
remotepasseval = mailpasswd("autistici")
keepalive = 60
holdconnectionopen = yes
# Generate a muttrc fragment containing the mailboxes that it syncs.
# NOTE: add "source ~/.mutt/mailboxes" to "muttrc"
[mbnames]
enabled = yes
filename = ~/.mutt/mailboxes.offlineimap
header = "mailboxes "
peritem = "+%(accountname)s/%(foldername)s"
sep = " "
footer = "\n"
|