FreeNAS-scripts icon indicating copy to clipboard operation
FreeNAS-scripts copied to clipboard

save_config_enc.sh sends email as root

Open CV8R opened this issue 2 years ago • 2 comments

Hi, found that save_config_enc.sh sends as root which means email ends up in spam.

Deleted From: root on line 133 to below appears to have done the trick.

printf '%s\n' "To: ${email} Subject: ${subject} Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=\"$mime_boundary\" --${mime_boundary} Content-Type: text/plain; charset=\"US-ASCII\" Content-Transfer-Encoding: 7bit Content-Disposition: inline ${savestatus} Server: ${freenashostname} Version: ${freenasversion} File: ${fnconfigdest} "

CV8R avatar Aug 17 '22 04:08 CV8R

I think you could simply replace From: root by a valid email like "From: [email protected]". Else, most providers detect it as spam

PhilZ-cwm6 avatar Aug 18 '22 14:08 PhilZ-cwm6

On my older FreeNAS 11.2-U8 systems, FreeNAS transmits root email using the account credentials I set up on System->Email So the mail I receive doesn't have 'root' as the sender -- it has the email account username instead.

Spearfoot avatar Aug 24 '22 13:08 Spearfoot