I have a cron job, whose output I send to mailx:
# Monday morning at midnight; "mail" is symlink to "mailx"
00 00 * * mon python3 script-with-7500line-output.py | mailx -S 'from=noreply' -s "Report" mygroup@mydomain.com
When the email is delivered, the script's output is in an attachment named ATT0001.bin
.
We like that it attaches the output rather than puts it in the body. But: is there a way to set the name of the attachment?