1 # Offlineimap sample configuration file
3 # This file documents *all* possible options and can be quite scary.
4 # Looking for a quick start? Take a look at offlineimap.conf.minimal.
5 # More details can be found at http://www.offlineimap.org .
7 ##################################################
9 ##################################################
11 # The default configuration file is "~/.offlineimaprc".
13 # OfflineIMAP ships with a file named "offlineimap.conf" that you should copy to
14 # that location and then edit.
16 # OfflineIMAP also ships a file named "offlineimap.conf.minimal" that you can
17 # also try. It's useful if you want to get started with the most basic feature
18 # set, and you can read about other features later with "offlineimap.conf".
20 # If you want to be XDG-compatible, you can put your configuration file into
21 # "$XDG_CONFIG_HOME/offlineimap/config".
23 ##################################################
25 ##################################################
27 # NOTE 1: Settings generally support python interpolation. This means
28 # values can contain python format strings which refer to other values
29 # in the same section, or values in a special DEFAULT section. This
30 # allows you for example to use common settings for multiple accounts:
33 # trashfolder: %(gmailtrashfolder)s
36 # trashfolder: %(gmailtrashfolder)s
39 # gmailtrashfolder = [Gmail]/Papierkorb
41 # would set the trashfolder setting for your German Gmail accounts.
43 # NOTE 2: Above feature implies that any '%' needs to be encoded as '%%'
45 # NOTE 3: Any variable that is subject to the environment variables
46 # ($NAME) and tilde (~username/~) expansions will receive tilde
47 # expansion first and only after the environment variable will be
48 # expanded in the resulting string. This behaviour is intentional
49 # as it coincides with typical shell expansion strategy.
51 # NOTE 4: multiple same-named sections.
52 # The library used to parse the configuration file has known issue when multiple
53 # sections have the same name. In such case, only the last section is considered.
54 # It is strongly discouraged to have multiple sections with the same name.
55 # See https://github.com/OfflineIMAP/offlineimap/issues/143 for more details.
59 # This specifies where OfflineIMAP is to store its metadata.
60 # This directory will be created if it does not already exist.
62 # Tilde and environment variable expansions will be performed.
64 #metadata = ~/.offlineimap
67 # This option stands in the [general] section.
69 # This variable specifies which accounts are defined. Separate them with commas.
70 # Account names should be alphanumeric only. You will need to specify one
71 # section per account below. You may not use "general" for an account name.
73 # Always use ASCII characters only.
78 # This option stands in the [general] section.
80 # Offlineimap can synchronize more than one account at a time. If you want to
81 # enable this feature, set the below value to something greater than 1. To
82 # force it to synchronize only one account at a time, set it to 1.
84 # NOTE: if you are using autorefresh and have more than one account, you must
85 # set this number to be >= to the number of accounts you have; since any given
86 # sync run never "finishes" due to a timer, you will never sync your additional
87 # accounts if this is 1.
92 # This option stands in the [general] section.
94 # You can specify one or more user interface. OfflineIMAP will try the first in
95 # the list, and if it fails, the second, and so forth.
97 # The pre-defined options are:
98 # Blinkenlights -- A fancy (terminal) interface
99 # TTYUI -- a text-based (terminal) interface
100 # Basic -- Noninteractive interface suitable for cron'ing
101 # Quiet -- Noninteractive interface, generates no output
103 # MachineUI -- Interactive interface suitable for machine
106 # See also offlineimapui(7)
108 # You can override this with a command-line option -u.
113 # This option stands in the [general] section.
115 # If you try to synchronize messages to a folder which the IMAP server
116 # considers read-only, OfflineIMAP will generate a warning. If you want
117 # to suppress these warnings, set ignore-readonly to yes. Read-only
118 # IMAP folders allow reading but not modification, so if you try to
119 # change messages in the local copy of such a folder, the IMAP server
120 # will prevent OfflineIMAP from propagating those changes to the IMAP
121 # server. Note that ignore-readonly is UNRELATED to the "readonly"
122 # setting which prevents a repository from being modified at all.
124 #ignore-readonly = no
127 ########## Advanced settings
129 # This option stands in the [general] section.
131 # You can give a Python source filename here and all config file
132 # python snippets will be evaluated in the context of that file.
133 # This allows you to e.g. define helper functions in the Python
134 # source file and call them from this config file. You can find
135 # an example of this in the manual.
137 # Tilde and environment variable expansions will be performed.
139 #pythonfile = ~/.offlineimap.py
142 # This option is in the [general] section.
144 # By default, OfflineIMAP will not exit due to a network error until the
145 # operating system returns an error code. Operating systems can sometimes take
146 # forever to notice this. Here you can activate a timeout on the socket. This
147 # timeout applies to individual socket reads and writes, not to an overall sync
148 # operation. You could perfectly well have a 30s timeout here and your sync
149 # still take minutes.
151 # Values in the 30-120 second range are reasonable.
153 # The default is to have no timeout beyond the OS. Times are given in seconds.
158 # This option stands in the [general] section.
160 # By default, OfflineIMAP will use fsync() to force data out to disk at
161 # opportune times to ensure consistency. This can, however, reduce performance.
162 # Users where /home is on SSD (Flash) may also wish to reduce write cycles.
163 # Therefore, you can disable OfflineIMAP's use of fsync(). Doing so will come
164 # at the expense of greater risk of message duplication in the event of a system
165 # crash or power loss. Default is true. Set it to false to disable fsync.
170 ##################################################
171 # Mailbox name recorder
172 ##################################################
176 # OfflineIMAP can record your mailbox names in a format you specify.
177 # You can define the header, each mailbox item, the separator,
178 # and the footer. Here is an example for Mutt.
179 # If enabled is yes, all six setting must be specified, even if they
180 # are just the empty string "".
182 # The header, peritem, sep, and footer are all Python expressions passed
183 # through eval, so you can (and must) use Python quoting.
185 # The incremental setting controls whether the file is written after each
186 # account completes or once all synced accounts are complete. This is usefull if
187 # an account is sightly slower than the other. It allows keeping the previous
188 # file rather than having it partially written.
189 # This works best with "no" if in one-shot mode started by cron or systemd
190 # timers. Default: no.
192 # The following hash key are available to the expansion for 'peritem':
193 # - accountname: the name of the corresponding account;
194 # - foldername: the name of the folder;
195 # - localfolders: path to the local directory hosting all Maildir
196 # folders for the account.
198 # Tilde and environment variable expansions will be performed
199 # for "filename" knob.
202 #filename = ~/Mutt/muttrc.mailboxes
203 #header = "mailboxes "
204 #peritem = "+%(accountname)s/%(foldername)s"
210 # This option stands in the [mbnames] section.
212 # You can also specify a folderfilter. It will apply to the *translated* folder
213 # name here, and it takes TWO arguments: accountname and foldername. In all
214 # other ways, it will behave identically to the folderfilter for accounts.
215 # Please see the folderfilter option for more information and examples.
217 # This filter can be used only to further restrict mbnames to a subset of
218 # folders that pass the account's folderfilter.
220 # You can customize the order in which mailbox names are listed in the generated
221 # file by specifying a sort_keyfunc, which takes a single dict argument
222 # containing keys 'accountname' and 'foldername'. This function will be called
223 # once for each mailbox, and should return a suitable sort key that defines this
224 # mailbox' position in the custom ordering.
226 # This is useful with e.g. Mutt-sidebar, which uses the mailbox order from the
227 # generated file when listing mailboxes in the sidebar.
229 # Default setting is:
230 #sort_keyfunc = lambda d: (d['accountname'], d['foldername'])
233 ##################################################
235 ##################################################
237 # This is an account definition clause. You'll have one of these for each
238 # account listed in the "accounts" option in [general] section (above).
242 # These settings specify the two folders that you will be syncing.
243 # You'll need to have a "Repository ..." section for each one.
245 localrepository = LocalExample
246 remoterepository = RemoteExample
249 ########## Advanced settings
251 # This option stands in the [Account Test] section.
253 # You can have OfflineIMAP continue running indefinitely, automatically syncing
254 # your mail periodically. If you want that, specify how frequently to do that
255 # (in minutes) here. Fractional minutes (ie, 3.25) is allowed.
260 # This option stands in the [Account Test] section.
262 # OfflineImap can replace a number of full updates by quick synchronizations.
263 # This option is ignored if maxage or startdate are used.
265 # It only synchronizes a folder if
267 # 1) a Maildir folder has changed
271 # 2) if an IMAP folder has received new messages or had messages deleted, ie
272 # it does not update if only IMAP flags have changed.
274 # Full updates need to fetch ALL flags for all messages, so this makes quite a
275 # performance difference (especially if syncing between two IMAP servers).
277 # Specify 0 for never, -1 for always (works even in non-autorefresh mode)
279 # A positive integer <n> to do <n> quick updates before doing another full
280 # synchronization (requires autorefresh). Updates are always performed after
281 # <autorefresh> minutes, be they quick or full.
286 # This option stands in the [Account Test] section.
288 # You can specify a pre and post sync hook to execute a external command. In
289 # this case a call to imapfilter to filter mail before the sync process starts
290 # and a custom shell script after the sync completes.
292 # The pre sync script has to complete before a sync to the account will start.
294 #presynchook = imapfilter -c someotherconfig.lua
295 #postsynchook = notifysync.sh
298 # This option stands in the [Account Test] section.
300 # You can specify a newmail hook to execute an external command upon receipt
301 # of new mail in the INBOX.
303 # This example plays a sound file of your chosing when new mail arrives.
305 #newmail_hook = lambda: os.system("cvlc --play-and-stop --play-and-exit /path/to/sound/file.mp3" +
306 # " > /dev/null 2>&1")
309 # This option stands in the [Account Test] section.
311 # OfflineImap caches the state of the synchronisation to e.g. be able to
312 # determine if a mail has been added or deleted on either side.
314 # The default and historical backend is 'plain' which writes out the
315 # state in plain text files. On Repositories with large numbers of
316 # mails, the performance might not be optimal, as we write out the
317 # complete file for each change. Another new backend 'sqlite' is
318 # available which stores the status in sqlite databases.
320 # If you switch the backend, you may want to delete the old cache
321 # directory in ~/.offlineimap/Account-<account>/LocalStatus manually
322 # once you are sure that things work.
324 #status_backend = plain
327 # This option stands in the [Account Test] section.
329 # If you have a limited amount of bandwidth available you can exclude larger
330 # messages (e.g. those with large attachments etc). If you do this it will
331 # appear to OfflineIMAP that these messages do not exist at all. They will not
332 # be copied, have flags changed etc. For this to work on an IMAP server the
333 # server must have server side search enabled. This works with Gmail and most
334 # imap servers (e.g. cyrus etc)
336 # The maximum size should be specified in bytes - e.g. 2000000 for approx 2MB
341 # This option stands in the [Account Test] section.
343 # maxage enables you to sync only recent messages. There are two ways to specify
344 # what "recent" means: if maxage is given as an integer, then only messages from
345 # the last maxage days will be synced. If maxage is given as a date, then only
346 # messages later than that date will be synced.
348 # Messages older than the cutoff will not be synced, their flags will not be
349 # changed, they will not be deleted, etc. For OfflineIMAP it will be like these
350 # messages do not exist. This will perform an IMAP search in the case of IMAP or
351 # Gmail and therefore requires that the server support server side searching.
353 # Known edge cases are described in offlineimap(1).
355 # maxage is allowed only when the local folder is of type Maildir. It can't be
356 # used with startdate.
358 # The maxage option expects an integer (for the number of days) or a date of the
365 # This option stands in the [Account Test] section.
367 # Maildir file format uses colon (:) separator between uniq name and info.
368 # Unfortunatelly colon is not allowed character in windows file name. If you
369 # enable maildir-windows-compatible option, OfflineIMAP will be able to store
370 # messages on windows drive, but you will probably loose compatibility with
371 # other programs working with the maildir.
373 #maildir-windows-compatible = no
376 # This option stands in the [Account Test] section.
378 # Specifies if we want to sync GMail labels with the local repository.
379 # Effective only for GMail IMAP repositories.
381 # Non-ASCII characters in labels are bad handled or won't work at all.
386 # This option stands in the [Account Test] section.
388 # Name of the header to use for label storage. Format for the header
389 # value differs for different headers, because there are some de-facto
390 # "standards" set by popular clients:
392 # - X-Label or Keywords keep values separated with spaces; for these
393 # you, obviously, should not have label values that contain spaces;
395 # - X-Keywords use comma (',') as the separator.
397 # To be consistent with the usual To-like headers, for the rest of header
398 # types we use comma as the separator.
400 # Use ASCII characters only.
402 #labelsheader = X-Keywords
405 # This option stands in the [Account Test] section.
407 # Set of labels to be ignored. Comma-separated list. GMail-specific
408 # labels all start with backslash ('\').
410 # Use ASCII characters only.
412 #ignorelabels = \Inbox, \Starred, \Sent, \Draft, \Spam, \Trash, \Important
415 # This option stands in the [Account Test] section.
417 # OfflineIMAP can strip off some headers when your messages are propagated
418 # back to the IMAP server. This option carries the comma-separated list
419 # of headers to trim off. Header name matching is case-sensitive.
421 # This knob is respected only by IMAP-based accounts. Value of labelsheader
422 # for GMail-based accounts is automatically added to this list, you don't
423 # need to specify it explicitely.
425 # Use ASCII characters only.
427 #filterheaders = X-Some-Weird-Header
430 # This option stands in the [Account Test] section.
432 # Use proxy connection for this account. Usefull to bypass the GFW in China.
433 # To specify a proxy connection, join proxy type, host and port with colons.
434 # Available proxy types are SOCKS5, SOCKS4, HTTP.
435 # You also need to install PySocks through pip.
437 # Currently, this feature leaks DNS support.
439 #proxy = SOCKS5:IP:9999
441 [Repository LocalExample]
443 # Each repository requires a "type" declaration. The types supported for
444 # local repositories are Maildir, GmailMaildir and IMAP.
449 # This option stands in the [Repository LocalExample] section.
451 # Specify local repository. Your IMAP folders will be synchronized
452 # to maildirs created under this path. OfflineIMAP will create the
453 # maildirs for you as needed.
455 localfolders = ~/Test
458 # This option stands in the [Repository LocalExample] section.
460 # You can specify the "folder separator character" used for your Maildir
461 # folders. It is inserted in-between the components of the tree. If you
462 # want your folders to be nested directories, set it to "/". 'sep' is
463 # ignored for IMAP repositories, as it is queried automatically.
464 # Otherwise, default value is ".".
471 # This option stands in the [Repository LocalExample] section.
473 # startdate syncs mails starting from a given date. It applies the date
474 # restriction to LocalExample only. The remote repository MUST be empty
475 # at the first sync where this option is used.
477 # Unlike maxage, this is supported for IMAP-IMAP sync.
479 # startdate can't be used with maxage.
481 # The startdate option expects a date in the format yyyy-mm-dd.
483 #startdate = 2015-04-01
486 # This option stands in the [Repository LocalExample] section.
488 # Some users may not want the atime (last access time) of folders to be
489 # modified by OfflineIMAP. If 'restoreatime' is set to yes, OfflineIMAP
490 # will restore the atime of the "new" and "cur" folders in each maildir
491 # folder to their original value after each sync.
493 # In nearly all cases, the default should be fine.
498 # This option stands in the [Repository LocalExample] section.
500 # Set modification time of messages basing on the message's "Date" header. This
501 # option makes sense for the Maildir type, only.
503 # This is useful if you are doing some processing/finding on your Maildir (for
504 # example, finding messages older than 3 months), without parsing each
505 # file/message content.
507 # If enabled, this forbid the -q (quick mode) CLI option to work correctly.
511 #utime_from_header = no
514 # This option stands in the [Repository LocalExample] section.
516 # This option is similar to "utime_from_header" and could be use as a
517 # complementary feature to keep track of a message date. This option only
518 # makes sense for the Maildir type.
520 # By default each message is stored in a file which prefix is the fetch
521 # timestamp and an order rank such as "1446590057_0". In a multithreading
522 # environment message are fetched in a random order, then you can't trust
523 # the file name to sort your boxes.
525 # If set to "yes" the file name prefix if build on the message "Date" header
526 # (which should be present) or the "Received-date" if "Date" is not
527 # found. If neither "Received-date" nor "Date" is found, the current system
528 # date is used. Now you can quickly sort your messages using their file
531 # Used in combination with "utime_from_header" all your message would be in
532 # order with the correct mtime attribute.
534 #filename_use_mail_timestamp = no
536 # This option stands in the [Repository LocalExample] section.
538 # Map IMAP [user-defined] keywords to lowercase letters, similar to Dovecot's
539 # format described in http://wiki2.dovecot.org/MailboxFormat/Maildir . This
540 # option makes sense for the Maildir type, only.
542 # Configuration example:
543 # customflag_x = some_keyword
545 # With the configuration example above enabled, all IMAP messages that have
546 # 'some_keyword' in their FLAGS field will have an 'x' in the flags part of the
548 # 1234567890.M20046P2137.mailserver,S=4542,W=4642:2,Sx
550 # Valid fields are customflag_[a-z], valid values are whatever the IMAP server
553 # Comparison in offlineimap is case-sensitive.
555 #customflag_a = some_keyword
556 #customflag_b = $OtherKeyword
557 #customflag_c = NonJunk
560 [Repository GmailLocalExample]
562 # This type of repository enables syncing of Gmail. All Maildir
563 # configuration settings are also valid here.
565 # This is a separate Repository type from Maildir because it involves
566 # some extra overhead which sometimes may be significant. We look for
567 # modified tags in local messages by looking only to the files
568 # modified since last run. This is usually rather fast, but the first
569 # time OfflineIMAP runs with synclabels enabled, it will have to check
570 # the contents of all individual messages for labels and this may take
576 [Repository RemoteExample]
578 # The remote repository. We only support IMAP or Gmail here.
583 # This option stands in the [Repository RemoteExample] section.
585 # Configure which address family to use for the connection. If not specified,
586 # AF_UNSPEC is used as a fallback (default).
595 # These options stands in the [Repository RemoteExample] section.
597 # The following can fetch the account credentials via a python expression that
598 # is parsed from the pythonfile parameter. For example, a function called
599 # "getcredentials" that parses a file "filename" and returns the account
600 # details for "hostname".
602 #remotehosteval = getcredentials("filename", "hostname", "hostname")
603 #remoteporteval = getcredentials("filename", "hostname", "port")
604 #remoteusereval = getcredentials("filename", "hostname", "user")
605 #remotepasseval = getcredentials("filename", "hostname", "passwd")
608 # This option stands in the [Repository RemoteExample] section.
610 # Specify the remote hostname.
612 remotehost = examplehost
615 # This option stands in the [Repository RemoteExample] section.
617 # Whether or not to use SSL.
619 # Note: be care to configure the 'remotehost' line with the domain name defined
620 # in the certificate. E.g., if you trust your provider and want to use the
621 # certificate it provides on a shared server. Otherwise, OfflineIMAP will stop
622 # and say that the domain is not named in the certificate.
627 # This option stands in the [Repository RemoteExample] section.
629 # SSL Client certificate (optional).
631 # Tilde and environment variable expansions will be performed.
633 #sslclientcert = /path/to/file.crt
636 # This option stands in the [Repository RemoteExample] section.
638 # SSL Client key (optional).
640 # Tilde and environment variable expansions will be performed.
642 #sslclientkey = /path/to/file.key
645 # This option stands in the [Repository RemoteExample] section.
647 # SSL CA Cert(s) to verify the server cert against (optional).
648 # No SSL verification is done without this option. If it is
649 # specified, the CA Cert(s) need to verify the Server cert AND
650 # match the hostname (* wildcard allowed on the left hand side)
651 # The certificate should be in PEM format.
653 # Tilde and environment variable expansions will be performed.
655 # Special value OS-DEFAULT makes OfflineIMAP to automatically
656 # determine system-wide location of standard trusted CA roots file
657 # for known OS distributions and use the first bundle encountered
658 # (if any). If no system-wide CA bundle is found, OfflineIMAP
659 # will refuse to continue; this is done to prevent creation
660 # of false security expectations ("I had configured CA bundle,
661 # thou certificate verification shalt be present").
663 # You can also use fingerprint verification via cert_fingerprint.
664 # See below for more verbose explanation.
666 #sslcacertfile = /path/to/cacertfile.crt
669 # This option stands in the [Repository RemoteExample] section.
671 # If you connect via SSL/TLS (ssl = yes) and you have no CA certificate
672 # specified, OfflineIMAP will refuse to sync as it connects to a server
673 # with an unknown "fingerprint". If you are sure you connect to the
674 # correct server, you can then configure the presented server
675 # fingerprint here. OfflineIMAP will verify that the server fingerprint
676 # has not changed on each connect and refuse to connect otherwise.
678 # You can also configure fingerprint validation in addition to
679 # CA certificate validation above and it will check both:
680 # OfflineIMAP fill verify certificate first and if things will be fine,
681 # fingerprint will be validated.
683 # Multiple fingerprints can be specified, separated by commas.
685 # In Windows, Microsoft uses the term "thumbprint" instead of "fingerprint".
687 # Fingerprints must be in hexadecimal form without leading '0x':
688 # 40 hex digits like bbfe29cf97acb204591edbafe0aa8c8f914287c9.
690 #cert_fingerprint = <SHA1_of_server_certificate_here>[, <another_SHA1>]
693 # This option stands in the [Repository RemoteExample] section.
695 # Set SSL version to use (optional).
697 # It is best to leave this unset, in which case the correct version will be
698 # automatically detected. In rare cases, it may be necessary to specify a
699 # particular version from: tls1, ssl2, ssl3, ssl23.
701 # ssl23 is the highest protocol version that both the client and server support.
702 # Despite the name, this option can select “TLS” protocols as well as “SSL”.
704 # See the configuration option tls_level to automatically disable insecure
710 # This option stands in the [Repository RemoteExample] section.
712 # TLS support level (optional).
714 # Specify the level of support that should be allowed for this repository.
715 # Can be used to disallow insecure SSL versions as defined by IETF
716 # (see https://tools.ietf.org/html/rfc6176).
718 # Supported values are:
719 # tls_secure, tls_no_ssl, tls_compat (the default).
721 #tls_level = tls_compat
724 # This option stands in the [Repository RemoteExample] section.
726 # Specify the port. If not specified, use a default port.
731 # This option stands in the [Repository RemoteExample] section.
733 # Specify the remote user name.
735 remoteuser = username
738 # This option stands in the [Repository RemoteExample] section.
740 # Specify the user to be authorized as. Sometimes we want to
741 # authenticate with our login/password, but tell the server that we
742 # really want to be treated as some other user; perhaps server will
743 # allow us to do that (or maybe not). Some IMAP servers migrate
744 # account names using this functionality: your credentials remain
745 # intact, but remote identity changes.
747 # Currently this variable is used only for SASL PLAIN authentication
748 # mechanism, so consider using auth_mechanisms to prioritize PLAIN
749 # or even make it the only mechanism to be tried.
751 #remote_identity = authzuser
754 # This option stands in the [Repository RemoteExample] section.
756 # Specify which authentication/authorization mechanisms we should try and the
757 # order in which OfflineIMAP will try them.
759 # NOTE: any given mechanism will be tried ONLY if it is supported by the remote
762 # Default value is ranged is from strongest to more weak ones. Due to technical
763 # limitations, if GSSAPI is set, it will be tried first, no matter where it was
764 # specified in the list.
766 #auth_mechanisms = GSSAPI, CRAM-MD5, XOAUTH2, PLAIN, LOGIN
769 # This option stands in the [Repository RemoteExample] section.
771 # XOAuth2 authentication (for instance, to use with Gmail).
773 # This option was tested on Gmail only, but should work
774 # with type = IMAP for compatible servers.
776 # Mandatory parameters are "oauth2_client_id", "oauth2_client_secret" and
777 # either "oauth2_refresh_token" or "oauth2_access_token".
778 # See below to learn how to get those.
780 # Specify the OAuth2 client id and secret to use for the connection..
781 # Here's how to register an OAuth2 client for Gmail, as of 10-2-2016:
782 # - Go to the Google developer console
783 # https://console.developers.google.com/project
784 # - Create a new project
785 # - In API & Auth, select Credentials
786 # - Setup the OAuth Consent Screen
787 # - Then add Credentials of type OAuth 2.0 Client ID
788 # - Choose application type Other; type in a name for your client
789 # - You now have a client ID and client secret
791 #oauth2_client_id = YOUR_CLIENT_ID
792 #oauth2_client_secret = YOUR_CLIENT_SECRET
794 # Specify the refresh token to use for the connection to the mail server.
795 # Here's an example of a way to get a refresh token:
796 # - Clone this project: https://github.com/google/gmail-oauth2-tools
797 # - Type the following command-line in a terminal and follow the instructions
798 # python python/oauth2.py --generate_oauth2_token \
799 # --client_id=YOUR_CLIENT_ID --client_secret=YOUR_CLIENT_SECRET
800 # - Access token can be obtained using refresh token with command
801 # python python/oauth2.py --user=YOUR_EMAIL --client_id=YOUR_CLIENT_ID
802 # --client_secret=YOUR_CLIENT_SECRET --refresh_token=REFRESH_TOKEN
804 #oauth2_refresh_token = REFRESH_TOKEN
805 #oauth2_access_token = ACCESS_TOKEN
809 # There are six ways to specify the password for the IMAP server:
811 # 1. No password at all specified in the config file.
812 # If a matching entry is found in ~/.netrc (see netrc (5) for
813 # information) this password will be used. Do note that netrc only
814 # allows one entry per hostname. If there is no ~/.netrc file but
815 # there is an /etc/netrc file, the password will instead be taken
816 # from there. Otherwise you will be prompted for the password when
817 # OfflineIMAP starts when using a UI that supports this.
819 # 2. The remote password stored in this file with the remotepass
820 # option. Any '%' needs to be encoded as '%%'. Example:
821 # remotepass = mypassword
823 # 3. The remote password stored as a single line in an external
824 # file, which is referenced by the remotefile option. Example:
825 # remotepassfile = ~/Password.IMAP.Account1
827 # 4. With a preauth tunnel. With this method, you invoke an external
828 # program that is guaranteed *NOT* to ask for a password, but rather
829 # to read from stdin and write to stdout an IMAP procotol stream that
830 # begins life in the PREAUTH state. When you use a tunnel, you do
831 # NOT specify a user or password (if you do, they'll be ignored.)
832 # Instead, you specify a preauthtunnel, as this example illustrates
833 # for Courier IMAP on Debian:
834 # preauthtunnel = ssh -q imaphost '/usr/bin/imapd ./Maildir'
836 # 5. If you are using Kerberos and have the Python Kerberos package
837 # installed, you should not specify a remotepass. If the user has a
838 # valid Kerberos TGT, OfflineIMAP will figure out the rest all by
839 # itself, and fall back to password authentication if needed.
841 # 6. Using arbitrary python code. With this method, you invoke a
842 # function from your pythonfile. To use this method assign the name
843 # of the function to the variable 'remotepasseval'. Example:
844 # remotepasseval = get_password("imap.example.net")
845 # You can also query for the username:
846 # remoteusereval = get_username("imap.example.net")
847 # This method can be used to design more elaborate setups, e.g. by
848 # querying the gnome-keyring via its python bindings.
851 ########## Advanced settings
854 # These options stands in the [Repository RemoteExample] section.
856 # Tunnels. There are two types:
858 # - preauth: they teleport your connection to the remote system
859 # and you don't need to authenticate yourself there; the sole
860 # fact that you succeeded to get the tunnel running is enough.
861 # This tunnel type was explained above in the 'Passwords' section.
863 # - transport: the just provide the transport (probably encrypted)
864 # to the IMAP server, but you still need to authenticate at the
867 # Tunnels are currently working only with IMAP servers and their
868 # derivatives (GMail currently). Additionally, for GMail accounts
869 # preauth tunnel settings are ignored: we don't believe that there
870 # are ways to preauthenticate at Google mail system IMAP servers.
872 # You must choose at most one tunnel type, be wise M'Lord!
874 #preauthtunnel = ssh -q imaphost '/usr/bin/imapd ./Maildir'
875 #transporttunnel = openssl s_client -host myimap -port 993 -quiet
878 # This option stands in the [Repository RemoteExample] section.
880 # Some IMAP servers need a "reference" which often refers to the "folder root".
882 # This is most commonly needed with UW IMAP, where you might need to specify the
883 # directory in which your mail is stored. The 'reference' value will be prefixed
884 # to all folder paths refering to that repository. E.g. accessing folder 'INBOX'
885 # with "reference = Mail" will try to access Mail/INBOX.
887 # The nametrans and folderfilter functions will apply to the full path,
888 # including the reference prefix. Most users will not need this.
893 # This option stands in the [Repository RemoteExample] section.
895 # IMAP defines an encoding for non-ASCII ("international") characters. Enable
896 # this option if you want to decode them to the nowadays ubiquitous UTF-8.
898 # Note that the IMAP 4rev1 specification (RFC 3501) allows both UTF-8 and
899 # modified UTF-7 folder names.
901 # WARNING: with this option enabled:
902 # - compatibility with any other version is NOT GUARANTED (including newer);
903 # - no support is provided.
905 #decodefoldernames = no
908 # This option stands in the [Repository RemoteExample] section.
910 # In between synchronisations, OfflineIMAP can monitor mailboxes for new
911 # messages using the IDLE command. If you want to enable this, specify here the
912 # folders you wish to monitor. IMAP protocol requires a separate connection for
913 # each folder monitored in this way, so setting this option will force settings
916 # - maxconnections: to be at least the number of folders you give
917 # - holdconnectionopen: to be true
918 # - keepalive: to be 29 minutes unless you specify otherwise
920 # This feature isn't complete and may well have problems. See the "Known Issues"
921 # entry in the manual for more details.
923 # This option should return a Python list. For example
925 #idlefolders = ['INBOX', 'INBOX.Alerts']
928 # This option stands in the [Repository RemoteExample] section.
930 # OfflineIMAP can use a compressed connection to the IMAP server.
931 # This can result in faster downloads for some cases.
933 #usecompression = yes
936 # This option stands in the [Repository RemoteExample] section.
938 # OfflineIMAP can use multiple connections to the server in order
939 # to perform multiple synchronization actions simultaneously.
940 # This may place a higher burden on the server. In most cases,
941 # setting this value to 2 or 3 will speed up the sync, but in some
942 # cases, it may slow things down. The safe answer is 1. You should
943 # probably never set it to a value more than 5.
948 # This option stands in the [Repository RemoteExample] section.
950 # OfflineIMAP normally closes IMAP server connections between refreshes if
951 # the global option autorefresh is specified. If you wish it to keep the
952 # connection open, set this to true. If not specified, the default is
953 # false. Keeping the connection open means a faster sync start the
954 # next time and may use fewer server resources on connection, but uses
955 # more server memory. This setting has no effect if autorefresh is not set.
957 #holdconnectionopen = no
960 # This option stands in the [Repository RemoteExample] section.
962 # If you want to have "keepalives" sent while waiting between syncs, specify the
963 # amount of time IN SECONDS between keepalives here. Note that sometimes more
964 # than this amount of time might pass, so don't make it tight. This setting has
965 # no effect if autorefresh and holdconnectionopen are not both set.
970 # This option stands in the [Repository RemoteExample] section.
972 # Normally, OfflineIMAP will expunge deleted messages from the server. You can
973 # disable that if you wish. This means that OfflineIMAP will mark them deleted
974 # on the server, but not actually delete them. You must use some other IMAP
975 # client to delete them if you use this setting; otherwise, the messages will
976 # just pile up there forever. Therefore, this setting is definitely NOT
977 # recommended for a long term.
982 # This option stands in the [Repository RemoteExample] section.
984 # Specify whether to process all mail folders on the server, or only
985 # those listed as "subscribed".
990 # This option stands in the [Repository RemoteExample] section.
992 # You can specify a folder translator. This must be a eval-able.
994 # Python expression that takes a foldername arg and returns the new value. A
995 # lambda function is suggested.
997 # WARNING: you MUST construct it so that it NEVER returns the same value for two
998 # folders, UNLESS the second values are filtered out by folderfilter below.
999 # Failure to follow this rule will result in undefined behavior.
1001 # If you enable nametrans, you will likely need to set the reversed nametrans on
1002 # the other side. See the user documentation for details and use cases. They
1003 # are also online at: http://www.offlineimap.org/doc/nametrans.html
1005 # This example below will remove "INBOX." from the leading edge of folders
1006 # (great for Courier IMAP users).
1008 #nametrans = lambda foldername: re.sub('^INBOX\.', '', foldername)
1010 # Using Courier remotely and want to duplicate its mailbox naming locally? Try
1013 #nametrans = lambda foldername: re.sub('^INBOX\.*', '.', foldername)
1016 # This option stands in the [Repository RemoteExample] section.
1018 # Determines if folderfilter will be invoked on each run (dynamic folder
1019 # filtering) or filtering status will be determined at startup (default
1022 #dynamic_folderfilter = False
1025 # This option stands in the [Repository RemoteExample] section.
1027 # You can specify which folders to sync using the folderfilter setting. You can
1028 # provide any python function (e.g. a lambda function) which will be invoked for
1029 # each foldername. If the filter function returns True, the folder will be
1030 # synced, if it returns False, it.
1032 # The folderfilter operates on the *UNTRANSLATED* name (before any nametrans
1033 # translation takes place).
1035 # Example 1: synchronizing only INBOX and Sent.
1037 #folderfilter = lambda foldername: foldername in ['INBOX', 'Sent']
1039 # Example 2: synchronizing everything except Trash.
1041 #folderfilter = lambda foldername: foldername not in ['Trash']
1043 # Example 3: Using a regular expression to exclude Trash and all folders
1044 # containing the characters "Del".
1046 #folderfilter = lambda foldername: not re.search('(^Trash$|Del)', foldername)
1048 # If folderfilter is not specified, ALL remote folders will be synchronized.
1050 # You can span multiple lines by indenting the others. (Use backslashes at the
1051 # end when required by Python syntax) For instance:
1053 #folderfilter = lambda foldername: foldername in [
1054 # 'INBOX', 'Sent Mail',
1055 # 'Deleted Items', 'Received']
1058 # This option stands in the [Repository RemoteExample] section.
1060 # You can specify folderincludes to include additional folders. It should
1061 # return a Python list. This might be used to include a folder that was
1062 # excluded by your folderfilter rule, to include a folder that your server does
1063 # not specify with its LIST option, or to include a folder that is outside your
1066 # The 'reference' value will not be prefixed to this folder name, even if you
1067 # have specified one. For example:
1069 #folderincludes = ['debian.user', 'debian.personal']
1072 # This option stands in the [Repository RemoteExample] section.
1074 # If you do not want to have any folders created on this repository,
1075 # set the createfolders variable to False, the default is True. Using
1076 # this feature you can e.g. disable the propagation of new folders to
1077 # the new repository.
1079 #createfolders = True
1082 # This option stands in the [Repository RemoteExample] section.
1084 # 'foldersort' determines how folders are sorted.
1086 # This affects order of synchronization and mbnames. The expression should
1087 # return -1, 0, or 1, as the default Python cmp() does. The two arguments, x
1088 # and y, are strings representing the names of the folders to be sorted. The
1089 # sorting is applied *AFTER* nametrans, if any. The default is to sort IMAP
1090 # folders alphabetically (case-insensitive). Usually, you should never have to
1091 # modify this. To eg. reverse the sort:
1093 #foldersort = lambda x, y: -cmp(x, y)
1096 # This option stands in the [Repository RemoteExample] section.
1098 # Enable 1-way synchronization. When setting 'readonly' to True, this
1099 # repository will not be modified during synchronization. Usefull to
1100 # e.g. backup an IMAP server. The readonly setting can be applied to any
1101 # type of Repository (Maildir, Imap, etc).
1106 [Repository GmailExample]
1108 # A repository using Gmail's IMAP interface.
1110 # Any configuration parameter of "IMAP" type repositories can be used here.
1111 # Only "remoteuser" (or "remoteusereval" ) is mandatory. Default values for
1112 # other parameters are OK, and you should not need fiddle with those.
1114 # The Gmail repository will use hard-coded values for "remotehost",
1115 # "remoteport", "tunnel" and "ssl". Any attempt to set those parameters will be
1116 # silently ignored. For details, see
1118 # http://mail.google.com/support/bin/answer.py?answer=78799&topic=12814
1120 # To enable GMail labels synchronisation, set the option "synclabels"
1121 # in the corresponding "Account" section.
1126 # This option stands in the [Repository GmailExample] section.
1128 # Specify the Gmail user name. This is the only mandatory parameter.
1130 remoteuser = username@gmail.com
1133 # This option stands in the [Repository GmailExample] section.
1135 # The trash folder name may be different from [Gmail]/Trash due to localization.
1136 # You should look for the localized names of the spam folder too: "spamfolder"
1137 # tunable will help you to override the standard name.
1139 # For example on German Gmail, this setting should be:
1141 #trashfolder = [Gmail]/Papierkorb