From 7249314641abfc299149b9df64ade35e44f848a7 Mon Sep 17 00:00:00 2001
From: Andrea Mazzoleni
-Create the file: Create a file named .netrc in the home directory of the user specified in notify_run_as_user. It's root if notify_run_as_user is not set.
+Create the .netrc file Create a file named .netrc in /root/ directory ($HOME directory of the root user) with the following content:
machine smtp.gmail.com
login your_email@gmail.com
-password your-16-char-app-password
+password your-16-char-app-password-without-spaces
-Note: You must use a Google "App Password," not your primary account password. You can generate this in your Google Account security settings under "2-Step Verification" by scrolling to the bottom and selecting "App Passwords." +Note: If notify_run_as_user is set, the directory to use is the user $HOME directory and not /root/. +
++Note: You must use a Google App Password, not your primary account password. You can generate this in your Google Account security settings under 2-Step Verification by scrolling to the bottom and selecting App Passwords.
-Set Permissions: Secure the file using
chmod 600 .netrc. If permissions are too open or the file is owned by the wrong user, curl will return Error 55. +Set Permissions Secure the file using chmod 600 .netrc If permissions are too open or the file is owned by the wrong user, curl will return error 55.
-Configure the Command: +Configure the Command +In your snapraidd.conf use the following configuration:
@@ -1007,45 +1011,43 @@ How do I configure Gmail email notifications on Window?diff --git a/style.css b/style.css index 1fe9215f..12a4984c 100644 --- a/style.css +++ b/style.css @@ -563,6 +563,12 @@ nav a:hover, nav a.active { padding-left: 0.5rem; } +.faq-answer b { + font-weight: bold; + font-family: var(--font-mono); + color: var(--text-accent); +} + .faq-answer table { width: 100%; border-collapse: collapse;-To send notifications through Gmail from SnanRAID Daemon, you have two primary options: +To securely send notifications through Gmail from SnanRAID Daemon on Window, follow these steps:
++
- +
-Option 1: Using a _netrc file (Recommended) -
-Place a file named _netrc (note the underscore) in the System Profile directory: C:\Windows\System32\config\systemprofile\_netrc. +Create the _netrc file Create a file named _netrc in the C:\Windows\System32\config\systemprofile\ directory with the following content:
machine smtp.gmail.com login your_email@gmail.com -password your-16-char-app-password +password your-16-char-app-password-without-spaces-Note: You must use a Google "App Password," not your primary account password. You can generate this in your Google Account security settings under "2-Step Verification" by scrolling to the bottom and selecting "App Passwords." +Note: You must use a Google App Password, not your primary account password. You can generate this in your Google Account security settings under 2-Step Verification by scrolling to the bottom and selecting App Passwords.
+- +
-Ensure only SYSTEM and Administrators have NTFS read access to this file. Use the following configuration: +Set Permissions Ensure only System and Administrators have read access to this file. +
+- +
++Configure the Command +In your snapraidd.conf use the following configuration:
-notify_result = curl.exe --netrc --url "smtps://smtp.gmail.com:465" --ssl-reqd - --mail-from "your_email@gmail.com" --mail-rcpt "your_email@gmail.com" --upload-file - -(the command must be entered as a single continuous line in your configuration file) -- --Option 2: Using Command Line Credentials -
-
-If you cannot use a _netrec file, you can pass your Gmail credentials directly via the --user flag. Note that this is less secure as the app password may be visible in process monitoring tools. --
-notify_result = curl.exe --user "your_email@gmail.com:your-app-password" --url "smtps://smtp.gmail.com:465" - --ssl-reqd --mail-from "your_email@gmail.com" --mail-rcpt "your_email@gmail.com" --upload-file - +notify_result = curl --netrc --url smtps://smtp.gmail.com:465 --ssl-reqd + --mail-from your_email@gmail.com --mail-rcpt your_email@gmail.com --upload-file - (the command must be entered as a single continuous line in your configuration file)+