I do not have a local mail server but wanted any degraded/etc. messages to be sent to my email account.
I used Optware to install msmtp because the default, ssmtp, wasn't playing nicely with TLS/Gmail. I'm assuming this is due to how it was compiled.
ipkg install msmtp
One more package was needed that ipkg didnt solve the dependency for:
ipkg install libiconv
Now we will set up the smtp server you want to connect to, in this case Gmail.
Create the configuration file and edit:
vi /opt/etc/msmtprc (optionally you can have user specific config in each home dir)
defaults account gmail host smtp.gmail.com auth on user email@example.com password changeme port 587 auto_from on tls on tls_certcheck off logfile /root/msmtp.log account default : gmail
Lastly, vi /etc/RAID-message-sender-en.sh and change
/sbin/ssmtp $address <$message to /opt/bin/msmtp $address <$message
Now test it by running this on command line:
mdadm --monitor --scan --test --program=/etc/RAID-message-sender-en.sh
I forgot that you need to set what email address to send the mail to.
echo "firstname.lastname@example.org" > /var/oxsemi/email-recipients