git-svn: trunk@2530
Nigel Horne authored on 2006/12/03 00:18:45... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Sat Dec 2 15:17:47 GMT 2006 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * clamav-milter: Allow more than one IP address to --dont-blacklist |
|
4 |
+ |
|
1 | 5 |
Sat Dec 2 01:41:27 CET 2006 (tk) |
2 | 6 |
--------------------------------- |
3 | 7 |
* libclamav/regex_list.c: add functionality level support for .pdb/.wdb files; |
... | ... |
@@ -24,9 +24,9 @@ |
24 | 24 |
* |
25 | 25 |
* For installation instructions see the file INSTALL that came with this file |
26 | 26 |
*/ |
27 |
-static char const rcsid[] = "$Id: clamav-milter.c,v 1.300 2006/11/28 14:31:12 njh Exp $"; |
|
27 |
+static char const rcsid[] = "$Id: clamav-milter.c,v 1.301 2006/12/02 15:17:02 njh Exp $"; |
|
28 | 28 |
|
29 |
-#define CM_VERSION "devel-271106" |
|
29 |
+#define CM_VERSION "devel-021206" |
|
30 | 30 |
|
31 | 31 |
#if HAVE_CONFIG_H |
32 | 32 |
#include "clamav-config.h" |
... | ... |
@@ -1853,8 +1853,14 @@ main(int argc, char **argv) |
1853 | 1853 |
tableInsert(blacklist, "127.0.0.1", 0); |
1854 | 1854 |
|
1855 | 1855 |
if(wont_blacklist) { |
1856 |
- logg(_("^Won't blacklist %s\n"), wont_blacklist); |
|
1857 |
- (void)tableInsert(blacklist, wont_blacklist, 0); |
|
1856 |
+ const char *w; |
|
1857 |
+ |
|
1858 |
+ i = 0; |
|
1859 |
+ while((w = cli_strtok(wont_blacklist, i++, ",")) != NULL) { |
|
1860 |
+ logg(_("^Won't blacklist %s\n"), w); |
|
1861 |
+ (void)tableInsert(blacklist, w, 0); |
|
1862 |
+ free(w); |
|
1863 |
+ } |
|
1858 | 1864 |
} |
1859 | 1865 |
} |
1860 | 1866 |
|
... | ... |
@@ -5713,8 +5719,7 @@ mx(void) |
5713 | 5713 |
#else |
5714 | 5714 |
if(addr != (in_addr_t)-1) { |
5715 | 5715 |
#endif |
5716 |
- if(use_syslog) |
|
5717 |
- syslog(LOG_INFO, "Won't blacklist %s", buf); |
|
5716 |
+ logg(_("^Won't blacklist %s\n"), buf); |
|
5718 | 5717 |
(void)tableInsert(blacklist, buf, 0); |
5719 | 5718 |
} else |
5720 | 5719 |
resolve(buf); |
... | ... |
@@ -5780,8 +5785,7 @@ resolve(const char *host) |
5780 | 5780 |
p += 4; |
5781 | 5781 |
ip = inet_ntoa(addr); |
5782 | 5782 |
if(ip) { |
5783 |
- if(use_syslog) |
|
5784 |
- syslog(LOG_INFO, "Won't blacklist %s", ip); |
|
5783 |
+ logg(_("^Won't blacklist %s\n"), ip); |
|
5785 | 5784 |
(void)tableInsert(blacklist, ip, 0); |
5786 | 5785 |
} |
5787 | 5786 |
} |
... | ... |
@@ -111,11 +111,12 @@ The recommended value is 60. |
111 | 111 |
Machines on the LAN, the local host, and machines that are our MX peers are |
112 | 112 |
never blacklisted. |
113 | 113 |
.TP |
114 |
-\fB\f-K, \-\-dont-blacklist=IP\fR |
|
115 |
-Instructs clamav-milter to refrain from blacklisting an IP address. This |
|
116 |
-is useful for sites that receive email from upstream servers that are either |
|
117 |
-untrusted or have no virus. Without this option many false positives could |
|
118 |
-occur. This scenario often happens when the upstream server belongs to an |
|
114 |
+\fB\f-K, \-\-dont-blacklist=IP[,IP...]\fR |
|
115 |
+Instructs clamav-milter to refrain from blacklisting IP the given addresses. |
|
116 |
+This is useful for sites that receive email from upstream servers that are |
|
117 |
+either untrusted or have no virus. |
|
118 |
+Without this option many false positives could occur. |
|
119 |
+This scenario often happens when the upstream server belongs to an |
|
119 | 120 |
ISP that may not have AV software. |
120 | 121 |
.TP |
121 | 122 |
\fB-l, \-\-local\fR |