1 # Sample configuration file
2 # Copyright (C) 2002-2005 John Goerzen
3 # <jgoerzen@complete.org>
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.
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.
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
19 # Looking for a quick start? Take a look at offlineimap.conf.minimal.
22 ##################################################
24 ##################################################
28 # This specifies where offlineimap is to store its metadata.
29 # This directory will be created if it does not already exist.
31 metadata = ~/.offlineimap
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.
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
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.
53 # The pre-defined options are:
54 # Curses.Blinkenlights -- A text-based (terminal) interface similar to
56 # TTY.TTYUI -- a text-based (terminal) interface
57 # Noninteractive.Basic -- Noninteractive interface suitable for cronning
58 # Noninteractive.Quiet -- Noninteractive interface, generates no output
61 # You can override this with a command-line option -u.
63 ui = Curses.Blinkenlights, TTY.TTYUI,
64 Noninteractive.Basic, Noninteractive.Quiet
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.
75 ########## Advanced settings
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.
83 # pythonfile = ~/.offlineimap.py
86 ##################################################
87 # Mailbox name recorder
88 ##################################################
92 # offlineimap can record your mailbox names in a format you specify.
93 # You can define the header, each mailbox item, the separator,
94 # and the footer. Here is an example for Mutt.
95 # If enabled is yes, all six setting must be specified, even if they
96 # are just the empty string "".
98 # The header, peritem, sep, and footer are all Python expressions passed
99 # through eval, so you can (and must) use Python quoting.
102 filename = ~/Mutt/muttrc.mailboxes
103 header = "mailboxes "
104 peritem = "+%(accountname)s/%(foldername)s"
108 # You can also specify a folderfilter. It will apply to the
109 # *translated* folder name here, and it takes TWO arguments:
110 # accountname and foldername. In all other ways, it will
111 # behave identically to the folderfilter for accounts. Please see
112 # that section for more information and examples.
114 # Note that this filter can be used only to further restrict mbnames
115 # to a subset of folders that pass the account's folderfilter.
117 ##################################################
119 ##################################################
121 # This is an account definition clause. You'll have one of these
122 # for each account listed in general/accounts above.
125 ########## Basic settings
127 # These settings specify the two folders that you will be syncing.
128 # You'll need to have a "Repository ..." section for each one.
130 localrepository = LocalExample
131 remoterepository = RemoteExample
133 ########## Advanced settings
135 # You can have offlineimap continue running indefinately, automatically
136 # syncing your mail periodically. If you want that, specify how
137 # frequently to do that (in minutes) here. You can also specify
138 # fractional minutes (ie, 3.25).
142 [Repository LocalExample]
144 # This is one of the two repositories that you'll work with given the
145 # above example. Each repository requires a "type" declaration.
147 # The types supported are Maildir and IMAP.
152 # Specify local repository. Your IMAP folders will be synchronized
153 # to maildirs created under this path. OfflineIMAP will create the
154 # maildirs for you as needed.
156 localfolders = ~/Test
158 # You can specify the "path separator character" used for your Maildir
159 # folders. This is inserted in-between the components of the tree.
160 # It defaults to ".". If you want your Maildir folders to be nested,
165 # Some users on *nix platforms may not want the atime (last access
166 # time) to be modified by OfflineIMAP. In these cases, they would
167 # want to set restoreatime to yes. OfflineIMAP will make an effort
168 # to not touch the atime if you do that.
170 # In most cases, the default of no should be sufficient.
174 [Repository RemoteExample]
176 # And this is the remote repository. For now, we only support IMAP here.
180 # Specify the remote hostname.
181 remotehost = examplehost
183 # Whether or not to use SSL.
186 # Specify the port. If not specified, use a default port.
189 # Specify the remote user name.
190 remoteuser = username
192 # There are four ways to specify the password for the remote IMAP
195 # 1. No password at all specified in the config file. You will
196 # be prompted for the password when OfflineIMAP starts.
198 # 2. The remote password stored in this file with the remotepass
201 # remotepass = mypassword
203 # 3. The remote password stored as a single line in an external
204 # file, which is referenced by the remotefile option. Example:
206 # remotepassfile = ~/Password.IMAP.Account1
208 # 4. With a preauth tunnel. With this method, you invoke an external
209 # program that is guaranteed *NOT* to ask for a password, but rather
210 # to read from stdin and write to stdout an IMAP procotol stream
211 # that begins life in the PREAUTH state. When you use a tunnel,
212 # you do NOT specify a user or password (if you do, they'll be
213 # ignored.) Instead, you specify a preauthtunnel, as this
214 # example illustrates for Courier IMAP on Debian:
216 # preauthtunnel = ssh -q imaphost '/usr/bin/imapd ./Maildir'
219 ########## Advanced settings
221 # Some IMAP servers need a "reference" which often refers to the
222 # "folder root". This is most commonly needed with UW IMAP, where
223 # you might need to specify the directory in which your mail is
224 # stored. Most users will not need this.
228 # OfflineIMAP can use multiple connections to the server in order
229 # to perform multiple synchronization actions simultaneously.
230 # This may place a higher burden on the server. In most cases,
231 # setting this value to 2 or 3 will speed up the sync, but in some
232 # cases, it may slow things down. The safe answer is 1. You should
233 # probably never set it to a value more than 5.
237 # OfflineIMAP normally closes IMAP server connections between refreshes if
238 # the global option autorefresh is specified. If you wish it to keep the
239 # connection open, set this to true. If not specified, the default is
240 # false. Keeping the connection open means a faster sync start the
241 # next time and may use fewer server resources on connection, but uses
242 # more server memory. This setting has no effect if autorefresh is not set.
244 holdconnectionopen = no
246 # If you want to have "keepalives" sent while waiting between syncs,
247 # specify the amount of time IN SECONDS between keepalives here. Note that
248 # sometimes more than this amount of time might pass, so don't make it
249 # tight. This setting has no effect if autorefresh and holdconnectionopen
254 # Normally, OfflineIMAP will expunge deleted messages from the server.
255 # You can disable that if you wish. This means that OfflineIMAP will
256 # mark them deleted on the server, but not actually delete them.
257 # You must use some other IMAP client to delete them if you use this
258 # setting; otherwise, the messgaes will just pile up there forever.
259 # Therefore, this setting is definately NOT recommended.
262 # You can specify a folder translator. This must be a eval-able
263 # Python expression that takes a foldername arg and returns the new
264 # value. I suggest a lambda. This example below will remove "INBOX." from
265 # the leading edge of folders (great for Courier IMAP users)
267 # WARNING: you MUST construct this such that it NEVER returns
268 # the same value for two folders, UNLESS the second values are
269 # filtered out by folderfilter below. Failure to follow this rule
270 # will result in undefined behavior
272 # nametrans = lambda foldername: re.sub('^INBOX\.', '', foldername)
274 # Using Courier remotely and want to duplicate its mailbox naming
277 # nametrans = lambda foldername: re.sub('^INBOX\.*', '.', foldername)
279 # You can specify which folders to sync. You can do it several ways.
280 # I'll provide some examples. The folderfilter operates on the
281 # *UNTRANSLATED* name, if you specify nametrans. It should return
282 # true if the folder is to be included; false otherwise.
284 # Example 1: synchronizing only INBOX and Sent.
286 # folderfilter = lambda foldername: foldername in ['INBOX', 'Sent']
288 # Example 2: synchronizing everything except Trash.
290 # folderfilter = lambda foldername: foldername not in ['Trash']
292 # Example 3: Using a regular expression to exclude Trash and all folders
293 # containing the characters "Del".
295 # folderfilter = lambda foldername: not re.search('(^Trash$|Del)', foldername)
297 # If folderfilter is not specified, ALL remote folders will be
300 # You can span multiple lines by indenting the others. (Use backslashes
301 # at the end when required by Python syntax) For instance:
303 # folderfilter = lambda foldername: foldername in
304 # ['INBOX', 'Sent Mail', 'Deleted Items',
307 # FYI, you could also include every folder with:
309 # folderfilter = lambda foldername: 1
311 # And exclude every folder with:
313 # folderfilter = lambda foldername: 0
315 # You can specify folderincludes to include additional folders.
316 # It should return a Python list. This might be used to include a
317 # folder that was excluded by your folderfilter rule, to include a
318 # folder that your server does not specify with its LIST option, or
319 # to include a folder that is outside your basic reference. Some examples:
321 # To include debian.user and debian.personal:
323 # folderincludes = ['debian.user', 'debian.personal']
325 # To include your INBOX (UW IMAPd users will find this useful if they
326 # specify a reference):
328 # folderincludes = ['INBOX']
330 # To specify a long list:
332 # folderincludes = ['box1', 'box2', 'box3', 'box4',
335 # You can specify foldersort to determine how folders are sorted.
336 # This affects order of synchronization and mbnames. The expression
337 # should return -1, 0, or 1, as the default Python cmp() does. The
338 # two arguments, x and y, are strings representing the names of the folders
339 # to be sorted. The sorting is applied *AFTER* nametrans, if any.
341 # To reverse the sort:
343 # foldersort = lambda x, y: -cmp(x, y)