#!/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);