-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmbsyncrc
211 lines (174 loc) · 4.78 KB
/
mbsyncrc
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
# -*-conf-*-
# mbsync applies some (think "familiar") metaphors to
# email delivery.
# - (CSP) channels
# - (git) push/pull
#
# misc. notes:
#
# ~ for the Gmail setup, it's necessary to use a webui
# in order to disable non-email-specific auth methods
# ~ INBOX is NOT relative to Path for maildir (file-system)
#
############################################################
### globals ##
BufferLimit 10M # default
### accounts ##
## fastmail
IMAPAccount "fastmail"
Host imap.fastmail.com
# SSLType -> defaults IMAPS |-> 993 IMAP |-> 143
Port 993
## modify this to be your gmail username
User [email protected]
####### password input options
#### prompt for password
## the silent '-s' is not recognized by dash via mbsync
# PassCmd +"read -s -p 'gmail password: ' PASS && echo -n $PASS"
# PassCmd +"read -p 'gmail password: ' PASS && echo -n $PASS"
## this attempt to hide password doesn't work with mbsync
# PassCmd +"echo -n 'gmail password: ' && stty_orig=`stty -g` && stty -echo && read PASS && stty $stty_orig && echo -n $PASS"
#### read from file
## modify path as necessary. file should _not_ contain a newline.
PassCmd "cat ~/.config/email/fastmailpass"
#######
AuthMechs LOGIN # default * # glob depends on SSLType
SSLType IMAPS # default STARTTLS
# error strings from openssl if set contrary to system deps
SSLVersions TLSv1 # default TLSv1 # SSLv2 | "strongly discourged" # SSLv3
SystemCertificates no # default yes
CertificateFile ~/.fastmail.crt
## gmail
IMAPAccount "gmail"
Host imap.gmail.com
# SSLType -> defaults IMAPS |-> 993 IMAP |-> 143
Port 993
## modify this to be your gmail username
User auvergnerw
####### password input options
#### prompt for password
## the silent '-s' is not recognized by dash via mbsync
# PassCmd +"read -s -p 'gmail password: ' PASS && echo -n $PASS"
# PassCmd +"read -p 'gmail password: ' PASS && echo -n $PASS"
## this attempt to hide password doesn't work with mbsync
# PassCmd +"echo -n 'gmail password: ' && stty_orig=`stty -g` && stty -echo && read PASS && stty $stty_orig && echo -n $PASS"
#### read from file
## modify path as necessary. file should _not_ contain a newline.
PassCmd "cat ~/.config/email/gmailpass"
#######
AuthMechs LOGIN # default * # glob depends on SSLType
SSLType IMAPS # default STARTTLS
# error strings from openssl if set contrary to system deps
SSLVersions TLSv1 # default TLSv1 # SSLv2 | "strongly discourged" # SSLv3
SystemCertificates no # default yes
CertificateFile ~/.gmail.crt
############################################################
### stores ##
## file-system
MaildirStore "source"
Path "~/mail/mbsync/in/"
INBOX "~/mail/mbsync/in/Inbox"
# # date filtered .. use MaxMessages in chan
# MaildirStore "recent"
# Path "~/mail/mbsync/recent"
# # noise filtered
# Path "~/Mail/mbsync/quiet"
# -- sink
# -- mua aggregator
MaildirStore "neomutt"
Path "~/mail/mutt/"
INBOX "~/mail/mutt/Inbox"
Flatten .
Trash "Trash" # for unidirectional flow
MaildirStore "alpine"
Path "~/mail/pine/mbsync/"
INBOX "~/mail/pine/mbsync/Inbox"
Trash "Trash" # for unidirectional flow
# # defaults
# TrashRemoteNew no
## elsewhere
# inbox (all messages)
IMAPStore "source-gmail"
Account "gmail"
# INBOX -- # implicit (configured server-side)
# Path "[Gmail]" # configured server-side
### for gmail, perhaps
# "[Gmail]/All Mail"
# "[Gmail]/Sent Mail"
# "[Gmail]/Starred"
Flatten .
IMAPStore "source-gmail-sent"
Account "gmail"
# Path "[Gmail]/Sent Mail"
# Flatten .
IMAPStore "source-fastmail"
Account "fastmail"
Flatten .
############################################################
### channels ##
# grab inital state from the remote
Channel "gmail-clone"
Master ":source-gmail:INBOX"
Slave :source:
Sync Pull
Create Slave
CopyArrivalDate Yes
Channel "gmail-clone-sent"
Master :source-gmail-sent:"[Gmail]/Sent Mail"
Slave :source:sent
Sync Pull
Create Slave
CopyArrivalDate Yes
Channel "mutt-clone"
Master :source:
Slave :neomutt:
Sync Pull
Create Slave
CopyArrivalDate Yes
Channel "mutt-clone-sent"
Master :source:sent
Slave :neomutt:
Sync Pull
Create Slave
CopyArrivalDate Yes
Channel "fastmail-clone"
Master ":source-fastmail:INBOX"
Slave :source:
Sync Pull
Create Slave
CopyArrivalDate Yes
# pull state changes from remote
Channel "gmail-fetch"
Master ":source-gmail:INBOX"
Slave :source:
Sync PullNew
Channel "gmail-fetch-sent"
Master :source-gmail-sent:"[Gmail]/Sent Mail"
Slave :source:sent
Sync PullNew
Channel "mutt-fetch"
Master :source:
Slave :neomutt:
Sync PullNew
Channel "mutt-fetch-sent"
Master :source:sent
Slave :neomutt:
Sync PullNew
Channel "fastmail-fetch"
Master ":source-fastmail:INBOX"
Slave :source:
Sync PullNew
### groups # keyboard shortcuts
Group "init"
Channel gmail-clone
Channel gmail-clone-sent
# .
# .
# .
Group "init-mutt"
Channel mutt-clone
Channel mutt-clone-sent
Group "get"
Channel fastmail-fetch
Channel mutt-fetch
Channel mutt-fetch-sent