Howdy,
I'm using my XMail [1] and have 2 virus-scanner implemented into an own
tool, which is working between MTA and the virus-scanners.
There, I am using BitDefender API and ClamAV [libclamav].
My application is called every time, a mail arrives.
But they are as different speedy, I never expected.
With LibClamAV-function activated:
.--
| [EMAIL PROTECTED] filter]$ time ./main test_mail
|
| real0m3.896s
| user0m1.488s
| sys 0m0.135s
`--
With BitDefender-function activated:
.--
| [EMAIL PROTECTED] filter]# time ./main test_mail
|
| real0m0.012s
| user0m0.004s
| sys 0m0.004s
`--
Extremly difference, eh?
The virus is discovered by both, so everything is working fine with
LibClamAV I think?!
I attach the function. Maybe some of you guys can help me with that
problem.
I cannot expect at all, that LibClamAV is so slow in any case.
[1] http://xmailserver.org
--
With kind regards,
Alexander Hagenah
int vCheckClamAv() {
int ret;
unsigned intsigs = 0;
unsigned long int blocks = 0;
struct cl_node *root = NULL;
struct cl_limits limits;
struct cl_stat dbstat;
memset(&dbstat, 0, sizeof(struct cl_stat));
cl_statinidir(cl_retdbdir(), &dbstat);
if((cl_loaddbdir(cl_retdbdir(), &root, &sigs))) {
errorHandler(ERRCODE_SMTP_TEMP, ERRSTR_INTERN_CLAMDB);
}
if((ret = cl_build(root))) {
syslog(LOG_NOTICE, "Database initialization error: %s\n",
cl_strerror(ret));
cl_free(root);
close(clam_fd);
}
clam_fd = open(mailFileName, O_RDONLY);
memset(&limits, 0, sizeof(struct cl_limits));
limits.maxfiles = 1000;
limits.maxfilesize = 10 * 1048576;
limits.maxreclevel = 5;
limits.maxratio = 200;
limits.archivememlim = 0;
if((!cl_scandesc(clam_fd, &clamav_virname, &blocks, root, &limits,
CL_SCAN_STDOPT)) == CL_VIRUS) {
syslogCav();
vStatus = 1;
}
virName = (char*) clamav_virname;
syslog(LOG_NOTICE, "virus: %s", virName);
return(vStatus);
}
___
http://lurker.clamav.net/list/clamav-users.html