Simon Chapman wrote:
What does the command 'root' do? (root cat /home/rogier/backup)
it runs the command as root - I was assuming that the command goes in your root crontab, which of course it may not. Sorry about that. :-)
Currently, I have this in my crontab:
0 0 * * * /home/rogier/backup >/dev/null 2>/dev/null
I could make that into:
0 0 * * * /home/rogier/backup >/dev/null 2>/dev/null; cat backup | sendmail -f backup@host icarus@guldennet.nl
If I cat the backupfile, wouldn't that leave me with a mail full of rubbish instead of a mail with the file as an attachment?
Well, yeah, I guess it would. I'm so used to mailing myself (or other people) plain text files that I didn't consider that. Perhaps I'll just go away and not give people dumbass advice :-)
Oh hehe.. Don't go away now, you've just learnt me something new about executing cronjobs! ;-D I guess the right question would be: How can I mail a binary file as an attachment along with my mail-body? When I do: echo "Hello, here is your binary file" | mail icarus@guldennet.nl -s "Binary file" But this doesn't get me the binary file I've been waiting for all week. I could just do: cat file | mail icarus@guldennet.nl -s "Binary file" But this would get me rubbish. I just cannot send a binary file in this manner. I'm working on a script that can send MIME-encoded messages with binary files as attachments. It is finished, but to one thing: When I have a complete mailfile, sendmail -i user@domain.com < script gives me an attachment, but that one is empty. I haven't got a clue how I can insert binaries into that stupid (sorry) sendmail thingy. Am I re-inventing the wheel here? Rogier -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/