aboutsummaryrefslogtreecommitdiff
path: root/.mbsyncrc
blob: 81a3dad12f6abbad6ae9d713058a3ea2fad70257 (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
# 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
TLSVersions +1.2 +1.3
Timeout 0

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

# Let's use ~/data/mail as the prefix for the local storage.
MaildirStore gmail-local
Path ~/data/mail/gmail/
Inbox ~/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
CopyArrivalDate yes

Channel gmail-all
Far :gmail-remote:"[Gmail]/Tot el correu"
Near :gmail-local:"All"
Create Both
Expunge None
Sync Pull
CopyArrivalDate yes

Channel gmail-sent
Far :gmail-remote:"[Gmail]/Enviats"
Near :gmail-local:"Sent"
Create Both
Expunge None
Sync Pull
CopyArrivalDate yes

# 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
AuthMechs Login

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 *
CopyArrivalDate yes

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

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

# And finally group everything here.

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

##
# 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 *
CopyArrivalDate yes