Email Notifications
The FreeNAS OS and the IPMI monitor (I think, but I have not figured this out yet) 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.
Setting Up Email Notifications From The FreeNAS Web GUI
Start by deciding which User from the “Accounts” → “Users” page you wish to use for this facility. Incidentally, you do not need to restrict yourself to just one user you can utilise as many as you like.
Fester uses the root account for this so go to the “Accounts” page (1) and click on the “Users” button (2).
Now select the “root” account (1) by clicking on it (it should turn blue when you do) and then click on the “Modify User” button (2).
In the “E-mail:” 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 “OK” button.
Now go to the “System” page (1) and click on the “Email” button (2).
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.
The hostname of your server can be found in the “System” → “Information” page and looks something like this.
Here is an example hostname.
So in Fester’s case the internal email address would take this form.
So armed with this information we can now go ahead and start configuring the “Email” page.
In the “From email:” text box (1) type the internal email address you want (Fester’s is [email protected]).
In the “Outgoing mail server:” text box (2) 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 (3) 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 (4) 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 (5) if this is required.
In the “Username:” text box (6) 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 (7).
Now click the “Save” button (8).
Do not click on the “Send Test Mail” button (9) 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.
Configuration Of A Gmail Account With 2 Step Verification
Unfortunately Fester cannot help you because he doesn’t know how.
If anyone would like to provide the information with some copyright free screen shots I will try to include them in the guide or you could replace this or any section with your own?
Setting Up Email Notifications From The IPMI Web GUI
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?