How to set up unRAID notification using Gmail SMTP settings


wepee

Recommended Posts

Hi All,

 

Just want to share out my findings about unRAID notification.

My notification settings are based on Gmail.

 

This how-to will enable the user to send email notification

from Gmail to Yahoo email.

 

If you like my how-to, then make it a sticky.

 

Thank you.🙂

 

========================================================================

Requirements:
    
        A) Setup a gmail account.

        This account will be the SENDER's email address

        << Assumption: you have setup 2-step authentication via you mobile phone

        for logging into your gmail account >>
    
        B) Setup a second gmail or any other free webmail account.

        eg: [email protected]

        This account will be the RECEIVER's email address

 

========================================================================

       

You need to set up google App Password.
            
            1) login into: accounts.google.com
    
            2) Go to "Security" on your left section.
    
            3) Under the heading: "Signing in to Google"
                
                3.1) Click on App passwords
        
                3.2) Sign in your normal gmail accounts
    
                3.3) click: Select app, then select: Mail
        
                3.4) click: Select device, then select: Custom
                
                3.5) Give a name for the unRAID server

                    e.g: midtowerunraid
                
                3.6) Press Generate button
                
                3.7) A window will pop out and app password for the device
                is display in the yellow box. Copy the password and keep
                in a safe place and save in notepad. This password is 16
                character long. Next click the button: Done
                
                e.g: sskwowcomemtyufg <----- 16 character long app password.
    
                3.8) Finally sign out all accounts

 

Follow the steps below, to complete SMTP settings within unRAID server

 

Unraid-notification-Gmail-setting.jpg

Edited by wepee
  • Like 16
  • Thanks 9
Link to comment
  • 2 months later...

This worked great. If for some reason you don't have the option called App Passwords (like I did), according to google it's one of these reasons. I had to enable 2-step verification and then app passwords showed up upon refresh.

 

2-Step Verification is not set up for your account.

2-Step Verification is set up for security keys only.

Your account is through work, school, or other organization.

You’ve turned on Advanced Protection for your account.

Link to comment
  • 9 months later...
  • 3 weeks later...
On 3/13/2021 at 3:05 PM, RealActorRob said:

You don't need two email accounts.

 

You can send it to your gmail address, i.e., use the same @gmail account in both fields.

 

You can but, in my case at least, that created issues with Gmail having already marked the messages as read because I was sending them to myself and they did not show up in my inbox. I had to use the + hack to modify the alias ([email protected]) and them create a rule to ensure they did not bypass the inbox or arrive as already read. Although they still showed as From: me in the display. It was just easier to create a second gmail account with a name that was easily identified as being a notification from my unraid server.

Link to comment
  • 8 months later...

I have this configured but it fills up my "sent" items in Gmail with the daily notifications. I changed the sending email address but I still get it showing up in "Sent" and it still appears in the "From" field, with the sending address only shown for reply-to, as in the third screenshot below. How to fix this?

Settings:

I8v1krh.jpg

Sent folder:
NI4vOFy.jpg

 

Received email:
L6Y0kx5.jpg

Edited by partyhat
Link to comment

I don't understand why UNRAID gmail notification needs my google password. Even a generated google app password "gives complete access to your google account", per Google.

Seems too risky for a notification.

 

I guess it's because there has to be a real user account generating & sending the email?

Your explanation is greatly appreciated.

  • Like 1
Link to comment
  • 1 month later...

wepee,

when I got o my google account and my Gmail account, I do not see anything that relates to your steps - my comment in parenthesis.

     3.1) Click on App passwords  (I do not see this choice)
     3.2) Sign in your normal gmail accounts
     3.3) click: Select app, then select: Mail
     3.4) click: Select device, then select: Custom  (I do not see this choice)

Link to comment

I see on 2nd post that I do not see the choices above because I do not have 2 step verification setup in gmail.  So instead, in gmail settings, I went to "security" and set "Less secure app access" to "on".  So I got it to work and it passed the unraid test email.  My unraid settings at "Notifications" for email looked like the screenshot by Partyhat, not the OP screenshot.

 

If I could have figured out how to use my hotmail instead, I would have preferred, but I could not get that to work.

Edited by xrqp
Link to comment
  • 4 months later...

Thanks for the note on needing to setup 2-factor to be able to access App Passwords.

 

Google finally disabled "less secure apps" on my account so I had to add 2-factor so I can add an app password and get email notifications working again.  Also took that opportunity to setup the discord notifications as well as those are pretty easy to set up now.

Link to comment
  • 2 months later...
  • 2 months later...
  • 5 months later...

The problem is with Google. You can't use  smtp.gmail.com:587  with your normal gmail password.

Enable 2FA and get the app password to send notification via gmail.

I would appreciate unraid support to update this in the help menu so everyone knows.

 

* Wasted half a day working on this

Link to comment

Hey All

 

Sorry this is an old thread, but I was setting up the back up script with email notifications, but I couldn't get gmail working as "Less secure app access" is no longer supported by Google, and I don't want to use 2FA at the moment on the email account.

 

Is there an alternative to getting email notifications via SMTP as I tried outlook mail but this also failed for me.

 

TIA

PEACE

Kosti

Link to comment
1 hour ago, Kosti said:

Hey All

 

Sorry this is an old thread, but I was setting up the back up script with email notifications, but I couldn't get gmail working as "Less secure app access" is no longer supported by Google, and I don't want to use 2FA at the moment on the email account.

 

Is there an alternative to getting email notifications via SMTP as I tried outlook mail but this also failed for me.

 

TIA

PEACE

Kosti

 

I haven't explored other email providers, but since Gmail is free, I set up an email address just for my server to use so that I can easily filter emails on my main email that are sent from the server's email address.

Link to comment
  • 5 weeks later...

Greetings all, I have been pounding my head on the wall trying to get gmail notifications to work with no luck. 

 

I feel I have tried every combination avalible to try and log in.  

 

I have 2FA on, I'm using a new mail app password, I have tried 465 and 587 port, I have tried the login with and without the @gmail.com.  I feel I'm missing something stupid, but I keep getting the error of "No reply from mail server".

 

Can anyone give me some other ideas to look at, maybe a setting I'm missing in google or something.  Any help would be great, thanks!!

 

 

email.png

Link to comment
46 minutes ago, mellow65 said:

Greetings all, I have been pounding my head on the wall trying to get gmail notifications to work with no luck. 

 

I feel I have tried every combination avalible to try and log in.  

 

I have 2FA on, I'm using a new mail app password, I have tried 465 and 587 port, I have tried the login with and without the @gmail.com.  I feel I'm missing something stupid, but I keep getting the error of "No reply from mail server".

 

Can anyone give me some other ideas to look at, maybe a setting I'm missing in google or something.  Any help would be great, thanks!!

 

 

 

Spoiler

email.png

 

 

 

Here are my Unraid settings below.  Just make sure when you copy/paste the App Password from your 2FA section of your Google Account that it isn't adding an extra space or tab character at the start or end of it.

 

 

Spoiler

image.thumb.png.2a4d669f821725f6d560f90b050f4502.png

 

Link to comment

Still no luck.  I  tried swapping to a different gmail account to factor that varible out. Even more I tried a yahoo account still with no luck, with and without the @yahoo.com.  But when I ping the yahoo server I get nothing back, the plot thickens.  🤔

 

Other things I've tried, currently my server is behind a VPN, I dropped that and still no luck.  About the only other thing I can try is to take down my nextDNS resolver, and see if that has anything to do with it.  

email2.png

Link to comment
12 minutes ago, axipher said:

 

 

Here are my Unraid settings below.  Just make sure when you copy/paste the App Password from your 2FA section of your Google Account that it isn't adding an extra space or tab character at the start or end of it.

 

 

  Reveal hidden contents

image.thumb.png.2a4d669f821725f6d560f90b050f4502.png

 

 

I dropped the password into a text file to look at it first, no extra spaces or characters. 

 

Link to comment

Ok so bunch more trying things with still no luck.

 

I dropped my DNS resolver

I dropped my VPN

I changed DNS to 8.8.8.8

I redid an app password, dropped it into a text file to make sure there were no spaces or other weird things being copied in

I tried 465 and 587 in all configurations

I can ping smtp.gmail.com and get a respond

I tried yahoo email with no success 

 

I'm out of ideas to try.  🤷‍♂️

 

I will say, the only time I get a different response than "No reply from mail server" is when I trying 587 and Use STARTTLS is NO.  I still get the error "Cannot open smtp.gmail.com:587", while that doesn't fix anything, at least it's some sort of different response. 

 

Thanks for the input and I'll keep poking around and see if I find anything else.  

 

 

Link to comment
  • 3 months later...
On 5/19/2020 at 10:18 PM, wobblybob said:

This worked great. If for some reason you don't have the option called App Passwords (like I did), according to google it's one of these reasons. I had to enable 2-step verification and then app passwords showed up upon refresh.

 

2-Step Verification is not set up for your account.

2-Step Verification is set up for security keys only.

Your account is through work, school, or other organization.

You’ve turned on Advanced Protection for your account.


In my case, none of these were true - I'm on a personal account and I've had 2FA enabled for years - but it still wouldn't show me the App Passwords option. I poked around for a while and eventually found that the url https://myaccount.google.com/apppasswords works even though it doesn't show up in the security settings.

After that, when I did finally get google to give me an app password, I tried just copy-pasting it to unraid, but that got an authentication error. Eventually I realized that even though the password was really 16-characters, google had put spaces after every 4 characters for readability (or whatever), so when I copy-pasted I got extra spaces that weren't part of the password. I had to paste it into a notepad, delete the spaces, then copy it into unraid.

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.