From 44ff1536092ae43dc20d18422a2be9fceffeface Mon Sep 17 00:00:00 2001 From: Tobias Nordahl Kristensen Date: Sat, 17 Oct 2020 12:30:22 +0200 Subject: [PATCH] Info about Gmail App Password and X-GM-RAW example (#15274) Co-authored-by: Franck Nijhof --- source/_integrations/imap.markdown | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/_integrations/imap.markdown b/source/_integrations/imap.markdown index 69ab4df1c7d..75faa86a979 100644 --- a/source/_integrations/imap.markdown +++ b/source/_integrations/imap.markdown @@ -62,6 +62,17 @@ charset: type: string {% endconfiguration %} +### Gmail with App Password + +If you’re going to use Gmail, it’s always good practice to create a [App Password](https://support.google.com/mail/answer/185833?hl=en). + +1. Go to your [Google Account](https://myaccount.google.com/) +2. Select **Security** +3. Under “Signing in to Google” select **App Passwords** +4. Sign in to your Account, and create a new App Password for Gmail. + +You can now use this as your password for Gmail, in your configuration. + ### Configuring IMAP Searches By default, this integration will count unread emails. By configuring the search string, you can count other results, for example: @@ -81,6 +92,8 @@ sensor: username: YOUR_USERNAME password: YOUR_PASSWORD search: FROM , SUBJECT + # Or use X-GM-RAW search-term like this, to find unread emails from the last 7 days in your inbox + # search: "X-GM-RAW 'in: inbox newer_than:7d is:unread'" # Example configuration.yaml entry for Office 365 sensor: