offlineimap.conf 48 KB

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