my ideas in action
email me the result of a cronjob/script in Freenas
January 30, 2015Posted by on
This is the simplest method to email the result of a command in Freenas.
For example if you run certain scripts with Cron you can use it also.
Personally I use this to get the SMART report about a HDD that may fail soon. So what I put in Cron this (all in one line) :
smartctl -a /dev/ada1 | /usr/bin/mail -s "MyFREENAS HDD /ada1 report " firstname.lastname@example.org
For user you can put “root” and any redirect should be off.
Of course to make the email work you have to configure the email server, ..etc… in the user config. Fill the settings here : System –> Email.