# libmilter-init

# libmilter sends /tmp/directory as arg 1, sender as arg2 and 
# all recips as other args


# error codes
$VIRUSERR = 99;
$REGERR = 1; # anything except 0 or 99 will be interpreted
             # as "virus scan failed"

# set path explicitly
$ENV{PATH} = "/bin:/usr/bin:/usr/local/bin";

if ($#ARGV < 2) {
	do_exit($REGERR, __LINE__);
}

$TEMPDIR=shift(@ARGV);

if ($TEMPDIR =~ /($TEMPBASE\/.*)/) {
	$TEMPDIR=$1;
# untaint the directory option...
} else {
	do_exit($REGERR, __LINE__);
}

# End libmilter-init
