I would like to write a script that sends the configuration file (/data/freenas-v1.db) as an email attachment
I've seen a script for freenas that uses uuencode and mail, but uuencode is not available on truenas scale
a possible alternative is base64 but this sends the encoded file as a message not as an attachment
there are references to the "-a" flag of mail/mailx for attachment, but on truenas this serves to specify header fields
I could use python and smtplib, but this excessive for this small task
What is the recommended way to send an attachment by email in truenas scale?
Better yet, is there a working script to backup the configuration?
I've seen a script for freenas that uses uuencode and mail, but uuencode is not available on truenas scale
a possible alternative is base64 but this sends the encoded file as a message not as an attachment
there are references to the "-a" flag of mail/mailx for attachment, but on truenas this serves to specify header fields
I could use python and smtplib, but this excessive for this small task
What is the recommended way to send an attachment by email in truenas scale?
Better yet, is there a working script to backup the configuration?