Mailinglist Archive: opensuse (3434 mails)

< Previous Next >
Re: [opensuse] amavisd warning failure?
  • From: Sandy Drobic <suse-linux-e@xxxxxxxxxxxxxxxxxxxxxxx>
  • Date: Fri, 01 Feb 2008 21:38:50 +0100
  • Message-id: <47A3835A.4040800@xxxxxxxxxxxxxxxxxxxxxxx>
Sloan wrote:
Sandy Drobic wrote:
and finally, that you call fresh-clam from cron.


Why call fresh-clam from cron?

I'm curious as to any possible pros/cons because I run freshclam as a
daemon and it periodically checks for updates as configured in
/etc/freshclam.conf

I had happened to me that fresh-clam silently died on me and the signatures were not updated any more. That's the reason why I am calling fresh-clam from cron and (if exit code reports an error) I get an email if there's any trouble.

It's just that little bit safer than to depend on an update function that doesn't report trouble.

If no av is available and you configured virus scanning in amavisd-new, then mail is deferred. I don't want that. (^-°)

-------------------------------------------
#!/bin/sh
# update of clam-av signatures

EMAIL=postmaster@xxxxxxxxxxx
tempfile=`mktemp`

freshclam > $tempfile
statusclam=$?

case "$statusclam" in

0 ) echo "Clamav has gotten new sigatures!"

;;
1 ) echo "Clamav is up-to-date"
;;
255) cat $tempfile | mail -s "Clamav could'nt update: $statusclam" $EMAIL
;;
esac

rm $tempfile

-------------------------------------------

--
Sandy

List replies only please!
Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups