While one could argue that it isn't reasonable to have sendmail installed if your not going to use it, but I don't think that assuming any local sendmail should have the milter configured is reasonable either.
To resolve this issue I have created a patch that will cause clamav-milter to ignore the sendmail.cf file if the -z switch is provided.
Thanks,
schu
diff -ruN clamav-0.81/clamav-milter/clamav-milter.c
clamav-0.81.new/clamav-milter/clamav-milter.c
--- clamav-0.81/clamav-milter/clamav-milter.c 2005-01-25 02:07:36.000000000
-0900
+++ clamav-0.81.new/clamav-milter/clamav-milter.c 2005-01-31
13:25:31.000000000 -0900
@@ -882,6 +882,10 @@
static long *serverIPs; /* IPv4 only */
static int numServers; /* number of elements in serverIPs array */
+static int zflag = 0; /*
+ * Don't check the sendmail.cf file for valid
+ * socket.
+ */
#ifdef SESSION
static struct session {
int sock; /* fd */
@@ -975,6 +979,7 @@
puts(_("\t--template-file=FILE\t-t FILE\tLocation of e-mail template
file."));
puts(_("\t--timeout=SECS\t\t-T SECS\tTimeout waiting to childen to
die."));
puts(_("\t--version\t\t-V\tPrint the version number of this
software."));
+ puts(_("\t--ignore-cffile\t\t-z\tIgnore the socket settings in
sendmail.cf"));
#ifdef CL_DEBUG
puts(_("\t--debug-level=n\t\t-x n\tSets the debug level to 'n'."));
#endif
@@ -1034,9 +1039,9 @@
for(;;) {
int opt_index = 0;
#ifdef CL_DEBUG
- const char *args = "a:AbB:c:CDefF:lm:nNop:PqQ:dhHs:St:T:U:Vx:";
+ const char *args =
"a:AbB:c:CDefF:lm:nNop:PqQ:dhHs:St:T:U:Vx:z:";
#else
- const char *args = "a:AbB:c:CDefF:lm:nNop:PqQ:dhHs:St:T:U:V";
+ const char *args = "a:AbB:c:CDefF:lm:nNop:PqQ:dhHs:St:T:U:V:z";
#endif
static struct option long_options[] = {
@@ -1130,6 +1135,9 @@
{
"version", 0, NULL, 'V'
},
+ {
+ "ignore-cffile", 0, NULL, 'z'
+ },
#ifdef CL_DEBUG
{
"debug-level", 1, NULL, 'x'
@@ -1260,11 +1268,15 @@
debug_level = atoi(optarg);
break;
#endif
+ case 'z':
+ zflag++;
+ break;
+
default:
#ifdef CL_DEBUG
- fprintf(stderr, "Usage: %s [-b] [-c FILE] [-F
FILE] [--max-children=num] [-e] [-l] [-o] [-p address] [-P] [-q] [-Q USER] [-s
SERVER] [-S] [-x#] [-U PATH] socket-addr\n", argv[0]);
+ fprintf(stderr, "Usage: %s [-b] [-c FILE] [-F
FILE] [--max-children=num] [-e] [-l] [-o] [-p address] [-P] [-q] [-Q USER] [-s
SERVER] [-S] [-z] [-x#] [-U PATH] socket-addr\n", argv[0]);
#else
- fprintf(stderr, "Usage: %s [-b] [-c FILE] [-F
FILE] [--max-children=num] [-e] [-l] [-o] [-p address] [-P] [-q] [-Q USER] [-s
SERVER] [-S] [-U PATH] socket-addr\n", argv[0]);
+ fprintf(stderr, "Usage: %s [-b] [-c FILE] [-F
FILE] [--max-children=num] [-e] [-l] [-o] [-p address] [-P] [-q] [-Q USER] [-s
SERVER] [-S] [-z] [-U PATH] socket-addr\n", argv[0]);
#endif
return EX_USAGE;
}
@@ -1279,10 +1291,11 @@
}
port = argv[optind];
- if(verifyIncomingSocketName(port) < 0) {
- fprintf(stderr, _("%s: socket-addr (%s) doesn't agree with
sendmail.cf\n"), argv[0], port);
- return EX_CONFIG;
- }
+ if(!zflag)
+ if(verifyIncomingSocketName(port) < 0) {
+ fprintf(stderr, _("%s: socket-addr (%s) doesn't agree
with sendmail.cf\n"), argv[0], port);
+ return EX_CONFIG;
+ }
/*
* Sanity checks on the clamav configuration file
_______________________________________________ http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
