aboutsummaryrefslogtreecommitdiff
path: root/.mbsyncrc
blob: 96046aa7d1bb79fda3326a5b50a6c7c06679af19 (plain)
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# My credentials used to be encrypted via GPG symmetric keys, but that turned
# out to be quite tiresome. Luckily though, it seems that 'kwalletmanager' is
# actually quite nice, and 'kwallet-query' seems to work flawlessly. So
# everything is safe and fast.
#
# As for the version of mbsync, it has to be the latest, as versions prior to
# 1.3 where lacking support for fetching subdirectories, and that was simply a
# nightmare. That being said, even Debian stable has a version higher than this,
# so I'm probably just ranting on memories from the good ol' days.
#
# You could call this whole thing directly, but I have the special
# 'bin/fetch-email' script which does the job better. In the end it's a
# glorified one-liner that uses GNU parallel to sync each channel in parallel.

##
# GMail

IMAPAccount gmail
Host imap.gmail.com
User mikisabate@gmail.com
PassCmd "kwallet-query --read-password gmail kdewallet --folder email"
TLSType IMAPS
AuthMechs Login
CertificateFile /etc/ssl/ca-bundle.pem

# Use the account specified above as the remote storage.
IMAPStore gmail-remote
Account gmail

# Let's use /home/mssola/data/mail as the prefix for the local storage.
MaildirStore gmail-local
Path /home/mssola/data/mail/gmail/
Inbox /home/mssola/data/mail/gmail/inbox
SubFolders Verbatim

# We could have one only channel, and filter them through the Patterns
# directive. I prefer having multiple channels and then group them.

Channel gmail-inbox
Far :gmail-remote:
Near :gmail-local:
Patterns "INBOX"
Create Both
Expunge Both
Sync All
SyncState *

Channel gmail-all
Far :gmail-remote:"[Gmail]/Tot el correu"
Near :gmail-local:"All"
Create Both
Expunge Both
Sync All
SyncState *

Channel gmail-sent
Far :gmail-remote:"[Gmail]/Enviats"
Near :gmail-local:"Sent"
Create Both
Expunge Both
Sync All
SyncState *

# And finally group everything here.

Group gmail
Channel gmail-inbox
Channel gmail-all
Channel gmail-sent

##
# mailbox.org

MaildirStore mailbox-local
Subfolders Verbatim
Path "~/data/mail/mailbox/"
Inbox "~/data/mail/mailbox/inbox"
Trash "trash"

IMAPAccount mailbox
Host imap.mailbox.org
Port 993
User "mssola@mssola.com"
PassCmd "kwallet-query --read-password mailbox kdewallet --folder email"
TLSType IMAPS
TLSVersions +1.2 +1.3

IMAPStore mailbox-remote
Account mailbox

Channel mailbox-inbox
Far :mailbox-remote:
Near :mailbox-local:
Sync All
Expunge Both
Create Both
CopyArrivalDate yes

Channel mailbox-sent
Far :mailbox-remote:Sent
Near :mailbox-local:sent
Sync All
Expunge Both
Create Both
CopyArrivalDate yes

Channel mailbox-archive
Far :mailbox-remote:
Near :mailbox-local:
Pattern Archive/*
Sync All
Expunge Both
Create Both
CopyArrivalDate yes

Group mailbox
Channels mailbox-inbox mailbox-sent mailbox-archive

##
# suse.com

IMAPAccount comsuse
Host imap.gmail.com
User msabate@suse.com
PassCmd "kwallet-query --read-password susecom kdewallet --folder email"
TLSType IMAPS
AuthMechs Login
CertificateFile /etc/ssl/ca-bundle.pem

# Use the account specified above as the remote storage.
IMAPStore comsuse-remote
Account comsuse

# Let's use /home/mssola/data/mail as the prefix for the local storage.
MaildirStore comsuse-local
Path /home/mssola/data/mail/comsuse/
Inbox /home/mssola/data/mail/comsuse/inbox
SubFolders Verbatim

# We could have one only channel, and filter them through the Patterns
# directive. I prefer having multiple channels and then group them.

Channel comsuse-inbox
Far :comsuse-remote:
Near :comsuse-local:
Patterns "INBOX"
Create Both
Expunge Both
Sync All
SyncState *

Channel comsuse-all
Far :comsuse-remote:"[Gmail]/Tot el correu"
Near :comsuse-local:"All"
Create Both
Expunge Both
Sync All
SyncState *

Channel comsuse-sent
Far :comsuse-remote:"[Gmail]/Enviats"
Near :comsuse-local:"Sent"
Create Both
Expunge Both
Sync All
SyncState *

# And finally group everything here.

Group comsuse
Channel comsuse-inbox
Channel comsuse-all
Channel comsuse-sent

##
# ajuntament: notice that in this case the mailbox is configured to 'Pull' only
# and that deletions are not propagated. This is done to workaround the
# shamefully-low capacity given on this service, in a way that I have to
# periodically *remove everything* on the server. This is hence manually backed
# up.

IMAPAccount ajuntament
Host mail.diba.cat
User dibasp\\sabatesm
PassCmd "kwallet-query --read-password susede kdewallet --folder email"
TLSType IMAPS
AuthMechs Login
CertificateFile /etc/ssl/ca-bundle.pem
Timeout 0

IMAPStore ajuntament-remote
Account ajuntament

MaildirStore ajuntament-local
Path /home/mssola/data/mail/ajuntament/
Inbox /home/mssola/data/mail/ajuntament/inbox
SubFolders Verbatim

Channel ajuntament
Far :ajuntament-remote:
Near :ajuntament-local:
Patterns * !Calendar !Calendari/Aniversaris !"Elements suprimits/Archive" !Arxivats
Create None
Sync Pull New Flags
Expunge None
SyncState *

##
# cgtsuse.org

IMAPAccount sindicat
Host cgtsuse.org
User msabate@cgtsuse.org
PassCmd "kwallet-query --read-password susede kdewallet --folder email"
TLSType IMAPS
AuthMechs Login
CertificateFile /etc/ssl/ca-bundle.pem
Timeout 0

IMAPStore sindicat-remote
Account sindicat

MaildirStore sindicat-local
Path /home/mssola/data/mail/sindicat/
Inbox /home/mssola/data/mail/sindicat/inbox
SubFolders Verbatim

Channel sindicat
Far :sindicat-remote:
Near :sindicat-local:
Patterns * !Calendar !INBOX/Archive !INBOX/Drafts !INBOX/Sent !INBOX/Trash
Create None
Sync All
Expunge None
SyncState *

##
# uoc.edu

IMAPAccount uoc
Host imap.gmail.com
User mssola@uoc.edu
PassCmd "kwallet-query --read-password uoc kdewallet --folder email"
TLSType IMAPS
AuthMechs Login
CertificateFile /etc/ssl/ca-bundle.pem

# Use the account specified above as the remote storage.
IMAPStore uoc-remote
Account uoc

# Let's use /home/mssola/data/mail as the prefix for the local storage.
MaildirStore uoc-local
Path /home/mssola/data/mail/uoc/
Inbox /home/mssola/data/mail/uoc/inbox
SubFolders Verbatim

Channel uoc-inbox
Far :uoc-remote:
Near :uoc-local:
Patterns "INBOX"
Create Both
Expunge Both
Sync All
SyncState *

Channel uoc-all
Far :uoc-remote:"[Gmail]/Tot el correu"
Near :uoc-local:"All"
Create Both
Expunge Both
Sync All
SyncState *

Channel uoc-sent
Far :uoc-remote:"[Gmail]/Enviats"
Near :uoc-local:"Sent"
Create Both
Expunge Both
Sync All
SyncState *

# And finally group everything here.

Group uoc
Channel uoc-inbox
Channel uoc-all
Channel uoc-sent