0
I've been actively tweaking my backup script on an Ubuntu 9.04 Jaunty Jackalope Machine - as it is now, the script uses rsync and cron to backup certain folders several times a day. At the end of the script, I use a set of echo commands to generate log files that would indicate, among other things, whether or not the backup had been executed during a particular time. What's the easiest way to make Jaunty automatically email me the logs just shortly (0-15 minutes) after they have been generated? Would I be able to use the SMTP of my gmail account for this purpose?
Really? I didn't know that - how to I setup cron to email its output? By the way, I'm using cron as root. I have Evolution setup for outgoing mail, is that what cron would be using?
Thanks for this! :) – techtechmo – 2009-09-10T22:46:08.427
techtechmo, I edited my answer with additional comments on how to set up an email server on your system. – Vebjorn Ljosa – 2009-09-11T11:49:27.070
techtechmo: cron doesn't know and doesn't care about your Evolution setup. It just calls the local MTA - usually /usr/bin/sendmail (which often is a symlink to postfix or exim4) – user1686 – 2009-09-11T11:52:54.163
1
Setting up an email server just to send a file seems a bit overkill. There are other possibilities to email something with outside smtps. See this answer: http://superuser.com/questions/39634/sending-mail-from-the-command-line-in-an-automated-way/39647#39647
– dertoni – 2009-09-11T13:17:54.863I actually found that answer yesterday too, I was trying to figure out how I could link it to this post as answer but obviously I was not successful. So I just upvoted on the post.
I'm happy to report that because of sendEmail I have finally been able to successfuly integrate a confirmation email and twitter post into my script. Woohoo! :) – techtechmo – 2009-09-12T06:09:08.493