]> code.delx.au - offlineimap/blob - offlineimap.conf
Merge branch 'master' of http://git.complete.org/offlineimap
[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 # Note: if you are using autorefresh and have more than one account,
47 # you must set this number to be >= to the number of accounts you have;
48 # since any given sync run never "finishes" due to a timer, you will never
49 # sync your additional accounts if this is 1.
50
51 maxsyncaccounts = 1
52
53 # You can specify one or more user interface modules for OfflineIMAP
54 # to use. OfflineIMAP will try the first in the list, and if it
55 # fails, the second, and so forth.
56 #
57 # The pre-defined options are:
58 # Curses.Blinkenlights -- A text-based (terminal) interface similar to
59 # Tk.Blinkenlights
60 # TTY.TTYUI -- a text-based (terminal) interface
61 # Noninteractive.Basic -- Noninteractive interface suitable for cronning
62 # Noninteractive.Quiet -- Noninteractive interface, generates no output
63 # except for errors.
64 # Machine.MachineUI -- Interactive interface suitable for machine
65 # parsing.
66 #
67 # You can override this with a command-line option -u.
68
69 ui = Curses.Blinkenlights, TTY.TTYUI,
70 Noninteractive.Basic, Noninteractive.Quiet
71
72 # If you try to synchronize messages to a read-only folder,
73 # OfflineIMAP will generate a warning. If you want to suppress these
74 # warnings, set ignore-readonly to yes. Read-only IMAP folders allow
75 # reading but not modification, so if you try to change messages in
76 # the local copy of such a folder, the IMAP server will prevent
77 # OfflineIMAP from propagating those changes to the IMAP server.
78
79 ignore-readonly = no
80
81 ########## Advanced settings
82
83 # You can give a Python source filename here and all config file
84 # python snippets will be evaluated in the context of that file.
85 # This allows you to e.g. define helper functions in the Python
86 # source file and call them from this config file. You can find
87 # an example of this in the manual.
88 #
89 # pythonfile = ~/.offlineimap.py
90 #
91
92 # By default, OfflineIMAP will not exit due to a network error until
93 # the operating system returns an error code. Operating systems can sometimes
94 # take forever to notice this. Here you can activate a timeout on the
95 # socket. This timeout applies to individual socket reads and writes,
96 # not to an overall sync operation. You could perfectly well have a 30s
97 # timeout here and your sync still take minutes.
98 #
99 # Values in the 30-120 second range are reasonable.
100 #
101 # The default is to have no timeout beyond the OS. Times are given in seconds.
102 #
103 # socktimeout = 60
104
105 # By default, OfflineIMAP will use fsync() to force data out to disk at
106 # opportune times to ensure consistency. This can, however, reduce
107 # performance. Users where /home is on SSD (Flash) may also wish to reduce
108 # write cycles. Therefore, you can disable OfflineIMAP's use of fsync().
109 # Doing so will come at the expense of greater risk of message duplication
110 # in the event of a system crash or power loss. Default is fsync = true.
111 # Set fsync = false ot disable fsync.
112 #
113 # fsync = true
114
115 ##################################################
116 # Mailbox name recorder
117 ##################################################
118
119 [mbnames]
120
121 # offlineimap can record your mailbox names in a format you specify.
122 # You can define the header, each mailbox item, the separator,
123 # and the footer. Here is an example for Mutt.
124 # If enabled is yes, all six setting must be specified, even if they
125 # are just the empty string "".
126 #
127 # The header, peritem, sep, and footer are all Python expressions passed
128 # through eval, so you can (and must) use Python quoting.
129
130 enabled = no
131 filename = ~/Mutt/muttrc.mailboxes
132 header = "mailboxes "
133 peritem = "+%(accountname)s/%(foldername)s"
134 sep = " "
135 footer = "\n"
136
137 # You can also specify a folderfilter. It will apply to the
138 # *translated* folder name here, and it takes TWO arguments:
139 # accountname and foldername. In all other ways, it will
140 # behave identically to the folderfilter for accounts. Please see
141 # that section for more information and examples.
142 #
143 # Note that this filter can be used only to further restrict mbnames
144 # to a subset of folders that pass the account's folderfilter.
145
146 [ui.Curses.Blinkenlights]
147 # Character used to indicate thread status.
148
149 statuschar = .
150
151 ##################################################
152 # Accounts
153 ##################################################
154
155 # This is an account definition clause. You'll have one of these
156 # for each account listed in general/accounts above.
157
158 [Account Test]
159 ########## Basic settings
160
161 # These settings specify the two folders that you will be syncing.
162 # You'll need to have a "Repository ..." section for each one.
163
164 localrepository = LocalExample
165 remoterepository = RemoteExample
166
167 ########## Advanced settings
168
169 # You can have offlineimap continue running indefinitely, automatically
170 # syncing your mail periodically. If you want that, specify how
171 # frequently to do that (in minutes) here. You can also specify
172 # fractional minutes (ie, 3.25).
173
174 # autorefresh = 5
175
176 # You can tell offlineimap to do a number of quicker synchronizations
177 # between full updates. A quick synchronization only synchronizes
178 # if a Maildir folder has changed, or if an IMAP folder has received
179 # new messages or had messages deleted. It does not update if the
180 # only changes were to IMAP flags. Specify 0 to never do quick updates,
181 # -1 to always do quick updates, or a positive integer to do that many
182 # quick updates between each full synchronization (requires autorefresh).
183
184 # quick = 10
185
186 # You can specify a pre and post sync hook to execute a external command.
187 # in this case a call to imapfilter to filter mail before the sync process
188 # starts and a custom shell script after the sync completes.
189 # The pre sync script has to complete before a sync to the account will
190 # start.
191
192 # presynchook = imapfilter
193 # postsynchook = notifysync.sh
194
195 # You can also specify parameters to the commands
196 # presynchook = imapfilter -c someotherconfig.lua
197
198
199 [Repository LocalExample]
200
201 # This is one of the two repositories that you'll work with given the
202 # above example. Each repository requires a "type" declaration.
203 #
204 # The types supported are Maildir and IMAP.
205 #
206
207 type = Maildir
208
209 # Specify local repository. Your IMAP folders will be synchronized
210 # to maildirs created under this path. OfflineIMAP will create the
211 # maildirs for you as needed.
212
213 localfolders = ~/Test
214
215 # Specify whether to process all mail folders on the server, or only
216 # those listed as "subscribed".
217 subscribedonly = no
218
219 # You can specify the "path separator character" used for your Maildir
220 # folders. This is inserted in-between the components of the tree.
221 # It defaults to ".". If you want your Maildir folders to be nested,
222 # set it to "/".
223
224 sep = .
225
226 # Some users on *nix platforms may not want the atime (last access
227 # time) to be modified by OfflineIMAP. In these cases, they would
228 # want to set restoreatime to yes. OfflineIMAP will make an effort
229 # to not touch the atime if you do that.
230 #
231 # In most cases, the default of no should be sufficient.
232
233 restoreatime = no
234
235 [Repository RemoteExample]
236
237 # And this is the remote repository. We only support IMAP or Gmail here.
238
239 type = IMAP
240
241 # The following can fetch the account credentials via a python expression that
242 # is parsed from the pythonfile parameter. For example, a function called
243 # "getcredentials" that parses a file "filename" and returns the account
244 # details for "hostname".
245 # remotehosteval = getcredentials("filename", "hostname", "hostname")
246 # remoteusereval = getcredentials("filename", "hostname", "user")
247 # remotepasseval = getcredentials("filename", "hostname", "passwd")
248
249 # Specify the remote hostname.
250 remotehost = examplehost
251
252 # Whether or not to use SSL.
253 ssl = yes
254
255 # SSL Client certificate (optional)
256 # sslclientcert = /path/to/file.crt
257
258 # SSL Client key (optional)
259 # sslclientkey = /path/to/file.key
260
261 # Specify the port. If not specified, use a default port.
262 # remoteport = 993
263
264 # Specify the remote user name.
265 remoteuser = username
266
267 # There are five ways to give the password for the remote IMAP
268 # server:
269 #
270 # 1. No password at all specified in the config file. If a matching entry is
271 # found in ~/.netrc (see netrc (5) for information) the password from the
272 # matching entry will be used. If there is no ~/.netrc file but there is an
273 # /etc/netrc file, the password will instead be taken from there. Otherwise
274 # you will be prompted for the password when OfflineIMAP starts.
275 #
276 # 2. The remote password stored in this file with the remotepass
277 # option. Example:
278 #
279 # remotepass = mypassword
280 #
281 # 3. The remote password stored as a single line in an external
282 # file, which is referenced by the remotefile option. Example:
283 #
284 # remotepassfile = ~/Password.IMAP.Account1
285 #
286 # 4. With a preauth tunnel. With this method, you invoke an external
287 # program that is guaranteed *NOT* to ask for a password, but rather
288 # to read from stdin and write to stdout an IMAP procotol stream
289 # that begins life in the PREAUTH state. When you use a tunnel,
290 # you do NOT specify a user or password (if you do, they'll be
291 # ignored.) Instead, you specify a preauthtunnel, as this
292 # example illustrates for Courier IMAP on Debian:
293 #
294 # preauthtunnel = ssh -q imaphost '/usr/bin/imapd ./Maildir'
295 #
296 # 5. If you are using Kerberos and have the Python Kerberos package installed,
297 # you should not specify a remotepass. If the user has a valid
298 # Kerberos TGT, OfflineIMAP will figure out the rest all by itself, and
299 # fall back to password authentication if needed.
300
301 ########## Advanced settings
302
303 # Some IMAP servers need a "reference" which often refers to the
304 # "folder root". This is most commonly needed with UW IMAP, where
305 # you might need to specify the directory in which your mail is
306 # stored. Most users will not need this.
307 #
308 # reference = Mail
309
310 # In between synchronisations, OfflineIMAP can monitor mailboxes for new
311 # messages using the IDLE command. If you want to enable this, specify here
312 # the folders you wish to monitor. Note that the IMAP protocol requires a
313 # separate connection for each folder monitored in this way, so setting
314 # this option will force settings for:
315 # maxconnections - to be at least the number of folders you give
316 # holdconnectionopen - to be true
317 # keepalive - to be 29 minutes unless you specify otherwise
318 # This option should return a Python list. For example
319 #
320 # idlefolders = ['INBOX', 'INBOX.Alerts']
321 #
322
323 # OfflineIMAP can use multiple connections to the server in order
324 # to perform multiple synchronization actions simultaneously.
325 # This may place a higher burden on the server. In most cases,
326 # setting this value to 2 or 3 will speed up the sync, but in some
327 # cases, it may slow things down. The safe answer is 1. You should
328 # probably never set it to a value more than 5.
329
330 maxconnections = 1
331
332 # OfflineIMAP normally closes IMAP server connections between refreshes if
333 # the global option autorefresh is specified. If you wish it to keep the
334 # connection open, set this to true. If not specified, the default is
335 # false. Keeping the connection open means a faster sync start the
336 # next time and may use fewer server resources on connection, but uses
337 # more server memory. This setting has no effect if autorefresh is not set.
338
339 holdconnectionopen = no
340
341 # If you want to have "keepalives" sent while waiting between syncs,
342 # specify the amount of time IN SECONDS between keepalives here. Note that
343 # sometimes more than this amount of time might pass, so don't make it
344 # tight. This setting has no effect if autorefresh and holdconnectionopen
345 # are not both set.
346
347 # keepalive = 60
348
349 # Normally, OfflineIMAP will expunge deleted messages from the server.
350 # You can disable that if you wish. This means that OfflineIMAP will
351 # mark them deleted on the server, but not actually delete them.
352 # You must use some other IMAP client to delete them if you use this
353 # setting; otherwise, the messgaes will just pile up there forever.
354 # Therefore, this setting is definately NOT recommended.
355 #
356 # expunge = no
357 # You can specify a folder translator. This must be a eval-able
358 # Python expression that takes a foldername arg and returns the new
359 # value. I suggest a lambda. This example below will remove "INBOX." from
360 # the leading edge of folders (great for Courier IMAP users)
361 #
362 # WARNING: you MUST construct this such that it NEVER returns
363 # the same value for two folders, UNLESS the second values are
364 # filtered out by folderfilter below. Failure to follow this rule
365 # will result in undefined behavior
366 #
367 # nametrans = lambda foldername: re.sub('^INBOX\.', '', foldername)
368
369 # Using Courier remotely and want to duplicate its mailbox naming
370 # locally? Try this:
371 #
372 # nametrans = lambda foldername: re.sub('^INBOX\.*', '.', foldername)
373
374 # You can specify which folders to sync. You can do it several ways.
375 # I'll provide some examples. The folderfilter operates on the
376 # *UNTRANSLATED* name, if you specify nametrans. It should return
377 # true if the folder is to be included; false otherwise.
378 #
379 # Example 1: synchronizing only INBOX and Sent.
380 #
381 # folderfilter = lambda foldername: foldername in ['INBOX', 'Sent']
382 #
383 # Example 2: synchronizing everything except Trash.
384 #
385 # folderfilter = lambda foldername: foldername not in ['Trash']
386 #
387 # Example 3: Using a regular expression to exclude Trash and all folders
388 # containing the characters "Del".
389 #
390 # folderfilter = lambda foldername: not re.search('(^Trash$|Del)', foldername)
391 #
392 # If folderfilter is not specified, ALL remote folders will be
393 # synchronized.
394 #
395 # You can span multiple lines by indenting the others. (Use backslashes
396 # at the end when required by Python syntax) For instance:
397 #
398 # folderfilter = lambda foldername: foldername in
399 # ['INBOX', 'Sent Mail', 'Deleted Items',
400 # 'Received']
401 #
402 # FYI, you could also include every folder with:
403 #
404 # folderfilter = lambda foldername: 1
405 #
406 # And exclude every folder with:
407 #
408 # folderfilter = lambda foldername: 0
409
410 # You can specify folderincludes to include additional folders.
411 # It should return a Python list. This might be used to include a
412 # folder that was excluded by your folderfilter rule, to include a
413 # folder that your server does not specify with its LIST option, or
414 # to include a folder that is outside your basic reference. Some examples:
415 #
416 # To include debian.user and debian.personal:
417 #
418 # folderincludes = ['debian.user', 'debian.personal']
419 #
420 # To include your INBOX (UW IMAPd users will find this useful if they
421 # specify a reference):
422 #
423 # folderincludes = ['INBOX']
424 #
425 # To specify a long list:
426 #
427 # folderincludes = ['box1', 'box2', 'box3', 'box4',
428 # 'box5', 'box6']
429
430 # You can specify foldersort to determine how folders are sorted.
431 # This affects order of synchronization and mbnames. The expression
432 # should return -1, 0, or 1, as the default Python cmp() does. The
433 # two arguments, x and y, are strings representing the names of the folders
434 # to be sorted. The sorting is applied *AFTER* nametrans, if any.
435 #
436 # To reverse the sort:
437 #
438 # foldersort = lambda x, y: -cmp(x, y)
439
440
441 [Repository GmailExample]
442
443 # A repository using Gmail's IMAP interface. Any configuration
444 # parameter of `IMAP` type repositories can be used here. Only
445 # `remoteuser` (or `remoteusereval` ) is mandatory. Default values
446 # for other parameters are OK, and you should not need fiddle with
447 # those.
448 #
449 # The Gmail repository will use hard-coded values for `remotehost`,
450 # `remoteport`, `tunnel` and `ssl`. (See
451 # http://mail.google.com/support/bin/answer.py?answer=78799&topic=12814)
452 # Any attempt to set those parameters will be silently ignored.
453 #
454
455 type = Gmail
456
457 # Specify the Gmail user name. This is the only mandatory parameter.
458 remoteuser = username@gmail.com
459
460 # Deleting a message from a Gmail folder via the IMAP interface will
461 # just remove that folder's label from the message: the message will
462 # continue to exist in the '[Gmail]/All Mail' folder. If `realdelete`
463 # is set to `True`, then deleted messages will really be deleted
464 # during `offlineimap` sync, by moving them to the '[Gmail]/Trash'
465 # folder. BEWARE: this will delete a messages from *all folders* it
466 # belongs to!
467 #
468 # See http://mail.google.com/support/bin/answer.py?answer=77657&topic=12815
469 realdelete = no
470
471 # The trash folder name may be different from [Gmail]/Trash
472 # for example on german googlemail, this setting should be
473 #
474 # trashfolder = [Google Mail]/Papierkorb
475 #
476 # The same is valid for the spam folder
477 #
478 # spamfolder = [Google Mail]/Spam
479