On Wed, 14 Apr 2004, 21:00 GMT-04 Brett I. Holcomb wrote:
I don't understand this bit. We save clamscan's exit code. Are we
looking for a -1 or CS_EXIT in any of the lines followed by a zero or
is it being raised to the zero power (which is always 1)?
Thanks.
Dallman Ross wrote:
SC_OUT=| clamscan --mbox --disable-summary --stdout -
{
CS_EXIT = $?
:0: # look for any clamscan problems ( exit code > 1 )
* -1^0
* $ $CS_EXIT^0
clamscan_problem
Dallman is doing what he commented: looking if the exit code of
clamscan is greater than 1. The '^0' are not to be interpreted
mathematically - instead, that is procmail's scoring technique - see
'man procmailsc'.
Here are all possible exit codes > 1 returned by clamscan:
40: Unknown option passed to clamscan. Please check clamscan -help or manual
page for available options.
50: Virus database initialization error. Probably it doesn't exist at the
default location or it's malformed (e.g. broken digital signature)
52: Not supported file type - clamscan only supports regular files, directories
and symlinks.
53: Can't open directory.
54: Can't open file.
55: I/O error during read. 6
56: Can't stat input file or directory. File (or directory) you want to scan
doesn't exist.
57: Can't get absolute pathname of current working directory. Your current
pathname is longer then 200 characters. This is bad and you may need to
recompile ClamAV to fix it.
58: I/O error. Please check the filesystem.
59: Can't get information about current user (running clamscan).
60: Can't get information about user clamav. User clamav (default unprivileged
user) doesn't exist in /etc/passwd.
61: Can't fork. Can't create new process, please check your system limits.
63: Can't create temporary file or directory. Please check /tmp permissions or
use -tempdir
64: Can't write to temporary directory. Please specify another one.
70: Can't allocate and clear memory. This is a critical error, please check
your system.
71: Can't allocate memory. Look above.
rob.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail