Hello friends of OMV
i made a simple script for a rsync job, ther pulls Data from my Synology to my OMV box.
This works as suspected
Now I want to get an email with a summery in the end of the job.
My rsync job looks like this (rsync.log for OMV interface and rsync.txt for email attachment):
rsync -ahv --delete --stats --log-file="/var/log/rsync.log" --log-file="/var/log/rsync.txt" -e "ssh -p 222 -i /etc/ssh/openmediavault-06d0beb8-a3dc-4bde-a404-1092fc1810b3" MyUser@192.168.1.6::Thumbnails /srv/afece2ad-7c23-492c-a29c-69657c1f5d0d/Syno_Backups/Thumbnails/
As I read here, OMV uses "mail" as a Linux command to send mails.
After a few tries with -A (like described here), I found out, that it has to be a small -a bevore the mail address.
So I try to use this after my rsync:
echo "rsync finished. Find output attached as rsync.txt" | mail -s "rsync finished" -a "/var/log/rsync.txt" MyPersonal@mail.com
But this does not work.
I testet without attachment, and this worked like a charm, but with -a and and attachment it did not work.
My email just looks like this (without attachment):
After a search for help I found this site, but I cannot get this working in OMV
Can anybody help me getting a short mail with the rsync log in the end?
Best would be with subject If it failed or succeeded
Any help appreciated