[Mimedefang] installing mimedefang with openantivirus?

Murat Isik muratisik at megatek.com.tr
Sun Dec 21 13:56:13 EST 2003


Yes, as Mr. Tomasz Kojm pointed out to me, oav is not uptodate but I am
doing it for testing purposes not for real life usage....

I have found the following piece from mail archieves:


use IO::Socket;

sub message_contains_virus_openantivirus {
	my $sock = IO::Socket::INET->new('127.0.0.1:8127');
	if (defined $sock) {
		my($cwd);
		chomp($cwd = `pwd`);
		$sock->print("SCAN $cwd/INPUTMSG\n");
		$sock->flush;
		chomp($output = $sock->getline);
		$sock->close;
		if ($output =~ /^FOUND: /) {
			$VirusScannerMessages .= "$output\n";
 			return 1;
		}
		return 0;
 	}
	} else {
 		do_log(0,"Virus scanner failure: can't connect to daemon");
	}
}

sub entity_contains_virus_openantivirus {
	my($entity) = @_;
	my $sock = IO::Socket::INET->new('127.0.0.1:8127');
	if (defined $sock) {
		my($cwd);
		chomp($cwd = `pwd`);
		my $path = $entity->bodyhandle->path;
		# If path is not absolute, add cwd
		if (! ($path =~ m+^/+)) {
			$path = $cwd . "/" . $path;
		}
		$sock->print("SCAN $path\n");
		$sock->flush;
		chomp($output = $sock->getline);
		$sock->close;
		if ($output =~ /^FOUND: /) {
			$VirusScannerMessages .= "$output\n";
 			return 1;
		}
		return 0;
 	}
	} else {
 		do_log(0,"Virus scanner failure: can't connect to daemon");
	}
}


Where do I put this?

As far as I can understand I dont have to do anything special for other
virus scanners like fprot or mcaffee, just recompile sendmail, install
antivirus, install mimedefang and done. Is it?

And as for compiling sendmail I have run into a problem: In how to of
rudolphtire it says:

To do this, create devtools/Site/site.config.m4 with the following lines:
dnl Milter
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER_ROOT_UNSAFE')

I created site.config.m4 with only these lines and it compiled but when it
came to start sendmail, it gave an error about the lack of -DNEWDB. So I
recompiled with these new site.config.m4 lines:


dnl Milter
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER_ROOT_UNSAFE')
define(`confMAPDEF', `-DNEWDB -DNIS -DHESIOD -DMAP_REGEX -DLDAPMAP')
define(`confENVDEF',
`$(RPM_OPT_FLAGS) -I/usr/include/db4 -I/usr/kerberos/include -Wall -DXDEBUG=
0 -DTCPWRAPPERS -DSASL -DSTARTTLS -DMILTER -DNETINET6 -DHES_GETMAILHOST -DUS
E_VENDOR_CF_PATH=1 -D_FFR_WORKAROUND_BROKEN_NAMESERVERS -D_FFR_SMTP_SSL -D_F
FR_MILTER_ROOT_UNSAFE')
define(`confLIBDIRS', `-L/usr/kerberos/%{_lib}')
define(`confLIBS',
`-lnsl -lwrap -lldap -llber -lsasl -lssl -lcrypto -lhesiod -lgdbm -lcrypt -l
db-4.0')
define(`confMANOWN', `root')
define(`confMANGRP', `root')
define(`confMANMODE', `644')
define(`confMAN1SRC', `1')
define(`confMAN5SRC', `5')
define(`confMAN8SRC', `8')
But this time sendmail did not compile :(

What am I doing wrong? BTW I am working with redhat 9.0,
sendmail.8.12.10.tar.gz or sendmail-8.12.10-1.src.rpm. All other stuff is
same as the how-to.

Have a nice day:)

Murat Isik


----- Original Message -----
From: "Tomasz Kojm" <tk at lodz.tpnet.pl>
To: <mimedefang at lists.roaringpenguin.com>
Cc: "Murat Isik" <muratisik at megatek.com.tr>
Sent: Sunday, December 21, 2003 8:08 PM
Subject: Re: [Mimedefang] installing mimedefang with openantivirus?





More information about the MIMEDefang mailing list