Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Setting Up Email + Gmail + 2 Factor Authentication

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

Do you use email in FreeNAS?

  • Total voters
Not open for further replies.


Apr 28, 2015
I've liked what Google has done security wise lately.. I use 2 factor authentication and wanted to use my Gmail for FreeNAS outgoing mail.. Didn't realize email could still be used with Gmail SMTP+2-factor authentication.. I did the following to enable..

1. Ensure Gmail/Google is functional as you desire with your desired settings.
2. Ensure IMAP is enabled within Gmail Settings.. ?
3. Within the Google Accounts Dashboard.. Access the "Manage Security Page"..
4. Within the security page - 2 factor authentication section click Manage your application specific passwords. Create an application specific password for your freenas box.. Copy it to the clipboard.. **Note: it will only be displayed once ** An email will be sent to your gmail account as a reminder you created this password..
5. Within the Settings>>Email Tab set the appropriate options to utilize gmail.. (See Image Attachment)
6. With Account>>Users>>>View Users>>"Root"- Set an email as indicated in attachment images..
7. Add email to SMART (S.M.A.R.T) settings... (Hint: Add 40 to critical field in SMART setup)
8. Wait for daily freenas email @ 3am local time daily..
9. Enjoy.

Poll included for usage input..

TY Sir! I enabled 2-step and lost my email notifications. This worked perfectly!


Jun 1, 2017
Arg. If FreeNas could implement XOAUTH2 that would be swell.
Five options:
1) Enable "Allow less secure apps"
2) Use 2 factor auth + "Manage your application specific passwords"
3) Wait for XOAUTH2 support
4) Create a second gmail account, with less secure enabled, just for smtp :)
5) NO 2 factor + Disabled "Less secure apps" -> "Manage your application specific passwords" -> "The setting you are looking for is not available for your account." -> Cry :'(

I like idea of 2 factor (and use for other things) but getting locked out of your Google account (when you lose your phone, which I have), is a real risk and a PITA to setup across all the devices.
Not open for further replies.