Email Notifications Driver using Node/sendmail on a PI

I'm bringing this thread back to life - hopefully to help anyone else whose notifications using this driver stopped working, like mine did.

When I setup sendmail, I created a dummy Gmail account and used the account option to permit "Less Secure App" access to sendmail from my SBC using the dummy account. As of May 30th, 2022, Google has turned off less secure app access. Instead, they require the use of app specific passwords, which is more secure anyway. Here are the steps needed:

  1. Login to the Google account.
  2. Turn on 2-factor authentication. This is needed to generate app-specific passwords
  3. Generate an app specific password for your sendmail needs and copy down the 16-character password.
  4. On your SBC (most often RPi), go to the directory /etc/mail/authinfo
  5. Edit the sendmail authentication file (I called mine gmail-auth) and replace the less secure cleartext password with the 16-character app-specific password.
  6. Recreate the hash database using the command (assuming your authentication file is called gmail-auth):
    makemap hash gmail-auth < gmail-auth
  7. Stop and restart sendmail

Took less than 5 minutes to get it up and running again after I realized that Google had turned off the "less secure app access" option.

3 Likes