Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions source/_components/sensor.imap.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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!