Setting up FreeNAS to use gmail for email service
If you choose to use FreeNAS S.M.A.R.T service then you will want to make sure you have an email service to use for sending emails. I choose to use gmail for this service since it’s rocks. This explains what settings to use.
- Using the FreeNAS WebGUI go to System -> Advanced and select the Email tab.
- Fill in the following fields:
- From Email: youremail@gmail.com
- Outgoing Mail Server: smtp.gmail.com
- Port: 465
- Security: SSL
- Authentication: Check Enable SMTP Authentication
- Username: youremail@gmail.com
- Password: xxxxxxxx
- Authentication Method: Login
Once this is done send yourself a test email by clicking the button and you should have no issue getting an email….. however….
I did have an issue where it couldn’t find the server smtp.gmail.com which appeared to be a dns issue. To fix this I appended google’s dns server to my
/etc/resolv.conf
(which unfortunately this files gets overridden after every reboot, but it didn’t matter since this command kicked it in the butt to get it working).
If you go into System -> Advanced menu, there is option to set commands to be executed after every reboot. I just added new postinit command:
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
Also make sure that root has your mail id where you want to receive mail. pls check below for details
To configure email on FreeNAS 9.3, do the following steps.
Login to FreeNAS web interface and go to System | Email.
Enter your email address in From email section. For example: fitri@gmail.com. Next, specify the Outgoing mail server. If you are using gmail, it would be smtp.gmail.com. Type 465 on Port to connect to, TLS/SSL set to SSL. Check the Use SMTP Authentication option. Enter your gmail username and password. Save it.
Because the email will be sent to root account, we need to setup email for root account. Go to Users and click View Users. Click root username and press Change email. You can
Type the root email and press OK
Now any important log will be sent to your root email address.
2 comments:
Thank you so many years later for this!
Simple and exactly what I needed.
Thanks this worked for me. Though it was rejecting my username and password.
I needed to enable less secure apps
https://support.google.com/accounts/answer/6010255?hl=en#zippy=%2Cif-less-secure-app-access-is-on-for-your-account%2Cif-less-secure-app-access-is-off-for-your-account
Post a Comment