File: mailsync

package info (click to toggle)
mailsync 5.2.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, squeeze
  • size: 772 kB
  • ctags: 187
  • sloc: cpp: 2,103; ansic: 107; makefile: 86; sh: 9
file content (240 lines) | stat: -rw-r--r-- 5,592 bytes parent folder | download
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
# adapt this file to your needs and move it to
# $HOME/.mailsync
#
# This is my first try at a commented configuration
# file. If you have some other pertinent examples
# f.ex. for special configurations or for a mailserver
# that needs some tweaks then please mail them to me.
#
# Tomas Pospisek <tpo_deb@sourcepole.ch>
#
# see also:
# [1] /usr/share/doc/mailsync/README
# [2] /usr/share/doc/libc-client-ssl2001/naming.txt.gz
# [3] rfc2060

######################################################
#               Store declarations
######################################################

#
# Get all mail from the "example.org" IMAPS (IMAP over SSL)
# server for the user "tpo" (IMAP is the default transport).
#
# WARNING: I STONGLY advice against not validating the SSL
#          certificate. Depending on your setup, a
#          man-in-the-middle attack can be very easy to
#          produce and YOU WILL NOT NOTICE.
#
#          Better get the SSL Certificate from the IMAP
#          server you are connecting to and install it
#          locally.
#
#          Here are some pointers on how to do it:
#          http://www.madboa.com/geek/pine-ssl/
#          http://tirian.magd.ox.ac.uk/~nick/openssl-certs/email.shtml
# 
# Get all the mailboxes that start with "INBOX." but do
# not recurse into subfolders. Before comparing mailboxes
# strip off "INBOX." form their name. When authentificating
# use "secret" as password.
#
# for the exact semantics of the server line see [2]
#
# (Can anybody lighten me up on what "ref" is?)
#
store cyrus-store {
	server	{example.org/user=tpo/ssl}
	ref	{example.org}
	pat	INBOX.%
	prefix  INBOX.
	passwd secret
}

#
# Same as above, but do not validate the SSL certificate.
#
# WARNING: I STONGLY advice against not validating the SSL
#          certificate. Depending on your setup, a
#          man-in-the-middle attack can be very easy to
#          produce and YOU WILL NOT NOTICE.
#
#          Better get the SSL Certificate from the IMAP
#          server you are connecting to and install it
#          locally.
#
#          Here are some pointers on how to do it:
#          http://www.madboa.com/geek/pine-ssl/
#          http://tirian.magd.ox.ac.uk/~nick/openssl-certs/email.shtml
# 
store cyrus-store-enable-man-in-the-middle {
	server	{example.org/user=tpo/ssl/novalidate-cert}
	ref	{example.org}
	pat	INBOX.%
	prefix  INBOX.
	passwd secret
}

#
# same as before but recurse into subfolders and do
# validate the SSL certificate
#
store other-cyrus-store {
	server	{example.org/user=tpo/ssl}
	ref	{example.org}
	pat	INBOX.*
	prefix  INBOX.
}

#
# *only* the inbox on a cyrus IMAP server
#
# no prefix! INBOX will be understood as such
# by mailsync!
#
store cyrus-inbox {
	server	{example.org/user=tpo}
	ref	{example.org}
	pat	INBOX
}

#
# courier INBOX over IMAP only
#
store courier-inbox {
	server	{example.org/user=tpo/imap/norsh}
	ref	{example.org}
	pat	INBOX
}

#
# all IMAP folders on courier INBOX over IMAP only
#
# (thanks to Holger Krull)
#
store courier-inbox-2 {
	server	{example.org/user=tpo/imap/norsh}
	ref	{example.org}
	pat	*
}

#
# "My Draft Folder" on a courier IMAP server
#
# this will ask you for the username and
# password since it's not given here
#
store courier-inbox {
	server	{example.org}
	ref	{example.org}
	pat	INBOX.My\ Draft\ Folder
}
#
# typical netscape or uw store
#
# only the contents of the folder sync will be
# transferred
#
store netscape-or-uw-store {
	server  {imap.cs.unc.edu/user=culver}
	ref     {imap.cs.unc.edu}
	pat     copy/%
	prefix  copy/
}

#
# accessing an MH inbox over ssh
#
# c-client will try to exec the following to
# get to the mails:
#
#       ssh example.org exec /etc/rimapd
#
# That means that you need to point /etc/imapd
# to s.th. sensible on the remote machine - i.e.:
#
# ln -s /usr/sbin/imapd /etc/rimapd
#
# See the c-client FAQ for more information
#
store mh-over-ssh-inbox {
        server {example.org/user=me/secure}
        ref {example.org}
        pat #mh/inbox
}

#
# local mail on a unix box contained
# in $HOME/Mail/localcopy
#
store local-directory-Mail {
	pat     Mail/localcopy/%
	prefix  Mail/
}

#
# local inbox in mh format
#
# Michale Krelin wrote:
# I use `mark +inbox all -sequence beforesync' before mailsyncing and
# `mark +inbox notbeforesync -add -sequence unseen` after.
#
store hacker {
        pat \#mh/inbox
        prefix \#mh/inbox
}

#
# local mail on a unix box contained
# in $HOME/mail/
#          ^^^^
#
store local-directory-mail {
	pat	mail/%
	prefix  mail/
}

#
# local mail in the INBOX
# that can be /var/spool/mail/USERNAME or in other
# standard inbox places
#
store local-inbox {
	pat	INBOX
}

#
# one specific folder in the $HOME/mail
# directory
#
store local-oliver {
	pat	mail/oliver
	prefix  mail/
}

######################################################
#               Channel declarations
######################################################

#
# Let's synchronize our local inbox with the cyrus inbox. The
# synchronization info is kept on the remote cyrus server and
# "secret" is used for authentication. When synchronizing
# mailsync will gladly skip all messages bigger than 80k
#
channel inbox-local-cyrus  local-inbox cyrus-inbox {
	msinfo	{example.org/user=tpo}INBOX.mailsync
	passwd  secret
	sizelimit 81920
}

#
# synchronize the mail contained on a netscape or uw
# imap server in the folder copy with our local mailfolder
# "$HOME/Mail/localcopy". Keep the synchronization info locally
# in "Mail/synchronization-info"
# 
#
channel dir-local mail local {
	msinfo	Mail/synchronization-info
}