On Mon, 27 Jan 2020 13:06:17 -0800 (PST)
Rich Shepard <rshep...@appl-ecosys.com> dijo:

>On Mon, 27 Jan 2020, John Jason Jordan wrote:
>
>> So just now I made a script so I could have more than one line, and
>> having done so I ran it from the terminal. The script ended with:
>>
>> mail: cannot send message: Process exited with a non-zero status

>Did you look in /var/log/ to see if that error shows up in a file?

Yes, found no files about rsync or mail. Looked in syslog, but no
messages about rsync or mail, either.

One thing that may be hanging up the mail is that if I just do 'mail
some...@somedomain.com' from the command line it immediately pops up a
line expecting me to add a Cc. I scoured the mail and mailutils man
pages and found no way to tell it to shut up and just send the mail. I
also don't know what to add for the Cc line; it hangs the mail until I
give it what it wants, so I have to kill mail.

Here is the current incarnation of my script:

#!/bin/bash
MAILTO=some...@gmx.com
TS=`date`
rsync -av --delete /home/jjj/ /media/jjj/Data/JJJ
mail -s "$TS Home Backup Done Exit Status $?" $MAILTO

This now ends with the Cc line, and hangs waiting for input. And if I
just do 'echo $TS Home Backup Done Exit Status $?' it displays the
information that I want, so the -s line above should work, if I can
just get it to send the mail.

Of course, I don't know what would happen to the e-mail if the exit
status is other than 0, assuming I can finally get it to work.
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to