offlineimap.conf 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434
  1. # Offlineimap sample configuration file
  2. # This file documents *all* possible options and can be quite scary.
  3. # Looking for a quick start? Take a look at offlineimap.conf.minimal.
  4. # More details can be found at http://www.offlineimap.org .
  5. ##################################################
  6. # Overview
  7. ##################################################
  8. # The default configuration file is "~/.offlineimaprc".
  9. #
  10. # Offlineimap ships with a file named "offlineimap.conf" that you should copy to
  11. # that location and then edit.
  12. #
  13. # Offlineimap also ships a file named "offlineimap.conf.minimal" that you can
  14. # also try. It's useful if you want to get started with the most basic feature
  15. # set, and you can read about other features later with "offlineimap.conf".
  16. #
  17. # If you want to be XDG-compatible, you can put your configuration file into
  18. # "$XDG_CONFIG_HOME/offlineimap/config".
  19. ##################################################
  20. # General definitions
  21. ##################################################
  22. # NOTE 1: Settings generally support python interpolation. This means
  23. # values can contain python format strings which refer to other values
  24. # in the same section, or values in a special DEFAULT section. This
  25. # allows you for example to use common settings for multiple accounts:
  26. #
  27. # [Repository Gmail1]
  28. # trashfolder: %(gmailtrashfolder)s
  29. #
  30. # [Repository Gmail2]
  31. # trashfolder: %(gmailtrashfolder)s
  32. #
  33. # [DEFAULT]
  34. # gmailtrashfolder = [Gmail]/Papierkorb
  35. #
  36. # would set the trashfolder setting for your German Gmail accounts.
  37. # NOTE 2: Above feature implies that any '%' needs to be encoded as '%%'
  38. # NOTE 3: Any variable that is subject to the environment variables
  39. # ($NAME) and tilde (~username/~) expansions will receive tilde
  40. # expansion first and only after the environment variable will be
  41. # expanded in the resulting string. This behaviour is intentional
  42. # as it coincides with typical shell expansion strategy.
  43. # NOTE 4: multiple same-named sections.
  44. # The library used to parse the configuration file has known issue when multiple
  45. # sections have the same name. In such case, only the last section is considered.
  46. # It is strongly discouraged to have multiple sections with the same name.
  47. # See https://github.com/OfflineIMAP/offlineimap/issues/143 for more details.
  48. [general]
  49. # This specifies where Offlineimap is to store its metadata.
  50. # This directory will be created if it does not already exist.
  51. #
  52. # Tilde and environment variable expansions will be performed.
  53. #
  54. #metadata = ~/.offlineimap
  55. # This option stands in the [general] section.
  56. #
  57. # This variable specifies which accounts are defined. Separate them with commas.
  58. # Account names should be alphanumeric only. You will need to specify one
  59. # section per account below. You may not use "general" for an account name.
  60. #
  61. # Always use ASCII characters only.
  62. #
  63. accounts = Test
  64. # This option stands in the [general] section.
  65. #
  66. # Offlineimap can synchronize more than one account at a time. There are two
  67. # ways to sync accounts concurrently:
  68. #
  69. # 1. By running one offlineimap instance for each account (with the -a CLI
  70. # option). This is the recommended way. In this case, keep the following option
  71. # to 1.
  72. #
  73. # 2. By allowing offlineimap to sync more than one account for an instance (not
  74. # recommended). In this case, set the maxsyncaccounts option to a value greater
  75. # than 1.
  76. #
  77. #maxsyncaccounts = 1
  78. # This option stands in the [general] section.
  79. #
  80. # You can specify one or more user interface. Offlineimap will try the first in
  81. # the list, and if it fails, the second, and so forth.
  82. #
  83. # The pre-defined options are:
  84. # Blinkenlights -- A fancy (terminal) interface
  85. # TTYUI -- a text-based (terminal) interface
  86. # Basic -- Noninteractive interface suitable for cron'ing
  87. # Quiet -- Noninteractive interface, generates no output
  88. # except for errors.
  89. # MachineUI -- Interactive interface suitable for machine
  90. # parsing.
  91. #
  92. # See also offlineimapui(7)
  93. #
  94. # You can override this with a command-line option -u.
  95. #
  96. #ui = basic
  97. # This option stands in the [general] section.
  98. #
  99. # If you try to synchronize messages to a folder which the IMAP server
  100. # considers read-only, Offlineimap will generate a warning. If you want
  101. # to suppress these warnings, set ignore-readonly to yes. Read-only
  102. # IMAP folders allow reading but not modification, so if you try to
  103. # change messages in the local copy of such a folder, the IMAP server
  104. # will prevent Offlineimap from propagating those changes to the IMAP
  105. # server. Note that ignore-readonly is UNRELATED to the "readonly"
  106. # setting which prevents a repository from being modified at all.
  107. #
  108. #ignore-readonly = no
  109. ########## Advanced settings
  110. # This option stands in the [general] section.
  111. #
  112. # You can give a Python source filename here and all config file
  113. # python snippets will be evaluated in the context of that file.
  114. # This allows you to e.g. define helper functions in the Python
  115. # source file and call them from this config file. You can find
  116. # an example of this in the manual.
  117. #
  118. # Tilde and environment variable expansions will be performed.
  119. #
  120. #pythonfile = ~/.offlineimap.py
  121. # This option is in the [general] section.
  122. #
  123. # By default, Offlineimap will not exit due to a network error until the
  124. # operating system returns an error code. Operating systems can sometimes take
  125. # forever to notice this. Here you can activate a timeout on the socket. This
  126. # timeout applies to individual socket reads and writes, not to an overall sync
  127. # operation. You could perfectly well have a 30s timeout here and your sync
  128. # still take minutes.
  129. #
  130. # Values in the 30-120 second range are reasonable.
  131. #
  132. # The default is to have no timeout beyond the OS. Times are given in seconds.
  133. #
  134. #socktimeout = 60
  135. # This option stands in the [general] section.
  136. #
  137. # By default, Offlineimap will use fsync() to force data out to disk at
  138. # opportune times to ensure consistency. This can, however, reduce performance.
  139. # Users where /home is on SSD (Flash) may also wish to reduce write cycles.
  140. # Therefore, you can disable Offlineimap's use of fsync(). Doing so will come
  141. # at the expense of greater risk of message duplication in the event of a system
  142. # crash or power loss. Default is true. Set it to false to disable fsync.
  143. #
  144. # SQLite honors this option since v7.0.8+. However, those SQLite improvements
  145. # are still EXPERIMENTAL.
  146. #
  147. #fsync = true
  148. ##################################################
  149. # Mailbox name recorder
  150. ##################################################
  151. [mbnames]
  152. # Offlineimap can record your mailbox names in a format you specify.
  153. # You can define the header, each mailbox item, the separator,
  154. # and the footer. Here is an example for Mutt.
  155. # If enabled is yes, all settings except incremental must be specified, even if
  156. # they are just the empty string "".
  157. #
  158. # The header, peritem, sep, and footer are all Python expressions passed
  159. # through eval, so you can (and must) use Python quoting.
  160. #
  161. # The incremental setting controls whether the file is written after each
  162. # account completes or once all synced accounts are complete. This is useful if
  163. # an account is sightly slower than the other. It allows keeping the previous
  164. # file rather than having it partially written.
  165. # This works best with "no" if in one-shot mode started by cron or systemd
  166. # timers. Default: no.
  167. #
  168. # The following hash key are available to the expansion for 'peritem':
  169. # - accountname: the name of the corresponding account;
  170. # - foldername: the name of the folder;
  171. # - localfolders: path to the local directory hosting all Maildir
  172. # folders for the account.
  173. #
  174. # Tilde and environment variable expansions will be performed
  175. # for "filename" knob.
  176. #
  177. #enabled = no
  178. #filename = ~/Mutt/muttrc.mailboxes
  179. #header = "mailboxes "
  180. #peritem = "+%(accountname)s/%(foldername)s"
  181. #sep = " "
  182. #footer = "\n"
  183. #incremental = no
  184. # This option stands in the [mbnames] section.
  185. #
  186. # You can also specify a folderfilter. It will apply to the *translated* folder
  187. # name here, and it takes TWO arguments: accountname and foldername. In all
  188. # other ways, it will behave identically to the folderfilter for accounts.
  189. # Please see the folderfilter option for more information and examples.
  190. #
  191. # This filter can be used only to further restrict mbnames to a subset of
  192. # folders that pass the account's folderfilter.
  193. #
  194. # E.g.: with mbnames_folderfilter defined like this in the python file:
  195. #
  196. # def mbnames_folderfilter(accountname, foldername):
  197. # allowed = {'myaccount': ['folderA', 'folderB']}
  198. # if accountname in allowed:
  199. # return foldername in allowed[accountname]
  200. # return False
  201. #
  202. # For correct folderfilter with Microsoft servers, please see
  203. # http://www.offlineimap.org/doc/FAQ.html#exchange-and-office365
  204. #
  205. #folderfilter = mbnames_folderfilter
  206. # This option stands in the [mbnames] section.
  207. #
  208. # You can customize the order in which mailbox names are listed in the generated
  209. # file by specifying a sort_keyfunc, which takes a single dict argument
  210. # containing keys 'accountname' and 'foldername'. This function will be called
  211. # once for each mailbox, and should return a suitable sort key that defines this
  212. # mailbox' position in the custom ordering.
  213. #
  214. # This is useful with e.g. Mutt-sidebar, which uses the mailbox order from the
  215. # generated file when listing mailboxes in the sidebar.
  216. #
  217. # Default setting is:
  218. #sort_keyfunc = lambda d: (d['accountname'], d['foldername'])
  219. ##################################################
  220. # Accounts
  221. ##################################################
  222. # This is an account definition clause. You'll have one of these for each
  223. # account listed in the "accounts" option in [general] section (above).
  224. [Account Test]
  225. # These settings specify the two folders that you will be syncing.
  226. # You'll need to have a "Repository ..." section for each one.
  227. localrepository = LocalExample
  228. remoterepository = RemoteExample
  229. ########## Advanced settings
  230. # This option stands in the [Account Test] section.
  231. #
  232. # You can have Offlineimap continue running indefinitely, automatically syncing
  233. # your mail periodically. If you want that, specify how frequently to do that
  234. # (in minutes) here. Fractional minutes (ie, 3.25) is allowed.
  235. #
  236. # If you want more than one account concurrently synced in one instance of
  237. # offlineimap (not recommended), don't forget to increase the maxsyncaccounts
  238. # option accordingly.
  239. #
  240. # NOTE: If you run systemd it's recommended to not enable this option and use
  241. # the systemd timer instead (see the ./contrib/systemd/ directory in the
  242. # repository).
  243. #
  244. #autorefresh = 5
  245. # This option stands in the [Account Test] section.
  246. #
  247. # OfflineImap can replace a number of full updates by quick synchronizations.
  248. # This option is ignored if maxage or startdate are used.
  249. #
  250. # It only synchronizes a folder if
  251. #
  252. # 1) a Maildir folder has changed
  253. #
  254. # or
  255. #
  256. # 2) if an IMAP folder has received new messages or had messages deleted, ie
  257. # it does not update if only IMAP flags have changed.
  258. #
  259. # Full updates need to fetch ALL flags for all messages, so this makes quite a
  260. # performance difference (especially if syncing between two IMAP servers).
  261. #
  262. # Specify 0 for never, -1 for always (works even in non-autorefresh mode)
  263. #
  264. # A positive integer <n> to do <n> quick updates before doing another full
  265. # synchronization (requires autorefresh). Updates are always performed after
  266. # <autorefresh> minutes, be they quick or full.
  267. #
  268. #quick = 10
  269. # This option stands in the [Account Test] section.
  270. #
  271. # You can specify a pre and post sync hook to execute a external command. In
  272. # this case a call to imapfilter to filter mail before the sync process starts
  273. # and a custom shell script after the sync completes.
  274. #
  275. # The pre sync script has to complete before a sync to the account will start.
  276. #
  277. #presynchook = imapfilter -c someotherconfig.lua
  278. #postsynchook = notifysync.sh
  279. # This option stands in the [Account Test] section.
  280. #
  281. # If you have a limited amount of bandwidth available you can exclude larger
  282. # messages (e.g. those with large attachments etc). If you do this it will
  283. # appear to Offlineimap that these messages do not exist at all. They will not
  284. # be copied, have flags changed etc. For this to work on an IMAP server the
  285. # server must have server side search enabled. This works with Gmail and most
  286. # imap servers (e.g. cyrus etc)
  287. #
  288. # The maximum size should be specified in bytes - e.g. 2000000 for approx 2MB
  289. #
  290. #maxsize = 2000000
  291. # This option stands in the [Account Test] section.
  292. #
  293. # maxage enables you to sync only recent messages. There are two ways to specify
  294. # what "recent" means: if maxage is given as an integer, then only messages from
  295. # the last maxage days will be synced. If maxage is given as a date, then only
  296. # messages later than that date will be synced.
  297. #
  298. # Messages older than the cutoff will not be synced, their flags will not be
  299. # changed, they will not be deleted, etc. For Offlineimap it will be like these
  300. # messages do not exist. This will perform an IMAP search in the case of IMAP or
  301. # Gmail and therefore requires that the server support server side searching.
  302. #
  303. # Known edge cases are described in offlineimap(1).
  304. #
  305. # maxage is allowed only when the local folder is of type Maildir. It can't be
  306. # used with startdate.
  307. #
  308. # The maxage option expects an integer (for the number of days) or a date of the
  309. # form yyyy-mm-dd.
  310. #
  311. #maxage = 3
  312. #maxage = 2015-04-01
  313. # This option stands in the [Account Test] section.
  314. #
  315. # Maildir file format uses colon (:) separator between uniq name and info.
  316. # Unfortunately colon is not allowed character in windows file name. If you
  317. # enable maildir-windows-compatible option, Offlineimap will be able to store
  318. # messages on windows drive, but you will probably loose compatibility with
  319. # other programs working with the maildir.
  320. #
  321. #maildir-windows-compatible = no
  322. # This option stands in the [Account Test] section.
  323. #
  324. # Specifies if we want to sync GMail labels with the local repository.
  325. # Effective only for GMail IMAP repositories.
  326. #
  327. # Non-ASCII characters in labels are bad handled or won't work at all.
  328. #
  329. #synclabels = no
  330. # This option stands in the [Account Test] section.
  331. #
  332. # Name of the header to use for label storage. Format for the header
  333. # value differs for different headers, because there are some de-facto
  334. # "standards" set by popular clients:
  335. #
  336. # - X-Label or Keywords keep values separated with spaces; for these
  337. # you, obviously, should not have label values that contain spaces;
  338. #
  339. # - X-Keywords use comma (',') as the separator.
  340. #
  341. # To be consistent with the usual To-like headers, for the rest of header
  342. # types we use comma as the separator.
  343. #
  344. # Use ASCII characters only.
  345. #
  346. #labelsheader = X-Keywords
  347. # This option stands in the [Account Test] section.
  348. #
  349. # Set of labels to be ignored. Comma-separated list. GMail-specific
  350. # labels all start with backslash ('\').
  351. #
  352. # Use ASCII characters only.
  353. #
  354. #ignorelabels = \Inbox, \Starred, \Sent, \Draft, \Spam, \Trash, \Important
  355. # This option stands in the [Account Test] section.
  356. #
  357. # Offlineimap can strip off some headers when your messages are propagated
  358. # back to the IMAP server. This option carries the comma-separated list
  359. # of headers to trim off. Header name matching is case-sensitive.
  360. #
  361. # This knob is respected only by IMAP-based accounts. Value of labelsheader
  362. # for GMail-based accounts is automatically added to this list, you don't
  363. # need to specify it explicitly.
  364. #
  365. # Use ASCII characters only.
  366. #
  367. #filterheaders = X-Some-Weird-Header
  368. # This option stands in the [Account Test] section.
  369. #
  370. # Use proxy connection for this account. Useful to bypass the GFW in China.
  371. # To specify a proxy connection, join proxy type, host and port with colons.
  372. # Available proxy types are SOCKS5, SOCKS4, HTTP.
  373. # You also need to install PySocks through pip.
  374. #
  375. # Currently, this feature leaks DNS support.
  376. #
  377. #proxy = SOCKS5:IP:9999
  378. # EXPERIMENTAL: This option stands in the [Account Test] section.
  379. #
  380. # IMAP defines an encoding for non-ASCII ("international") characters, and most
  381. # IMAP servers store folder names in this encoding. Note that the IMAP 4rev1
  382. # specification (RFC 3501) allows both UTF-8 and modified UTF-7 folder names
  383. # so it is *possible* that an IMAP server already uses UTF-8 encoded folder
  384. # names. But usually Folders that are shown as, say, "Gäste" will be represented
  385. # as "G&AOQ-ste", and by default will be synchronized like this by offlineIMAP.
  386. #
  387. # This option converts IMAP folder names from IMAP4-UTF-7 to UTF-8 and back
  388. # in order to have nicely readable UTF-8 folder names in the local copy.
  389. #
  390. # WARNING: with this option enabled:
  391. # - compatibility with any other version is NOT GUARANTEED (including newer);
  392. # - existing set-ups will probably break.
  393. # - no support is provided.
  394. #
  395. # IMPORTANT: READ THIS SECTION if you intend to enable this feature for an
  396. # EXISTING ACCOUNT that has already been synchronized!
  397. # Enabling UTF-8 encoded folder names will change many things on the local
  398. # repository of an account, so you really have to create a new local repository
  399. # and review the configuration. The least that would happen otherwise is a
  400. # duplication of all folders containing non-ASCII characters.
  401. # But also the following functionality may change, so the configuration in the
  402. # remote repository configuration has to be reviewed/updated:
  403. # - decodefoldernames
  404. # This option is replaced by utf8foldernames and must be removed
  405. # If both utf8foldernames and decodefoldernames are enabled the synchronization
  406. # for the given account is aborted before doing any changes.
  407. # - nametrans
  408. # With utf8foldernames enabled any nametrans function will operate on the
  409. # UTF-8 encoded folder names, while even with decodefoldernames enabled they
  410. # operate on the original IMAP4-UTF-7 encoded names.
  411. # - folderfilter
  412. # Folder filters still work on the untranslated names before applying a
  413. # nametrans function, but still this operates on the UTF-8 encoded names.
  414. # - folderincludes
  415. # With utf8foldernames enabled this function expects UTF-8 encoded folder
  416. # names.
  417. # - foldersort
  418. # With utf8foldernames enabled the folder names passed to the sorting routine
  419. # will be the UTF encoded names.
  420. # - idlefolders
  421. # With utf8foldernames enabled folders passed to this function are expected to
  422. # be UTF-8 encoded.
  423. #
  424. #utf8foldernames = no
  425. # TESTING: This option stands in the [Account Test] section.
  426. #
  427. # Use authproxy connection for this account. Useful to bypass the GFW in China.
  428. # Set this if you wish to use a proxy for authentication but not for IMAP.
  429. # If not explicitly set, this option defaults to use the proxy socket
  430. # (so as to be compatible with prior config files).
  431. # If that is specifically NOT desired, use authproxy = ''
  432. #
  433. # To specify a proxy connection, join proxy type, host and port with colons.
  434. # Available proxy types are SOCKS5, SOCKS4, HTTP.
  435. # You also need to install PySocks through pip or your distro package manager.
  436. #
  437. #authproxy = SOCKS5:IP:9999
  438. [Repository LocalExample]
  439. # Each repository requires a "type" declaration. The types supported for
  440. # local repositories are Maildir, GmailMaildir and IMAP.
  441. #
  442. type = Maildir
  443. # This option stands in the [Repository LocalExample] section.
  444. #
  445. # Specify local repository. Your IMAP folders will be synchronized
  446. # to maildirs created under this path. Offlineimap will create the
  447. # maildirs for you as needed.
  448. #
  449. localfolders = ~/Test
  450. # This option stands in the [Repository LocalExample] section.
  451. #
  452. # You can specify the "folder separator character" used for your Maildir
  453. # folders. It is inserted in-between the components of the tree. If you
  454. # want your folders to be nested directories, set it to "/". 'sep' is
  455. # ignored for IMAP repositories, as it is queried automatically.
  456. # Otherwise, default value is ".".
  457. #
  458. # Don't use quotes.
  459. #
  460. #sep = .
  461. # This option stands in the [Repository LocalExample] section.
  462. #
  463. # startdate syncs mails starting from a given date. It applies the date
  464. # restriction to LocalExample only. The remote repository MUST be empty
  465. # at the first sync where this option is used.
  466. #
  467. # Unlike maxage, this is supported for IMAP-IMAP sync.
  468. #
  469. # startdate can't be used with maxage.
  470. #
  471. # The startdate option expects a date in the format yyyy-mm-dd.
  472. #
  473. #startdate = 2015-04-01
  474. # This option stands in the [Repository LocalExample] section.
  475. #
  476. # Propagate deletions from local to remote. Messages deleted in this repository
  477. # won't get deleted on remote if set to "no". Default is yes.
  478. #
  479. # See sync_deletes in the RemoteExample section, too.
  480. #
  481. #sync_deletes = yes
  482. # This option stands in the [Repository LocalExample] section.
  483. #
  484. # Some users may not want the atime (last access time) of folders to be
  485. # modified by Offlineimap. If 'restoreatime' is set to yes, Offlineimap
  486. # will restore the atime of the "new" and "cur" folders in each maildir
  487. # folder to their original value after each sync.
  488. #
  489. # In nearly all cases, the default should be fine.
  490. #
  491. #restoreatime = no
  492. # This option stands in the [Repository LocalExample] section.
  493. #
  494. # Set modification time of messages basing on the message's "Date" header. This
  495. # option makes sense for the Maildir type, only.
  496. #
  497. # This is useful if you are doing some processing/finding on your Maildir (for
  498. # example, finding messages older than 3 months), without parsing each
  499. # file/message content.
  500. #
  501. # This option is not compatible with -q (quick mode) CLI option for GmailMaildir
  502. # types.
  503. #
  504. # Default: no.
  505. #
  506. #utime_from_header = no
  507. # This option stands in the [Repository LocalExample] section.
  508. #
  509. # This option is similar to "utime_from_header" and could be used as a
  510. # complementary feature to keep track of a message date. This option only
  511. # makes sense for the Maildir type.
  512. #
  513. # By default each message is stored in a file which prefix is the fetch
  514. # timestamp and an order rank such as "1446590057_0". In a multithreading
  515. # environment message are fetched in a random order, then you can't trust
  516. # the filename to sort your boxes.
  517. #
  518. # If set to "yes" the filename prefix is built from the message "Date" header
  519. # (which should be present) or the "Received-date" if "Date" is not
  520. # found. If neither "Received-date" nor "Date" is found, the current system
  521. # date is used. Now you can quickly sort your messages using their filenames.
  522. #
  523. # Used in combination with "utime_from_header" all your message would be in
  524. # order with the correct mtime attribute.
  525. #
  526. #filename_use_mail_timestamp = no
  527. # This option stands in the [Repository LocalExample] section.
  528. #
  529. # Map IMAP [user-defined] keywords to lowercase letters, similar to Dovecot's
  530. # format described in http://wiki2.dovecot.org/MailboxFormat/Maildir . This
  531. # option makes sense for the Maildir type, only.
  532. #
  533. # Configuration example:
  534. # customflag_x = some_keyword
  535. #
  536. # With the configuration example above enabled, all IMAP messages that have
  537. # 'some_keyword' in their FLAGS field will have an 'x' in the flags part of the
  538. # maildir filename:
  539. # 1234567890.M20046P2137.mailserver,S=4542,W=4642:2,Sx
  540. #
  541. # Valid fields are customflag_[a-z], valid values are whatever the IMAP server
  542. # allows.
  543. #
  544. # Comparison in Offlineimap is case-sensitive.
  545. #
  546. #customflag_a = some_keyword
  547. #customflag_b = $OtherKeyword
  548. #customflag_c = NonJunk
  549. #customflag_d = ToDo
  550. [Repository GmailLocalExample]
  551. # This type of repository enables syncing of Gmail. All Maildir
  552. # configuration settings are also valid here but the utime_from_header.
  553. #
  554. # This is a separate Repository type from Maildir because it involves
  555. # some extra overhead which sometimes may be significant. We look for
  556. # modified tags in local messages by looking only to the files
  557. # modified since last run. This is usually rather fast, but the first
  558. # time Offlineimap runs with synclabels enabled, it will have to check
  559. # the contents of all individual messages for labels and this may take
  560. # a while.
  561. #
  562. type = GmailMaildir
  563. [Repository RemoteExample]
  564. # The remote repository. We only support IMAP or Gmail here.
  565. #
  566. type = IMAP
  567. # This option stands in the [Repository RemoteExample] section.
  568. #
  569. # Configure which address family to use for the connection. If not specified,
  570. # AF_UNSPEC is used as a fallback (default).
  571. #
  572. # AF_INET6:
  573. #ipv6 = True
  574. #
  575. # AF_INET:
  576. #ipv6 = False
  577. # These options stands in the [Repository RemoteExample] section.
  578. #
  579. # The following can fetch the account credentials via a python expression that
  580. # is parsed from the pythonfile parameter. For example, a function called
  581. # "getcredentials" that parses a file "filename" and returns the account
  582. # details for "hostname".
  583. #
  584. #
  585. #remotehosteval = getcredentials("filename", "hostname", "hostname")
  586. #
  587. # The returned value must be int type.
  588. #remoteporteval = getcredentials("filename", "hostname", "port")
  589. #
  590. # The returned value must be unicode type.
  591. #remoteusereval = getcredentials("filename", "hostname", "user")
  592. #
  593. # The returned value must be unicode type.
  594. #remotepasseval = getcredentials("filename", "hostname", "passwd")
  595. # This option stands in the [Repository RemoteExample] section.
  596. #
  597. # Specify the remote hostname.
  598. #
  599. remotehost = examplehost
  600. # This option stands in the [Repository RemoteExample] section.
  601. #
  602. # Whether or not to use STARTTLS. STARTTLS allows to upgrade a plain connection
  603. # to TLS or SSL after negotiation with the server. While a server might pretend
  604. # to support STARTTLS, the communication might not be properly established or
  605. # the secure tunnel might be broken in some way. In this case you might want to
  606. # disable STARTTLS. Unless you hit issues with STARTTLS, you are strongly
  607. # encouraged to keep STARTTLS enabled.
  608. #
  609. # STARTTLS can be used even if the 'ssl' option is disabled. If you want to
  610. # _force_ STARTTLS, you might need to disable 'ssl'.
  611. #
  612. # Default is yes.
  613. #
  614. #starttls = yes
  615. # This option stands in the [Repository RemoteExample] section.
  616. #
  617. # Whether or not to use SSL.
  618. #
  619. # Note: be care to configure the 'remotehost' line with the domain name defined
  620. # in the certificate. E.g., if you trust your provider and want to use the
  621. # certificate it provides on a shared server. Otherwise, Offlineimap will stop
  622. # and say that the domain is not named in the certificate.
  623. #
  624. # Default is yes.
  625. #
  626. #ssl = yes
  627. # This option stands in the [Repository RemoteExample] section.
  628. #
  629. # SSL Client certificate (optional).
  630. #
  631. # Tilde and environment variable expansions will be performed.
  632. #
  633. #sslclientcert = /path/to/file.crt
  634. # This option stands in the [Repository RemoteExample] section.
  635. #
  636. # SSL Client key (optional).
  637. #
  638. # Tilde and environment variable expansions will be performed.
  639. #
  640. #sslclientkey = /path/to/file.key
  641. # This option stands in the [Repository RemoteExample] section.
  642. #
  643. # SSL CA Cert(s) to verify the server cert against (optional).
  644. # No SSL verification is done without this option. If it is
  645. # specified, the CA Cert(s) need to verify the Server cert AND
  646. # match the hostname (* wildcard allowed on the left hand side)
  647. # The certificate should be in PEM format.
  648. #
  649. # Tilde and environment variable expansions will be performed.
  650. #
  651. # Special value OS-DEFAULT makes Offlineimap to automatically
  652. # determine system-wide location of standard trusted CA roots file
  653. # for known OS distributions and use the first bundle encountered
  654. # (if any). If no system-wide CA bundle is found, Offlineimap
  655. # will refuse to continue; this is done to prevent creation
  656. # of false security expectations ("I had configured CA bundle,
  657. # thou certificate verification shalt be present").
  658. #
  659. # You can also use fingerprint verification via cert_fingerprint.
  660. # See below for more verbose explanation.
  661. #
  662. #sslcacertfile = /path/to/cacertfile.crt
  663. # This option stands in the [Repository RemoteExample] section.
  664. #
  665. # If you connect via SSL/TLS (ssl = yes) and you have no CA certificate
  666. # specified, Offlineimap will refuse to sync as it connects to a server
  667. # with an unknown "fingerprint". If you are sure you connect to the
  668. # correct server, you can then configure the presented server
  669. # fingerprint here. Offlineimap will verify that the server fingerprint
  670. # has not changed on each connect and refuse to connect otherwise.
  671. #
  672. # You can also configure fingerprint validation in addition to
  673. # CA certificate validation above and it will check both:
  674. # Offlineimap fill verify certificate first and if things will be fine,
  675. # fingerprint will be validated.
  676. #
  677. # Multiple fingerprints can be specified, separated by commas.
  678. #
  679. # In Windows, Microsoft uses the term "thumbprint" instead of "fingerprint".
  680. #
  681. # Supported fingerprint hashes are sha512, sha384, sha256, sha224 and sha1.
  682. # Fingerprints must be in hexadecimal form without leading '0x', and may have
  683. # the separating colons. This is non case-sensitive.
  684. # Examples:
  685. # sha1 "bbfe29cf97acb204591edbafe0aa8c8f914287c9".
  686. # sha1 with colons "BB:FE:29:CF:97:AC:B2:04:59:1E:DB:AF:E0:AA:8C:8F:91:42:87:C9"
  687. #
  688. #cert_fingerprint = <SHAn_of_server_certificate_here>[, <another_SHAm>]
  689. # This option stands in the [Repository RemoteExample] section.
  690. #
  691. # Set SSL version to use (optional).
  692. #
  693. # It is best to leave this unset, in which case the correct version will be
  694. # automatically detected. In rare cases, it may be necessary to specify a
  695. # particular version from: tls1, tls1_1, tls1_2, ssl3, ssl23.
  696. #
  697. # tls1_1 and tls1_2 are available with OpenSSL since v1.0.1.
  698. #
  699. # ssl23 automatically selects the highest protocol version that both the client
  700. # and server support. Despite the name, this option can select “TLS” protocols
  701. # as well as “SSL”.
  702. #
  703. # Be aware that a MITM attack can consist in downgrading the protocol version
  704. # which is used upon client/server agreement. So, they might fallback to the
  705. # less secure available protocol. Hence, it is considered more safe to manually
  706. # define the protocol version.
  707. #
  708. # See the configuration option tls_level to disable insecure protocols.
  709. #
  710. #ssl_version = ssl23
  711. # This option stands in the [Repository RemoteExample] section.
  712. #
  713. # TLS support level (optional).
  714. #
  715. # Specify the level of support that should be allowed for this repository.
  716. # Can be used to enable insecure SSL versions as defined by imaplib2.
  717. # See, IETF https://tools.ietf.org/html/rfc6176 to know more.
  718. #
  719. # Supported values are:
  720. # tls_secure, tls_no_ssl, tls_compat (default).
  721. #
  722. # Current mapping:
  723. # - tls_secure:
  724. # - tls1_1
  725. # - tls1_2
  726. # - tls_no_ssl:
  727. # - all tls_secure
  728. # - tls1 (less desirable than tls1_1 or higher)
  729. # - tls_compat
  730. # - all tls_no_ssl
  731. # - ssl3 (less desirable than tls1)
  732. # - ssl23 (can fallback up to ssl3)
  733. #
  734. # When tls_level is not set to tls_compat and ssl is still enabled,
  735. # the ssl_version configuration option must be explicitly set.
  736. #
  737. #tls_level = tls_compat
  738. # This option stands in the [Repository RemoteExample] section.
  739. #
  740. # Specify the port. If not specified, use a default port.
  741. #
  742. #remoteport = 993
  743. # This option stands in the [Repository RemoteExample] section.
  744. #
  745. # Specify the remote user name.
  746. #
  747. remoteuser = username
  748. # This option stands in the [Repository RemoteExample] section.
  749. #
  750. # Specify the user to be authorized as. Sometimes we want to
  751. # authenticate with our login/password, but tell the server that we
  752. # really want to be treated as some other user; perhaps server will
  753. # allow us to do that (or maybe not). Some IMAP servers migrate
  754. # account names using this functionality: your credentials remain
  755. # intact, but remote identity changes.
  756. #
  757. # Currently this variable is used only for SASL PLAIN authentication
  758. # mechanism, so consider using auth_mechanisms to prioritize PLAIN
  759. # or even make it the only mechanism to be tried.
  760. #
  761. #remote_identity = authzuser
  762. # This option stands in the [Repository RemoteExample] section.
  763. #
  764. # Specify which authentication/authorization mechanisms we should try and the
  765. # order in which Offlineimap will try them.
  766. #
  767. # NOTE: any given mechanism will be tried ONLY if it is supported by the remote
  768. # IMAP server.
  769. #
  770. # Default value is ranged is from strongest to more weak ones. Due to technical
  771. # limitations, if GSSAPI is set, it will be tried first, no matter where it was
  772. # specified in the list.
  773. #
  774. #auth_mechanisms = GSSAPI, XOAUTH2, CRAM-MD5, PLAIN, LOGIN
  775. # This option stands in the [Repository RemoteExample] section.
  776. #
  777. # XOAUTH2 authentication (for instance, to use with Gmail).
  778. #
  779. # This option was tested on Gmail only, but should work with type = IMAP for
  780. # compatible servers.
  781. #
  782. # For Gmail (and maybe others), XOAUTH2 requires ssl. This means that STARTTLS
  783. # won't work and that Offlineimap will perform certificate validation. IOW, the
  784. # following configuration is used:
  785. # - sslcacertfile: MUST BE correctly configured
  786. # - ssl = yes (optional, will be used anyway)
  787. # - starttls = no (optional, will be tried but won't work anyway)
  788. #
  789. # Mandatory parameters are "oauth2_client_id", "oauth2_client_secret" and
  790. # either "oauth2_refresh_token" or "oauth2_access_token". XOAUTH2 mechanism
  791. # won't be tried if both oauth2_refresh_token and oauth2_access_token are not
  792. # set.
  793. #
  794. # See below to learn how to get those.
  795. #
  796. # Specify the OAuth2 client id and secret to use for the connection..
  797. # Here's how to register an OAuth2 client for Gmail, as of 2017-05-15:
  798. # - Go to the Gmail API overview console
  799. # https://console.developers.google.com/apis/api/gmail.googleapis.com/overview
  800. # - Create a new project, name doesn't matter, e.g. 'gmail-sync-bob'
  801. # - In API & Auth, select Credentials
  802. # - Once created, click 'Enable'
  803. # - Click 'Create credentials' in the enabled API overview
  804. # - In 'Add credentials to your project' select 'Gmail API' as the
  805. # API type, and 'Other UI ...' (not 'Other non-UI ...') for
  806. # 'Where will you be calling the API from?'. For 'What data will
  807. # you be accessing?' select 'User data'.
  808. # - Click 'What credentials do I need?'
  809. # - Create an arbitrary 'Create an OAuth 2.0 client ID',
  810. # e.g. 'gmail-sync-bob-client'. For 'Set up the OAuth 2.0 consent
  811. # screen' select an arbitrary 'Product name shown to users',
  812. # e.g. 'gmail-sync-bob-client' & click 'Continue'.
  813. # - This gives you your client ID displayed on the screen. Click
  814. # 'Download' to get a JSON file that also has the client secret.
  815. #
  816. #oauth2_client_id = YOUR_CLIENT_ID
  817. #oauth2_client_secret = YOUR_CLIENT_SECRET
  818. #
  819. # The return values must be bytes.
  820. #oauth2_client_id_eval = get_client_id("accountname")
  821. #oauth2_client_secret_eval = get_client_secret("accountname")
  822. #
  823. # Specify the refresh token to use for the connection to the mail server.
  824. # Here's an example of a way to get a refresh token:
  825. # - Clone this project: https://github.com/google/gmail-oauth2-tools
  826. # - Type the following command-line in a terminal and follow the instructions
  827. # python python/oauth2.py --generate_oauth2_token \
  828. # --client_id=YOUR_CLIENT_ID --client_secret=YOUR_CLIENT_SECRET
  829. # - Access token can be obtained using refresh token with command
  830. # python python/oauth2.py --user=YOUR_EMAIL --client_id=YOUR_CLIENT_ID
  831. # --client_secret=YOUR_CLIENT_SECRET --refresh_token=REFRESH_TOKEN
  832. #
  833. # Access tokens have limited lifetimes. If you need access beyond the lifetime
  834. # of a single access token, you should use a refresh token. A refresh token
  835. # allows Offlineimap to obtain new access tokens.
  836. #
  837. # If you want to use a refresh token, make sure you disabled/removed any
  838. # oauth2_access_token option. The access token is downloaded from the URL
  839. # defined in the oauth2_request_url configuration option.
  840. #
  841. # If the type of the remote is IMAP, oauth2_request_url MUST be defined.
  842. # For Gmail, the default URL is https://accounts.google.com/o/oauth2/token.
  843. #
  844. # If you're experiencing issues, please read the "Known issues" section of the
  845. # manual.
  846. #
  847. #oauth2_access_token = ACCESS_TOKEN
  848. #oauth2_request_url = https://accounts.google.com/o/oauth2/token
  849. #oauth2_refresh_token = REFRESH_TOKEN
  850. #
  851. # The returned values must be bytes.
  852. #oauth2_access_token_eval = get_access_token("accountname")
  853. #oauth2_refresh_token_eval = get_refresh_token("accountname")
  854. ########## Passwords
  855. # There are six ways to specify the password for the IMAP server:
  856. #
  857. # 1. No password at all specified in the config file.
  858. # If a matching entry is found in ~/.netrc (see netrc (5) for
  859. # information) this password will be used. Do note that netrc only
  860. # allows one entry per hostname. If there is no ~/.netrc file but
  861. # there is an /etc/netrc file, the password will instead be taken
  862. # from there. Otherwise you will be prompted for the password when
  863. # Offlineimap starts when using a UI that supports this.
  864. #
  865. # 2. The remote password stored in this file with the remotepass
  866. # option. Save this file with the UTF-8 encoding if your server expect UTF-8
  867. # encoded password.
  868. #
  869. # Any '%' needs to be encoded as '%%'. Example:
  870. #remotepass = myp%%ssword # Real password is myp%ssword
  871. #
  872. # 3. The remote password stored as a single line in an external file, which is
  873. # referenced by the remotefile option. Must be UTF-8 encoded. Example:
  874. #remotepassfile = ~/Password.IMAP.Account1
  875. #
  876. # 4. With a preauth tunnel. With this method, you invoke an external
  877. # program that is guaranteed *NOT* to ask for a password, but rather
  878. # to read from stdin and write to stdout an IMAP protocol stream that
  879. # begins life in the PREAUTH state. When you use a tunnel, you do
  880. # NOT specify a user or password (if you do, they'll be ignored.)
  881. # Instead, you specify a preauthtunnel, as this example illustrates
  882. # for Courier IMAP on Debian:
  883. #preauthtunnel = ssh -q imaphost '/usr/bin/imapd ./Maildir'
  884. #
  885. # 5. If you are using Kerberos and have the Python gssapi package
  886. # installed, you should not specify a remotepass. If the user has a
  887. # valid Kerberos TGT, Offlineimap will figure out the rest all by
  888. # itself, and fall back to password authentication if needed.
  889. #
  890. # 6. Using arbitrary python code. With this method, you invoke a
  891. # function from your pythonfile. To use this method assign the name
  892. # of the function to the variable 'remotepasseval'. Example:
  893. #remotepasseval = get_password("imap.example.net")
  894. # You can also query for the username:
  895. #remoteusereval = get_username("imap.example.net")
  896. # This method can be used to design more elaborate setups, e.g. by
  897. # querying the gnome-keyring via its python bindings.
  898. ########## Advanced settings
  899. # These options stands in the [Repository RemoteExample] section.
  900. #
  901. # Tunnels. There are two types:
  902. #
  903. # - preauth: they teleport your connection to the remote system
  904. # and you don't need to authenticate yourself there; the sole
  905. # fact that you succeeded to get the tunnel running is enough.
  906. # This tunnel type was explained above in the 'Passwords' section.
  907. #
  908. # - transport: the just provide the transport (probably encrypted)
  909. # to the IMAP server, but you still need to authenticate at the
  910. # IMAP server.
  911. #
  912. # Tunnels are currently working only with IMAP servers and their
  913. # derivatives (GMail currently). Additionally, for GMail accounts
  914. # preauth tunnel settings are ignored: we don't believe that there
  915. # are ways to preauthenticate at Google mail system IMAP servers.
  916. #
  917. # You must choose at most one tunnel type, be wise M'Lord!
  918. #
  919. #preauthtunnel = ssh -q imaphost '/usr/bin/imapd ./Maildir'
  920. #transporttunnel = openssl s_client -host myimap -port 993 -quiet
  921. # This option stands in the [Repository RemoteExample] section.
  922. #
  923. # Some IMAP servers need a "reference" which often refers to the "folder root".
  924. #
  925. # This is most commonly needed with UW IMAP, where you might need to specify the
  926. # directory in which your mail is stored. The 'reference' value will be prefixed
  927. # to all folder paths referring to that repository. E.g. accessing folder 'INBOX'
  928. # with "reference = Mail" will try to access Mail/INBOX.
  929. #
  930. # The nametrans and folderfilter functions will apply to the full path,
  931. # including the reference prefix. Most users will not need this.
  932. #
  933. #reference = Mail
  934. # DEPRECATED: This option stands in the [Repository RemoteExample] section.
  935. #
  936. # IMAP defines an encoding for non-ASCII ("international") characters. Enable
  937. # this option if you want to decode them to the nowadays ubiquitous UTF-8.
  938. #
  939. # Note that the IMAP 4rev1 specification (RFC 3501) allows both UTF-8 and
  940. # modified UTF-7 folder names.
  941. #
  942. # This option converts IMAP folder names from IMAP4-UTF-7 to UTF-8.
  943. #
  944. # NOTE/LIMITATION:
  945. # - The reencoding is applied *after* a nametrans function that may be given,
  946. # so it is important to note that nametrans will work on the undecoded
  947. # UTF-7 names.
  948. # - This option only works from a remote IMAP to a local Maildir repository
  949. # - It only works *once*, so it can only be used for one-off backups
  950. # (see https://github.com/OfflineIMAP/offlineimap/issues/299 and especially
  951. # https://github.com/OfflineIMAP/offlineimap/issues/299#issuecomment-331243827)
  952. #
  953. # WARNING: with this option enabled:
  954. # - compatibility with any other version is NOT GUARANTED (including newer);
  955. # - no support is provided.
  956. #
  957. # DEPRECATION:
  958. # This option is only there for backward compatibility with existing set-ups.
  959. # For newly created accounts please use the utf8foldernames option on account
  960. # level.
  961. #
  962. # This feature was merged because it's small changes in the code. However, this
  963. # might seriously decrease the stability of the program. That's why it will
  964. # likely never be marked stable. The approach is: if it works for you, you're
  965. # lucky and you might choose to go for it. If it doesn't, sorry but this feature
  966. # is known to not work in many cases and it's not available to you. Enabling
  967. # this feature might really be a poor choice for the future since it's not
  968. # supported at all and new releases might break the setup.
  969. #
  970. #decodefoldernames = no
  971. # This option stands in the [Repository RemoteExample] section.
  972. #
  973. # In between synchronisations, Offlineimap can monitor mailboxes for new
  974. # messages using the IDLE command. If you want to enable this, specify here the
  975. # folders you wish to monitor. IMAP protocol requires a separate connection for
  976. # each folder monitored in this way, so setting this option will force settings
  977. # for:
  978. #
  979. # - maxconnections: to be at least the number of folders you give
  980. # - holdconnectionopen: to be true
  981. # - keepalive: to be 29 minutes unless you specify otherwise
  982. # - singlethreadperfolder: to be true
  983. #
  984. # The presynchook and postsynchook are executed for each new synchronisation per
  985. # folder.
  986. #
  987. # This feature isn't complete and may well have problems. See the "Known Issues"
  988. # entry in the manual for more details.
  989. #
  990. # This option should return a Python list. For example
  991. #
  992. #idlefolders = ['INBOX', 'INBOX.Alerts']
  993. # This option stands in the [Repository RemoteExample] section.
  994. #
  995. # Offlineimap can use a compressed connection to the IMAP server.
  996. # This can result in faster downloads for some cases.
  997. #
  998. #usecompression = yes
  999. # This option stands in the [Repository RemoteExample] section.
  1000. #
  1001. # Offlineimap can use multiple connections to the server in order
  1002. # to perform multiple synchronization actions simultaneously.
  1003. # This may place a higher burden on the server. In most cases,
  1004. # setting this value to 2 or 3 will speed up the sync, but in some
  1005. # cases, it may slow things down. The safe answer is 1. You should
  1006. # probably never set it to a value more than 5.
  1007. #
  1008. #maxconnections = 2
  1009. # This option stands in the [Repository RemoteExample] section.
  1010. #
  1011. # If you want to ensure that only one single thread is used to synchronize each
  1012. # folder, set this to 'yes'. If this is set, only one thread will be used to
  1013. # copy messages for each folder, but up to maxconnections threads will be used
  1014. # overall, copying different folders in parallel. This option is required to
  1015. # download in UIDs order.
  1016. #
  1017. # If this is unset (the default), then up to maxconnections threads are used
  1018. # across all currently syncing folders. This option is sightly recommended in
  1019. # IMAP/IMAP mode (no maildir).
  1020. #
  1021. #singlethreadperfolder = no
  1022. # This option stands in the [Repository RemoteExample] section.
  1023. #
  1024. # Offlineimap normally closes IMAP server connections between refreshes if
  1025. # the global option autorefresh is specified. If you wish it to keep the
  1026. # connection open, set this to true. If not specified, the default is
  1027. # false. Keeping the connection open means a faster sync start the
  1028. # next time and may use fewer server resources on connection, but uses
  1029. # more server memory. This setting has no effect if autorefresh is not set.
  1030. #
  1031. #holdconnectionopen = no
  1032. # This option stands in the [Repository RemoteExample] section.
  1033. #
  1034. # If you want to have "keepalives" sent while waiting between syncs, specify the
  1035. # amount of time IN SECONDS between keepalives here. Note that sometimes more
  1036. # than this amount of time might pass, so don't make it tight. This setting has
  1037. # no effect if autorefresh and holdconnectionopen are not both set.
  1038. #
  1039. #keepalive = 60
  1040. # This option stands in the [Repository RemoteExample] section.
  1041. #
  1042. # Normally, Offlineimap will expunge deleted messages from the server. You can
  1043. # disable that if you wish. This means that Offlineimap will mark them deleted
  1044. # on the server, but not actually delete them. You must use some other IMAP
  1045. # client to delete them if you use this setting; otherwise, the messages will
  1046. # just pile up there forever. Therefore, this setting is definitely NOT
  1047. # recommended for a long term.
  1048. #
  1049. # Default is yes.
  1050. #
  1051. #expunge = no
  1052. # This option stands in the [Repository RemoteExample] section.
  1053. #
  1054. # Specify whether to process all mail folders on the server, or only
  1055. # those listed as "subscribed".
  1056. #
  1057. # Default is no.
  1058. #
  1059. #subscribedonly = no
  1060. # This option stands in the [Repository RemoteExample] section.
  1061. #
  1062. # You can specify a folder translator. This must be a eval-able.
  1063. #
  1064. # Python expression that takes a foldername arg and returns the new value. A
  1065. # lambda function is suggested.
  1066. #
  1067. # WARNING: you MUST construct it so that it NEVER returns the same value for two
  1068. # folders, UNLESS the second values are filtered out by folderfilter below.
  1069. # Failure to follow this rule will result in undefined behavior.
  1070. #
  1071. # If you enable nametrans, you will likely need to set the reversed nametrans on
  1072. # the other side. See the user documentation for details and use cases. They
  1073. # are also online at: http://www.offlineimap.org/doc/nametrans.html
  1074. #
  1075. # This example below will remove "INBOX." from the leading edge of folders
  1076. # (great for Courier IMAP users).
  1077. #
  1078. #nametrans = lambda foldername: re.sub('^INBOX\.', '', foldername)
  1079. #
  1080. # Using Courier remotely and want to duplicate its mailbox naming locally? Try
  1081. # this:
  1082. #
  1083. #nametrans = lambda foldername: re.sub('^INBOX\.*', '.', foldername)
  1084. # This option stands in the [Repository RemoteExample] section.
  1085. #
  1086. # Determines if folderfilter will be invoked on each run (dynamic folder
  1087. # filtering) or filtering status will be determined at startup (default
  1088. # behaviour).
  1089. #
  1090. #dynamic_folderfilter = False
  1091. # This option stands in the [Repository RemoteExample] section.
  1092. #
  1093. # You can specify which folders to sync using the folderfilter setting. You can
  1094. # provide any python function (e.g. a lambda function) which will be invoked for
  1095. # each foldername. If the filter function returns True, the folder will be
  1096. # synced, if it returns False, it.
  1097. #
  1098. # The folderfilter operates on the *UNTRANSLATED* name (before any nametrans
  1099. # translation takes place).
  1100. #
  1101. # Example 1: synchronizing only INBOX and Sent.
  1102. #
  1103. #folderfilter = lambda foldername: foldername in ['INBOX', 'Sent']
  1104. #
  1105. # Example 2: synchronizing everything except Trash.
  1106. #
  1107. #folderfilter = lambda foldername: foldername not in ['Trash']
  1108. #
  1109. # Example 3: Using a regular expression to exclude Trash and all folders
  1110. # containing the characters "Del".
  1111. #
  1112. #folderfilter = lambda foldername: not re.search('(^Trash$|Del)', foldername)
  1113. #
  1114. # If folderfilter is not specified, ALL remote folders will be synchronized.
  1115. #
  1116. # You can span multiple lines by indenting the others. (Use backslashes at the
  1117. # end when required by Python syntax) For instance:
  1118. #
  1119. #folderfilter = lambda foldername: foldername in [
  1120. # 'INBOX', 'Sent Mail',
  1121. # 'Deleted Items', 'Received']
  1122. # This option stands in the [Repository RemoteExample] section.
  1123. #
  1124. # You can specify folderincludes to include additional folders. It should
  1125. # return a Python list. This might be used to include a folder that was
  1126. # excluded by your folderfilter rule, to include a folder that your server does
  1127. # not specify with its LIST option, or to include a folder that is outside your
  1128. # basic reference.
  1129. #
  1130. # The 'reference' value will not be prefixed to this folder name, even if you
  1131. # have specified one. For example:
  1132. #
  1133. #folderincludes = ['debian.user', 'debian.personal']
  1134. # This option stands in the [Repository RemoteExample] section.
  1135. #
  1136. # If you do not want to have any folders created on this repository,
  1137. # set the createfolders variable to False, the default is True. Using
  1138. # this feature you can e.g. disable the propagation of new folders to
  1139. # the new repository.
  1140. #
  1141. #createfolders = True
  1142. # This option stands in the [Repository RemoteExample] section.
  1143. #
  1144. # Propagate deletions from remote to local. Messages deleted in this repository
  1145. # won't get deleted on the local repository if set to "no". Default is yes.
  1146. #
  1147. # See sync_deletes in the LocalExample section, too.
  1148. #
  1149. #sync_deletes = yes
  1150. # This option stands in the [Repository RemoteExample] section.
  1151. #
  1152. # 'foldersort' determines how folders are sorted.
  1153. #
  1154. # This affects order of synchronization and mbnames. The expression should
  1155. # return -1, 0, or 1, as the default Python cmp() does. The two arguments, x
  1156. # and y, are strings representing the names of the folders to be sorted. The
  1157. # sorting is applied *AFTER* nametrans, if any. The default is to sort IMAP
  1158. # folders alphabetically (case-insensitive). Usually, you should never have to
  1159. # modify this. To eg. reverse the sort:
  1160. #
  1161. #foldersort = lambda x, y: -cmp(x, y)
  1162. # This option stands in the [Repository RemoteExample] section.
  1163. #
  1164. # Enable 1-way synchronization. When setting 'readonly' to True, this
  1165. # repository will not be modified during synchronization. Usefull to
  1166. # e.g. backup an IMAP server. The readonly setting can be applied to any
  1167. # type of Repository (Maildir, Imap, etc).
  1168. #
  1169. # Notice that this does NOT mean that the local Maildir can be used with a
  1170. # read-only filesystem When OfflineImap uploads a new email, it is assigned a
  1171. # new UID by the remote which is stored in the filename. Otherwise, Offlineimap
  1172. # would have no way to map the UID to the file.
  1173. #
  1174. #readonly = False
  1175. # This option stands in the [Repository RemoteExample] section.
  1176. #
  1177. # You can specify a newmail hook to execute an external command upon receipt
  1178. # of new mail in the INBOX.
  1179. #
  1180. # The pythonfile must be set to import any required library.
  1181. #
  1182. # This example plays a sound file of your chosing when new mail arrives.
  1183. #
  1184. #newmail_hook = lambda: os.system(
  1185. #"cvlc --play-and-stop --play-and-exit /path/to/sound/file.mp3 > /dev/null 2>&1")
  1186. # This option stands in the [Repository RemoteExample] section. [TESTING]
  1187. #
  1188. # Operating under extreme network conditions (China) network connectivity
  1189. # especially for SSL can be so bad and so slow that absolutely every possible
  1190. # kind of connectivity error that can occur does occur.
  1191. #
  1192. # Rather than have offlineimap exit on errors it may be preferable to have it
  1193. # simply retry fetching of messages dozens of times. The alternative is to
  1194. # restart offlineimap in a constant loop, which may involve using significant
  1195. # CPU cycles (if the repository is large) to load up the UID database again.
  1196. #
  1197. # This option is best utilised in combination with socktimeout, which catches
  1198. # instances of interference by e.g. the GFW at the TCP layer, as well as China
  1199. # ISPs simply not coping.
  1200. #
  1201. # Default value: retrycount = 2
  1202. #
  1203. #retrycount = 2
  1204. # This option stands in the [Repository RemoteExample] section.
  1205. #
  1206. # If offlineimap is having troubles to download some UIDS, it's possible to get
  1207. # them ignored in a list. This only ignore the download.
  1208. #
  1209. # The function must return the list of UIDs (integers), None otherwise. It is
  1210. # passed the folder name (using the remote name with the remote separator,
  1211. # likely '/').
  1212. #
  1213. #copy_ignore_eval = lambda foldername: {'INBOX': [2, 3, 4]}.get(foldername)
  1214. [Repository GmailExample]
  1215. # A repository using Gmail's IMAP interface.
  1216. #
  1217. # Any configuration parameter of "IMAP" type repositories can be used here.
  1218. # Only "remoteuser" (or "remoteusereval" ) is mandatory. Default values for
  1219. # other parameters are OK, and you should not need fiddle with those.
  1220. #
  1221. # The Gmail repository provides default values for "remotehost",
  1222. # "remoteport", "tunnel" and "ssl". For the defaults we use, see:
  1223. #
  1224. # http://mail.google.com/support/bin/answer.py?answer=78799&topic=12814
  1225. #
  1226. # This means ssl is enabled and must be configured correctly when connecting to
  1227. # Gmail.
  1228. #
  1229. # In addition we provide defaults for "oauth2_request_url",
  1230. # "trashfolder" and "spamfolder".
  1231. #
  1232. # All of the defaults we provide can be overriden. E.g. you can
  1233. # override "remotehost"/"remoteport"/"ssl" if you'd like to connect to
  1234. # imap.gmail.com via a local stunnel instead of directly.
  1235. #
  1236. # To enable GMail labels synchronisation, set the option "synclabels" in the
  1237. # corresponding "Account" section.
  1238. #
  1239. # Side note: Gmail will keep the deleted emails in "Gmail\All Mail" unless you
  1240. # defined it differently in your online settings.
  1241. #
  1242. type = Gmail
  1243. # This option stands in the [Repository GmailExample] section.
  1244. #
  1245. # Specify the Gmail user name. This is the only mandatory parameter.
  1246. #
  1247. remoteuser = username@gmail.com
  1248. # This option stands in the [Repository GmailExample] section.
  1249. #
  1250. # The trash folder name may be different from [Gmail]/Trash due to localization.
  1251. # You should look for the localized names of the spam folder too: "spamfolder"
  1252. # tunable will help you to override the standard name.
  1253. #
  1254. # For example on German Gmail, this setting should be:
  1255. #
  1256. #trashfolder = [Gmail]/Papierkorb