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/vnewdnsbl
#!/usr/bin/perl
# will work even without an easytecc install
use lib '/usr/local/www/apache24/cgi-bin/easytecc3';
eval
{
	require easytecc;
};

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

if ($mxhost) {
	my $socket = easytecc::make_socket();
	print $socket "dnsbl\n";
	easytecc::close_socket($socket) if $socket;
} else {
	system("/usr/sbin/makemap hash /etc/mail/dnsbl.db < /etc/mail/dnsbl.hosts");
}

exit(0);