offlineimap.conf 53 KB

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