On Sun, May 29, 2005 at 09:15:46PM +0100, 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.

Good.  This is the simplest, unless you are managing a farm of multiple
platforms and need a script that works on all of them.

> 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 :-) )

freshclam --quiet suppresses all of the informational messages that go
to stdout.  The shell construct 2>&1 redirects stderr into stdout, so
that any remaining output from freshclam (in this case, what would
normally be the stderr stream, generated by errors or warnings) will go
throught the pipe into the mail command.

As has been previously noted, though, the '| mail .. ' construct will
generate an empty email on every successful run, and an email with
content if there is an error.  That is not something I would want, but
tastes vary.
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | Conversation, n.:  A vocal competition  |
|  [EMAIL PROTECTED]             | in which the one who is catching his    |
|  http://www.lobefin.net/~steve | breath  is called the listener.         |
 --------------------------------------------------------------------------

Attachment: pgpjmvjLQP2zn.pgp
Description: PGP signature

_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to