Removing GMail OAuth config doesn't work

CLEsportsfan

Dabbler
Joined
Nov 23, 2020
Messages
20
In trying to configure email server settings for alerts, I briefly tried GMail Oauth config. After switching settings back to SMTP, my TrueNAS box still tries to connect to Google via HTTPS and won't use SMTP. Somehow, the settings must still be configured somewhere with the GUI showing SMTP. I removed the third-party access from the GMail account I was using but that still doesn't work. Sending an email results in the following message in TrueNAS
Code:
EMAIL
Error: [EFAULT] Failed to send email: ('invalid_grant: Token has been expired or revoked.', '{\n "error": "invalid_grant",\n "error_description": "Token has been expired or revoked."\n}')

I can't easily reboot TrueNAS since it's our VMWare datastore. Anything I can run via CLI to check what's configured or remove GMail OAuth? Running TrueNAS-12.0-U1
 

CLEsportsfan

Dabbler
Joined
Nov 23, 2020
Messages
20
Does anyone have ideas about forcing TrueNAS to use SMTP?
 

CLEsportsfan

Dabbler
Joined
Nov 23, 2020
Messages
20
Nevermind, I figured it out on my own and it's working.

I ran sqlite3 /data/freenas-v1.db "update system_email set em_oauth='';" to remove oauth settings saved in TrueNAS to get it back to default.
Also, there's a bug in TrueNAS-12.0-U1 that forces SMTP authorization to be used and sqlite3 /data/freenas-v1.db 'update system_email set em_smtp=0, em_user=null, em_pass=null;' removes that requirement.
 
Top