AERC-IMAP(5)

✨ aerc-imap ✨

okay bestie, welcome to the aerc-imap manual page β€” she's part of the aerc(1) family and she's literally all about getting your IMAP life together πŸ’Œ


🌸 NAME 🌸

aerc-imap β€” the IMAP configuration page for aerc(1), aka the glow-up guide for your mail account πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

So here's the vibe: aerc implements the IMAP protocol exactly as specified by RFC 3501, and on top of that she speaks these IMAP extensions, no cap:

like, she's fluent πŸ’…


πŸ’– CONFIGURATION πŸ’–

The basic IMAP setup can be done interactively with the :new-account command β€” yes, a whole wizard, we love a low-effort moment ✨

Then, inside accounts.conf (peep aerc-accounts(5) for that whole situation), these IMAP-specific options are available:

  • source =
<scheme>://<username>[:<password>]@<hostname>[:<port>]?[<oauth2_params>]

okay IMPORTANT: every single field has to be URL encoded, bestie. The @ symbol, when URL encoded, is %40. Don't forget or she will simply not work 😭

The possible values of <scheme> are:

  • imap β€” IMAP with STARTTLS
  • imap+insecure β€” IMAP without STARTTLS
  • imaps β€” IMAP with TLS/SSL
  • imaps+insecure β€” IMAP with TLS/SSL, but skipping certificate verification
  • imaps+login β€” IMAP with TLS/SSL using the LOGIN authentication mechanism. This one is the fallback when PLAIN authentication isn't available. Most users should not need to specify this explicitly 🫢
  • imaps+oauthbearer β€” IMAP with TLS/SSL using OAUTHBEARER Authentication

and here's the <oauth2_params> tea β˜•:

If specified and a token_endpoint is provided, the configured password is used as a refresh token to obtain an access token. If token_endpoint is omitted, the refresh token exchange is skipped entirely, and the password just acts like an access token instead. iconic behaviour honestly.

  • token_endpoint (optional)
  • client_id (optional)
  • client_secret (optional)
  • scope (optional)

Example, because we're visual learners:

imaps+oauthbearer://...?token_endpoint=https://...&client_id=
  • imaps+xoauth2 β€” IMAP with TLS/SSL using XOAUTH2 Authentication. The parameters are the same as OAUTHBEARER, so no new lore πŸ”₯
  • source-cred-cmd = <command> β€” tells aerc which command to run to get the password for the IMAP account. This command will be run using sh -c command. And heads up: if a password is specified in the source option, that password takes precedence over this command πŸ‘‘

Example:

source-cred-cmd = pass hostname/username

Default: 90s

  • keepalive-period = <duration> β€” the interval between the last data packet sent (simple ACKs are not considered data, bestie) and the first keepalive probe. Once the connection is marked as needing keepalive, this counter is not used any further. See https://pkg.go.dev/time#ParseDuration.

By default, the system tcp socket settings are used.

  • keepalive-probes = <int> β€” the number of unacknowledged probes to send before considering the connection dead and notifying the application layer πŸ’€

By default, the system tcp socket settings are used. If keepalive-period is specified, this option defaults to 3 probes.

This option is only supported on linux. On other platforms, it will be ignored. sorry babes 🫠
  • keepalive-interval = <duration> β€” the interval between subsequential keepalive probes, regardless of what the connection has exchanged in the meantime. Fractional seconds are truncated, so no half-seconds for you.

By default, the system tcp socket settings are used. If keepalive-period is specified, this option defaults to 3s.

This option is only supported on linux. On other platforms, it will be ignored. same energy as above πŸ™ˆ
  • check-mail-include = <folder1,folder2,folder3...> β€” the comma separated list of folders to include when checking for new mail with :check-mail. Names prefixed with ~ are interpreted as regular expressions πŸ‘€ This setting is ignored if your IMAP server supports the LIST-STATUS command, in which case all folders will be checked.

By default, all folders are included.

  • check-mail-exclude = <folder1,folder2,folder3...> β€” the comma separated list of folders to exclude when checking for new mail with :check-mail. Names prefixed with ~ are interpreted as regular expressions. This setting is also ignored if your IMAP server supports the LIST-STATUS command, in which case all folders will be checked. Note that this overrides anything from check-mail-include β€” she's the main character here πŸ’…

By default, no folders are excluded.

  • cache-headers = true|false β€” if set to true, headers will be cached. The cached headers get stored in $XDG_CACHE_HOME/aerc, which defaults to ~/.cache/aerc πŸ“

Default: false

  • cache-max-age = <duration> β€” defines the maximum age of cached files. Note: the longest unit of time cache-max-age can be specified in is hours. Set to 0 to disable cleaning the cache.

Default: 720h (30 days)

  • idle-timeout = <duration> β€” the length of time the client will wait for the server to send any final update before the IDLE is closed.

Default: 10s

  • idle-debounce = <duration> β€” the length of time from the last client command until the idler starts.

Default: 10ms

  • expunge-policy = auto|low-to-high|stable β€” the deletion policy used when deleting multiple messages in one shot. auto attempts to automatically detect it, and will be correct most of the times. low-to-high specifies that the server deletes messages in increasing sequence number order (this is what GMail and FastMail do, and is correctly handled by the automatic detection). stable specifies that the server does not mutate the sequence numbers it received (this is what Dovecot and WorkMail do, and is not reliably automatically detected β€” so be careful with that one, fr fr).

Default: auto

  • debug-log-path = <path> β€” the path where to store low-level IMAP debug logs (genuinely useful to debug interactions between aerc and IMAP servers πŸ”). If this path is writable, aerc will create and log to one file per account, called imap_debug_ACCOUNTNAME.log.

By default, low-level IMAP debug logs are not generated.


🌈 SEE ALSO 🌈

aerc(1) aerc-accounts(5)


πŸ‘‘ AUTHORS πŸ‘‘

Originally created by Drew DeVault and maintained by Robin Jarry who is assisted by other open source contributors. For more information about aerc development, see https://sr.ht/~rjarry/aerc/.


and that's the whole page, bestie 🫢 this edition is dated 2026-09-07, from the File Formats Manual corner of the universe, filed under AERC-IMAP(5) β€” slay, go configure your mail βœ¨πŸ’œ

πŸ“¦ where this page comes from