[[fester112:email]]

Email Notifications

The FreeNAS OS and the IPMI monitor can give you warnings and other types of useful information delivered straight to your email account. This is an incredibly useful feature (not to mention important to the security of your data–it's how the system will warn you of problems) and does not take long to setup.

You'll first need to set an email address for the root user. Click “Accounts” in the left column, then “Users”. Click the three vertical dots to the right of the root user, then click “Edit” on the pop-up menu.

In the “Email” text box type in the email account you want to use to receive the messages from your server (Fester uses a Gmail account for this e.g. [email protected]).

Now scroll down this window and click on the “Save” button.

Now click “System” in the left column, then “Email”.

To setup email notifications we must use an email address for one of the user accounts on the FreeNAS server (not your actual external email address e.g. [email protected]). This is an internal email address (i.e. for the server only) and it follows a specific syntax. Here is how it works.

[email protected]

The hostname of your server can be found in the “Dashboard” page and looks something like this.

Here is an example hostname.

So in Fester’s case the internal email address would take this form.

[email protected]

So armed with this information we can now go ahead and start configuring the “Email” page.

In the “From email:” text box type the internal email address you want (Fester’s is [email protected]).

In the “Outgoing mail server:” text box type in the mail server of the email service you use. If you don’t know it you can usually get it from looking on the mail service provider’s website (Fester uses Gmail so this would be set to smtp.gmail.com).

The Gmail service uses port 25 for plain text email, port 465 for SSL encrypted email and port 587 for TLS encrypted email.

In the “Port to connect to:” text box type in the port you need, again if you don’t know it you can usually get it from the mail service provider’s website (Fester uses SSL encryption therefore the port number is 465).

In the “TLS/SSL:” drop down selection box chose if you want encryption or not, and which type (your mail service provider must support your choices).

Put a tick in the “Use SMTP Authentication:” tick box if this is required. If this box is ticked, fill in the fields below.

In the “Username:” text box type in the user name only (not the complete email address) of the external email address you want to use for notifications (in Fester’s case this is Festerservermail).

Next type in the password for your external email account (not the internal server user account) in the “Password:” text box and then retype your password again to confirm it in the “Password confirmation:” text box.

Now click the “Save” button.

Do not click on the “Send Test Mail” button yet as there is a little more work to be done.

The next part applies specifically to Gmail. If you are using a different mail service provider I can’t help you.

Log into your external email account (in Fester’s case this was [email protected]) and navigate to the “My Account” page.

Go to “Connected Apps & Sites” and turn on “Allow less secure apps”.

If you do not do this then Gmail will prevent the server from accessing your external email account and you may receive an email entitled “Sign-in attempt Prevented” or something to that effect in your Gmail inbox.

(Fester does not have screen shots for this. If anyone would like to provide some copyright free ones I would be happy to include them in the guide or you could replace this or any section with your own?)

Now go back to the “System” → “Email” page in FreeNAS and click on the “Send Test Mail:” button (9). If all goes well you should receive an email from your server momentarily.

If you are using 2 step verification with your Gmail account then you will not receive the email. You must go into your Gmail account and do a little more configuration.

In order to do this, you need to create an application password. Go to https://myaccount.google.com/apppasswords and then create a new app password (Select App: Mail, Select Device: Other (Custom Name), Name: FreeNAS) and click on Generate. A popup window will open with your generated app password. Be sure to copy this password to a good location, you can only view it once. Use this password in the password settings for the email authentication.

This will create a revoke-able app password that only allows access to your gmail account.

I don’t know how to do this or if it is even possible to get IPMI to email notifications direct to a Gmail account.

If anyone knows how to do this would you pass on the information and I will try to include it in the guide so everyone can benefit from your knowledge or you could replace this or any section with your own?

  • fester112/email.txt
  • Last modified: 2020/05/12 20:55
  • by robthered