Skip to content

Instantly share code, notes, and snippets.

@gwire
Last active September 6, 2024 17:21
Show Gist options
  • Save gwire/4f3fedb2eb71a9b5f3878ee8d2aaefd3 to your computer and use it in GitHub Desktop.
Save gwire/4f3fedb2eb71a9b5f3878ee8d2aaefd3 to your computer and use it in GitHub Desktop.
Notes on common IMAP keywords

IMAP4 Keywords are small bits of metadata that can be attached to stored email messages.

They're free-form text, but the convention is that

  • \ indicates a system keyword
  • $ indicates a keyword with a common meaning

See the IMAP4 spec and the IANA registry

Keyword Status Notes
\Seen System Required
\Answered System Required
\Flagged System Required
\Deleted SystemRequired
\Draft System Required
\Recent Deprecated Not a user-set keyword
$MDNSent IANA registered in IMAP RFC
$Forwarded IANA registered in IMAP RFC
$SubmitPending IANA registered
$Junk IANA registered in IMAP RFC
$Phishing IANA registered in IMAP RFC
$Important IANA registered
$MailFlagBit0 Apple Mail Keywords combine to represent flag colours
$MailFlagBit1 Apple Mail
$MailFlagBit2 Apple Mail
$label1 Thunderbird Label names are stored internally and not on server
$label* Thunderbird
Junk Custom Deprecated in 2010, replaced by $Junk
NotJunk Custom Deprecated in 2010, replaced by $NotJunk
JunkRecorded Custom Is this Apple Mail?
Redirected Custom
unknown-0 Custom Missing tag information in Dovecot
OIB-Seen-* Custom OtherInbox service?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment