Imapc Configuration¶
See Imapc for a technical description of Dovecot’s imapc mailbox format.
Mail Location Configuration Examples¶
# In-memory index files:
mail_location = imapc:
# Store index files locally:
mail_location = imapc:~/imapc
Connection Settings¶
- imapc_cmd_timeout¶
Default:
5 minsValues: Time
How long to wait for a reply to an IMAP command sent to the remote IMAP server before disconnecting and retrying.
- imapc_connection_retry_count¶
Default:
1Values: Unsigned integer
How many times to retry connection against a remote IMAP server?
- imapc_connection_retry_interval¶
Default:
1 secsValues: Millisecond Time
How long to wait between retries against a remote IMAP server?
- imapc_features¶
Default: <empty>
Values: String
A space-separated list of features, optimizations, and workarounds that can be enabled.
Features
aclWhen this feature is enabled and the imap-acl plugin is loaded, using a remote location via imapc will make IMAP ACL commands (MYRIGHTS, GETACL, SETACL, DELETEACL) proxied to the remote.
New in version 2.3.15.
delay-loginDon’t connect to the remote server until some command requires it. By default the server is connected to immediately on login.
New in version v2.2.29.
gmail-migrationEnable GMail-specific migration. Use IMAP
X-GM-MSGIDas POP3 UIDL. Add$GMailHaveLabelskeyword to mails that haveX-GM-LABELSexcept for\Mutedkeyword (to be used for migrating only archived emails inAll Mails). Addpop3_deleted_flagto mails that don’t exist in POP3 server.modseqAccess
MODSEQandHIGHESTMODSEQNew in version 2.2.24.
proxyauthUse Sun/Oracle IMAP-server specific
PROXYAUTHcommand to do master user authentication. Normally this would be done using the SASL PLAIN authentication.throttle:<INIT>:<MAX>:<SHRINK>When receiving [THROTTLED] response (from GMail), throttling is applied.
INIT = initial throttling msecs (default: 50 ms), afterwards each subsequent [THROTTLED] doubles the throttling until MAX is reached (default: 16000 ms). When [THROTTLED] is not received for a while, it’s shrank again. The initial shrinking is done after SHRINK (default: 500 ms). If [THROTTLED] is received again within this timeout, it’s doubled, otherwise both throttling and the next shrinking timeout is shrank to 3/4 the previous value.
Optimizations
fetch-bodystructureAllow fetching
BODYandBODYSTRUCTUREFETCH BODY.PEEK[HEADER.FIELDS (..)].fetch-headersAllow fetching specific message headers from remote server.
New in version 2.2.30.
rfc822.sizeAllow passing through message sizes using
FETCH RFC822.SIZE.searchAllow using
SEARCHcommand.Workarounds
fetch-fix-broken-mailsIf a
FETCHreturnsNO(but notNO [LIMIT]orNO [SERVERBUG]), assume the mail is broken in server and just treat it as if it were an empty email.Warning
This is often a dangerous option! It’s not safe to assume that
NOmeans a permanent error rather than a temporary error. This feature should be enabled only for specific users who have been determined to be broken.fetch-msn-workaroundsTry to ignore wrong message sequence numbers in
FETCHreplies whenever possible, preferring to use the returned UID number instead.no-examineUse
SELECTinstead ofEXAMINEeven when we don’t want to modify anything in the mailbox. This is a Courier-workaround where it didn’t permanently assignUIDVALIDITYto anEXAMINEdmailbox, but assigned it forSELECTedmailbox.no-qresyncDisable the QRESYNC extension even if advertised by the IMAP server. This can be used to work around a Zimbra bug where it doesn’t send untagged OK [CLOSED] imap-resp-code when selecting a folder.
New in version 2.3.22.
zimbra-workaroundsFetch full message using
BODY.PEEK[HEADER] BODY.PEEK[TEXT]instead of justBODY.PEEK[]because the header differs between these two when there are illegal control chars or 8bit chars. This mainly caused problems with dsync, but as of v2.2.22+ this should no longer be a problem and there’s probably no need to enable this workaround.
- imapc_list_prefix¶
Default: <empty>
Values: String
Access only mailboxes under this prefix.
Example, for a source IMAP server that uses an INBOX namespace prefix:
imapc_list_prefix = INBOX/
- imapc_master_user¶
Default: <empty>
Values: String
The master username to authenticate as on the remote IMAP host.
To authenticate as a master user but use a separate login user, the following configuration should be employed, where the credentials are represented by masteruser and masteruser-secret:
imapc_user = %u imapc_master_user = masteruser imapc_password = masteruser-secret
Mail user variables can be used.
- imapc_max_idle_time¶
Default:
29 minsValues: Time
Send a command to the source IMAP server as a keepalive after no other command has been sent for this amount of time.
Dovecot will send either
NOOPorDONEto the source IMAP server.
- imapc_max_line_length¶
Default:
0Values: Size
The maximum line length to accept from the remote IMAP server.
This setting is used to limit maximum memory usage.
A value of
0indicates no maximum.
- imapc_password¶
Default: <empty>
Values: String
The authentication password for the remote IMAP server.
If using master users, this setting will be the password of the master user.
- imapc_port¶
Default:
143Values: Unsigned integer
The port on the remote IMAP host to connect to.
- imapc_rawlog_dir¶
Default: <empty>
Values: String
Log all IMAP traffic input/output to this directory.
See also
- imapc_sasl_mechanisms¶
Default:
plainValues: String
The SASL mechanisms to use for authentication when connection to a remote IMAP server.
The first one advertised by the remote IMAP sever is used.
Example:
imapc_sasl_mechanisms = external plain login
- imapc_ssl¶
Default:
noValues:
no,imaps,starttls
Use TLS to connect to the remote IMAP server.
Value
Description
noNo TLS
imapsExplicitly connect to remote IMAP port using TLS
starttlsUse IMAP STARTTLS command to switch to TLS connection
- imapc_ssl_verify¶
Default:
yesValues: Boolean
Verify remote IMAP TLS certificate?
Verification may be disabled during testing, but should be enabled during production use.
Only used if
imapc_sslis enabled.See also
- imapc_user¶
Default: <empty>
Values: String
The user identity to be used for performing a regular IMAP LOGIN to the source IMAP server.
Mail user variables can be used.
Usage Examples¶
Do a regular IMAP LOGIN, using STARTTLS, to imap.example.com:
imapc_host = imap.example.com
imapc_password = secret
imapc_port = 143
imapc_ssl = starttls
imapc_user = user@example.com
Quota¶
Using the imapc quota backend allows asking for the quota from remote
IMAP server (v2.2.30+). By default it uses GETQUOTAROOT INBOX to
retrieve the quota.
There are two parameters that can be used to control how the quota is looked up:
box = <mailbox>: UseGETQUOTAROOT <mailbox>root = <name>: UseGETQUOTA <name>
Example:
plugin {
quota = imapc:root=User Quota
}
