Timothy Omer said: > > Thank you all for your help, MAILTO does seem to work. I will try the > suggestion above as I can add my own subject. > > Not sure what 2>&1 does, is there any way I can create an error to test > this? (Obviously I can not disconnect the internet to create an update > error, as I would not receive the email :-) )
&1 is a symbolic reference to stdout which is the console or current term. Stderr is "2" so this directs all stderr to the same place as stdout. This is piped to mail. A description should be found in man sh. The need for doing this is to capture the stderr output of freshclam to a pipe to mail otherwise it is sent to the crontab owner by default. You could try a trivial example by creating a cron job that will fail. This can be done by requesting execution of a process that doesn't exist. * * * * * /tmp/junk 2>$1 |/usr/bin/mail -s "this is a test" [EMAIL PROTECTED] If you were to do this professionally you should include the full path to mail as well as your executable. It's a security thing and failure to do so it seen as a rookie mistake. Otherwise it will find the first example of either somewhere in the system path. It can be real embarrasing when somebody has created a script that contains "echo > /etc/passwd" in it and your cron process finds it because you've not used a fully qualified path. Suggestions like this seem to cause big sig guy to rant about arrogance - just ignore him. dp _______________________________________________ http://lurker.clamav.net/list/clamav-users.html