HEX
Server: Apache/2.4.41 (FreeBSD) OpenSSL/1.0.2s mod_fcgid/2.3.9
System: FreeBSD salazo 12.0-RELEASE-p1303-ZFS hostBSD 12.0-RELEASE-p1303-ZFS DMR amd64
User: admin (1000)
PHP: 7.4.3
Disabled: NONE
Upload Files
File: /usr/sbin/vnewclam
#!/usr/bin/perl
# will work even without an easytecc install
use lib '/usr/local/www/apache24/cgi-bin/easytecc3';
eval
{
	require easytecc;
};


my $type = $ARGV[0];
	unless($type =~ /^(milter|template|whitelist)$/){
	print "Usage: vnewclam [milter|template|whitelist]";
	exit(0);
}

my $mxhost = `cat /etc/mxhost 2>/dev/null`;
chomp $mxhost;

if ($mxhost) {
	my $socket = easytecc::make_socket();
	print $socket "write_clamav=$type\n";
	easytecc::close_socket($socket) if $socket;
}


exit(0);