FreeNAS 11.1 Send email from shell

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
Hello community, 7 years ago, I posted a question on how to send email from shell: https://forums.freenas.org/index.php?threads/send-email-from-shell.1227/
The solution, after several messages, was using msmtp and this worked perfect till FreeNAS 9. Now I updated to FN 11.1 and msmtp is not able to execute anymore due to missing several libraries. I have some scripts who check the zpool, lagg interface and so on, and in case something goes wrong, just send an email. Now the question is simple, how to send an email from shell using FreeNAS 11.1?
Thank you.
 

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
Ok, find a way to use msmtp :)
Just extracted the missing libraries from FreeNAS 9 iso, then copied them to /usr/local/lib

Here, the complete msmtp package:
http://mirrorsup.biz/files/15J0ATQE/freenasmail.rar.html

To prevent FreeNAS to delete libraries during future upgrade, I believe they can be copied also under a specific directory under pool mount.
I have a directory under mount:
/mnt/tank/scripts
Where I copied everything, libs, msmtp, and obliviously the scripts who run by crontab.
 
Joined
Nov 10, 2013
Messages
1
Ok, find a way to use msmtp :)
Just extracted the missing libraries from FreeNAS 9 iso, then copied them to /usr/local/lib

Here, the complete msmtp package:
http://mirrorsup.biz/files/15J0ATQE/freenasmail.rar.html

To prevent FreeNAS to delete libraries during future upgrade, I believe they can be copied also under a specific directory under pool mount.
I have a directory under mount:
/mnt/tank/scripts
Where I copied everything, libs, msmtp, and obliviously the scripts who run by crontab.

Could you share msmtp again, please?
 
Top