diff --git a/source/_components/sensor.imap.markdown b/source/_components/sensor.imap.markdown index 27ae8f63c78..e993ffbd0fd 100644 --- a/source/_components/sensor.imap.markdown +++ b/source/_components/sensor.imap.markdown @@ -57,4 +57,18 @@ folder: required: false default: inbox type: string +search: + description: The IMAP search to perform on the watched folder. + required: false + default: UnSeen UnDeleted + type: string {% endconfiguration %} + +### {% linkable_title Configuring IMAP Searches %} + +By default, this component will count unread emails. By configuring the search string, you can count other results, for example: + +* `ALL` to count all emails in a folder +* `FROM`, `TO`, `SUBJECT` to find emails in a folder (see [IMAP RFC for all standard options](https://tools.ietf.org/html/rfc3501#section-6.4.4)) +* [Gmail's IMAP extensions](https://developers.google.com/gmail/imap/imap-extensions) allow raw Gmail searches, like `X-GM-RAW "in: inbox older_than:7d"` to show emails older than one week in your inbox. Note that raw Gmail searches will ignore your folder configuration and search all emails in your account! +