I have two clamav-milters running on a system. The sendmail on this
system can choose which email gets scanned by which milter.
One is set to send notifications, to be used for automatically
blacklisting virus sending sources.
The other does not notify because it is used by sendmail to scan email
to all those who have elected to not participate in the systems
anti-abuse mechanisms, which include blocklists.
Due to network security needs, virus scanning is still mandatory, but
the notifications are worthless, as invariably they would all have been
blocked by a blocklist.
So I run two instances. I do this by copying /etc/init.d/clamav-milter
to /etc/init.d/clamav-milter2 and making obvious edits to
/etc/init.d/clamav-milter2
(debian update-rc.d
redhat chkconfig and friends)
I do the same for /etc/default/clamav-milter2
I then symlink /usr/sbin/clamav-milter2 to /usr/sbin/clamav-milter
This works fine.
Only problem is that syslog logging both say clamav-milter.
So here is a trivial patch that solves it for me....even though a more
proper approach should probably rely on a command line argument.
(
Thanks steven for your excellent debs and one quick trivial request..
apt-get source clamav
vi debian/rules
Add dpatch include and targets!!
Thanks!
)
Joe
#! /bin/sh /usr/share/dpatch/dpatch-run
## 110-clamav_milter.syslog-name.patch.dpatch by <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad clamav-0.85.1-0-JM/clamav-milter/clamav-milter.c
/tmp/dpep.zyzqDz/clamav-0.85.1-0-JM/clamav-milter/clamav-milter.c
--- clamav-0.85.1-0-JM/clamav-milter/clamav-milter.c 2005-05-20
14:10:38.522543627 -0400
+++ /tmp/dpep.zyzqDz/clamav-0.85.1-0-JM/clamav-milter/clamav-milter.c
2005-05-20 14:16:59.576682600 -0400
@@ -1038,6 +1038,7 @@
if(cfgopt(copt, "LogSyslog")) {
int fac = LOG_LOCAL6;
+ char * progname = NULL;
if(cfgopt(copt, "LogVerbose")) {
logVerbose = 1;
@@ -1054,7 +1055,10 @@
argv[0], cpt->strarg);
return EX_CONFIG;
}
- openlog("clamav-milter", LOG_CONS|LOG_PID, fac);
+ if(!(progname = basename(argv[0])))
+ progname = "clamav-milter";
+
+ openlog(progname, LOG_CONS|LOG_PID, fac);
} else {
if(qflag)
fprintf(stderr, _("%s: (-q && !LogSyslog): warning -
all interception message methods are off\n"),
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html