]> code.delx.au - offlineimap/blob - offlineimap.conf
Re-scan list of remote folders on each sync
[offlineimap] / offlineimap.conf
1 # Sample configuration file
2 # Copyright (C) 2002-2005 John Goerzen
3 # <jgoerzen@complete.org>
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 # Looking for a quick start? Take a look at offlineimap.conf.minimal.
20
21
22 ##################################################
23 # General definitions
24 ##################################################
25
26 [general]
27
28 # This specifies where offlineimap is to store its metadata.
29 # This directory will be created if it does not already exist.
30
31 metadata = ~/.offlineimap
32
33 # This variable specifies which accounts are defined. Separate them
34 # with commas. Account names should be alphanumeric only.
35 # You will need to specify one section per account below. You may
36 # not use "general" for an account name.
37 #
38
39 accounts = Test
40
41 # Offlineimap can synchronize more the one account at a time. If you
42 # want to enable this feature, set the below value to something
43 # greater than 1. To force it to synchronize only one account at a
44 # time, set it to 1.
45 #
46
47 maxsyncaccounts = 1
48
49 # You can specify one or more user interface modules for OfflineIMAP
50 # to use. OfflineIMAP will try the first in the list, and if it
51 # fails, the second, and so forth.
52 #
53 # The pre-defined options are:
54 # Curses.Blinkenlights -- A text-based (terminal) interface similar to
55 # Tk.Blinkenlights
56 # TTY.TTYUI -- a text-based (terminal) interface
57 # Noninteractive.Basic -- Noninteractive interface suitable for cronning
58 # Noninteractive.Quiet -- Noninteractive interface, generates no output
59 # except for errors.
60 #
61 # You can override this with a command-line option -u.
62
63 ui = Curses.Blinkenlights, TTY.TTYUI,
64 Noninteractive.Basic, Noninteractive.Quiet
65
66 # If you try to synchronize messages to a read-only folder,
67 # OfflineIMAP will generate a warning. If you want to suppress these
68 # warnings, set ignore-readonly to yes. Read-only IMAP folders allow
69 # reading but not modification, so if you try to change messages in
70 # the local copy of such a folder, the IMAP server will prevent
71 # OfflineIMAP from propogating those changes to the IMAP server.
72
73 ignore-readonly = no
74
75 ########## Advanced settings
76
77 # You can give a Python source filename here and all config file
78 # python snippets will be evaluated in the context of that file.
79 # This allows you to e.g. define helper functions in the Python
80 # source file and call them from this config file. You can find
81 # an example of this in the manual.
82 #
83 # pythonfile = ~/.offlineimap.py
84 #
85
86 # By default, OfflineIMAP will not exit due to a network error until
87 # the operating system returns an error code. Operating systems can sometimes
88 # take forever to notice this. Here you can activate a timeout on the
89 # socket. This timeout applies to individual socket reads and writes,
90 # not to an overall sync operation. You could perfectly well have a 30s
91 # timeout here and your sync still take minutes.
92 #
93 # Values in the 30-120 second range are reasonable.
94 #
95 # The default is to have no timeout beyond the OS. Times are given in seconds.
96 #
97 # socktimeout = 60
98
99 ##################################################
100 # Mailbox name recorder
101 ##################################################
102
103 [mbnames]
104
105 # offlineimap can record your mailbox names in a format you specify.
106 # You can define the header, each mailbox item, the separator,
107 # and the footer. Here is an example for Mutt.
108 # If enabled is yes, all six setting must be specified, even if they
109 # are just the empty string "".
110 #
111 # The header, peritem, sep, and footer are all Python expressions passed
112 # through eval, so you can (and must) use Python quoting.
113
114 enabled = no
115 filename = ~/Mutt/muttrc.mailboxes
116 header = "mailboxes "
117 peritem = "+%(accountname)s/%(foldername)s"
118 sep = " "
119 footer = "\n"
120
121 # You can also specify a folderfilter. It will apply to the
122 # *translated* folder name here, and it takes TWO arguments:
123 # accountname and foldername. In all other ways, it will
124 # behave identically to the folderfilter for accounts. Please see
125 # that section for more information and examples.
126 #
127 # Note that this filter can be used only to further restrict mbnames
128 # to a subset of folders that pass the account's folderfilter.
129
130 ##################################################
131 # Accounts
132 ##################################################
133
134 # This is an account definition clause. You'll have one of these
135 # for each account listed in general/accounts above.
136
137 [Account Test]
138 ########## Basic settings
139
140 # These settings specify the two folders that you will be syncing.
141 # You'll need to have a "Repository ..." section for each one.
142
143 localrepository = LocalExample
144 remoterepository = RemoteExample
145
146 ########## Advanced settings
147
148 # You can have offlineimap continue running indefinately, automatically
149 # syncing your mail periodically. If you want that, specify how
150 # frequently to do that (in minutes) here. You can also specify
151 # fractional minutes (ie, 3.25).
152
153 # autorefresh = 5
154
155 [Repository LocalExample]
156
157 # This is one of the two repositories that you'll work with given the
158 # above example. Each repository requires a "type" declaration.
159 #
160 # The types supported are Maildir and IMAP.
161 #
162
163 type = Maildir
164
165 # Specify local repository. Your IMAP folders will be synchronized
166 # to maildirs created under this path. OfflineIMAP will create the
167 # maildirs for you as needed.
168
169 localfolders = ~/Test
170
171 # You can specify the "path separator character" used for your Maildir
172 # folders. This is inserted in-between the components of the tree.
173 # It defaults to ".". If you want your Maildir folders to be nested,
174 # set it to "/".
175
176 sep = .
177
178 # Some users on *nix platforms may not want the atime (last access
179 # time) to be modified by OfflineIMAP. In these cases, they would
180 # want to set restoreatime to yes. OfflineIMAP will make an effort
181 # to not touch the atime if you do that.
182 #
183 # In most cases, the default of no should be sufficient.
184
185 restoreatime = no
186
187 [Repository RemoteExample]
188
189 # And this is the remote repository. For now, we only support IMAP here.
190
191 type = IMAP
192
193 # Specify the remote hostname.
194 remotehost = examplehost
195
196 # Whether or not to use SSL.
197 ssl = yes
198
199 # Specify the port. If not specified, use a default port.
200 # remoteport = 993
201
202 # Specify the remote user name.
203 remoteuser = username
204
205 # There are four ways to specify the password for the remote IMAP
206 # server:
207 #
208 # 1. No password at all specified in the config file. You will
209 # be prompted for the password when OfflineIMAP starts.
210 #
211 # 2. The remote password stored in this file with the remotepass
212 # option. Example:
213 #
214 # remotepass = mypassword
215 #
216 # 3. The remote password stored as a single line in an external
217 # file, which is referenced by the remotefile option. Example:
218 #
219 # remotepassfile = ~/Password.IMAP.Account1
220 #
221 # 4. With a preauth tunnel. With this method, you invoke an external
222 # program that is guaranteed *NOT* to ask for a password, but rather
223 # to read from stdin and write to stdout an IMAP procotol stream
224 # that begins life in the PREAUTH state. When you use a tunnel,
225 # you do NOT specify a user or password (if you do, they'll be
226 # ignored.) Instead, you specify a preauthtunnel, as this
227 # example illustrates for Courier IMAP on Debian:
228 #
229 # preauthtunnel = ssh -q imaphost '/usr/bin/imapd ./Maildir'
230 #
231
232 ########## Advanced settings
233
234 # Some IMAP servers need a "reference" which often refers to the
235 # "folder root". This is most commonly needed with UW IMAP, where
236 # you might need to specify the directory in which your mail is
237 # stored. Most users will not need this.
238 #
239 # reference = Mail
240
241 # OfflineIMAP can use multiple connections to the server in order
242 # to perform multiple synchronization actions simultaneously.
243 # This may place a higher burden on the server. In most cases,
244 # setting this value to 2 or 3 will speed up the sync, but in some
245 # cases, it may slow things down. The safe answer is 1. You should
246 # probably never set it to a value more than 5.
247
248 maxconnections = 1
249
250 # OfflineIMAP normally closes IMAP server connections between refreshes if
251 # the global option autorefresh is specified. If you wish it to keep the
252 # connection open, set this to true. If not specified, the default is
253 # false. Keeping the connection open means a faster sync start the
254 # next time and may use fewer server resources on connection, but uses
255 # more server memory. This setting has no effect if autorefresh is not set.
256
257 holdconnectionopen = no
258
259 # If you want to have "keepalives" sent while waiting between syncs,
260 # specify the amount of time IN SECONDS between keepalives here. Note that
261 # sometimes more than this amount of time might pass, so don't make it
262 # tight. This setting has no effect if autorefresh and holdconnectionopen
263 # are not both set.
264
265 # keepalive = 60
266
267 # Normally, OfflineIMAP will expunge deleted messages from the server.
268 # You can disable that if you wish. This means that OfflineIMAP will
269 # mark them deleted on the server, but not actually delete them.
270 # You must use some other IMAP client to delete them if you use this
271 # setting; otherwise, the messgaes will just pile up there forever.
272 # Therefore, this setting is definately NOT recommended.
273 #
274 # expunge = no
275 # You can specify a folder translator. This must be a eval-able
276 # Python expression that takes a foldername arg and returns the new
277 # value. I suggest a lambda. This example below will remove "INBOX." from
278 # the leading edge of folders (great for Courier IMAP users)
279 #
280 # WARNING: you MUST construct this such that it NEVER returns
281 # the same value for two folders, UNLESS the second values are
282 # filtered out by folderfilter below. Failure to follow this rule
283 # will result in undefined behavior
284 #
285 # nametrans = lambda foldername: re.sub('^INBOX\.', '', foldername)
286
287 # Using Courier remotely and want to duplicate its mailbox naming
288 # locally? Try this:
289 #
290 # nametrans = lambda foldername: re.sub('^INBOX\.*', '.', foldername)
291
292 # You can specify which folders to sync. You can do it several ways.
293 # I'll provide some examples. The folderfilter operates on the
294 # *UNTRANSLATED* name, if you specify nametrans. It should return
295 # true if the folder is to be included; false otherwise.
296 #
297 # Example 1: synchronizing only INBOX and Sent.
298 #
299 # folderfilter = lambda foldername: foldername in ['INBOX', 'Sent']
300 #
301 # Example 2: synchronizing everything except Trash.
302 #
303 # folderfilter = lambda foldername: foldername not in ['Trash']
304 #
305 # Example 3: Using a regular expression to exclude Trash and all folders
306 # containing the characters "Del".
307 #
308 # folderfilter = lambda foldername: not re.search('(^Trash$|Del)', foldername)
309 #
310 # If folderfilter is not specified, ALL remote folders will be
311 # synchronized.
312 #
313 # You can span multiple lines by indenting the others. (Use backslashes
314 # at the end when required by Python syntax) For instance:
315 #
316 # folderfilter = lambda foldername: foldername in
317 # ['INBOX', 'Sent Mail', 'Deleted Items',
318 # 'Received']
319 #
320 # FYI, you could also include every folder with:
321 #
322 # folderfilter = lambda foldername: 1
323 #
324 # And exclude every folder with:
325 #
326 # folderfilter = lambda foldername: 0
327
328 # You can specify folderincludes to include additional folders.
329 # It should return a Python list. This might be used to include a
330 # folder that was excluded by your folderfilter rule, to include a
331 # folder that your server does not specify with its LIST option, or
332 # to include a folder that is outside your basic reference. Some examples:
333 #
334 # To include debian.user and debian.personal:
335 #
336 # folderincludes = ['debian.user', 'debian.personal']
337 #
338 # To include your INBOX (UW IMAPd users will find this useful if they
339 # specify a reference):
340 #
341 # folderincludes = ['INBOX']
342 #
343 # To specify a long list:
344 #
345 # folderincludes = ['box1', 'box2', 'box3', 'box4',
346 # 'box5', 'box6']
347
348 # You can specify foldersort to determine how folders are sorted.
349 # This affects order of synchronization and mbnames. The expression
350 # should return -1, 0, or 1, as the default Python cmp() does. The
351 # two arguments, x and y, are strings representing the names of the folders
352 # to be sorted. The sorting is applied *AFTER* nametrans, if any.
353 #
354 # To reverse the sort:
355 #
356 # foldersort = lambda x, y: -cmp(x, y)
357