git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@2610 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2007/01/13 04:27:34... | ... |
@@ -1,7 +1,12 @@ |
1 |
+Fri Jan 12 19:25:21 GMT 2007 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * clamav-milter: Remove -b option (enable BOUNCE compile time option |
|
4 |
+ to re-enable the option) |
|
5 |
+ |
|
1 | 6 |
Fri Jan 12 18:51:33 CET 2007 (acab) |
2 | 7 |
----------------------------------- |
3 | 8 |
* libclamav: add MEW support from Michal Spadlinski <gim913 * gmail.com> |
4 |
- Part of the Google Summer of Code program |
|
9 |
+ Part of the Google Summer of Code program |
|
5 | 10 |
|
6 | 11 |
Fri Jan 12 18:35:02 CET 2007 (tk) |
7 | 12 |
--------------------------------- |
... | ... |
@@ -14,7 +19,7 @@ Fri Jan 12 18:18:43 CET 2007 (tk) |
14 | 14 |
--phishing-cloak, PhishAlwaysBlockSSLMismatch, |
15 | 15 |
PhishAlwaysBlockCloak) |
16 | 16 |
- rename alldomains/stricturl option to PhishingRestrictedScan |
17 |
- - update man pages for phishing options |
|
17 |
+ - update man pages for phishing options |
|
18 | 18 |
- update clamd/clamscan/cfgparser for new phishing options |
19 | 19 |
- add log lines for non-default phishing options |
20 | 20 |
|
... | ... |
@@ -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.308 2007/01/07 16:45:59 njh Exp $"; |
|
27 |
+static char const rcsid[] = "$Id: clamav-milter.c,v 1.309 2007/01/12 19:25:08 njh Exp $"; |
|
28 | 28 |
|
29 |
-#define CM_VERSION "devel-070107" |
|
29 |
+#define CM_VERSION "devel-110107" |
|
30 | 30 |
|
31 | 31 |
#if HAVE_CONFIG_H |
32 | 32 |
#include "clamav-config.h" |
... | ... |
@@ -324,6 +324,7 @@ static struct cl_limits limits; |
324 | 324 |
static struct cl_stat dbstat; |
325 | 325 |
static int options = CL_SCAN_STDOPT; |
326 | 326 |
|
327 |
+#ifdef BOUNCE |
|
327 | 328 |
static int bflag = 0; /* |
328 | 329 |
* send a failure (bounce) message to the |
329 | 330 |
* sender. This probably isn't a good idea |
... | ... |
@@ -332,6 +333,7 @@ static int bflag = 0; /* |
332 | 332 |
* TODO: Perhaps we can have an option to |
333 | 333 |
* bounce outgoing mail, but not incoming? |
334 | 334 |
*/ |
335 |
+#endif |
|
335 | 336 |
static const char *iface; /* |
336 | 337 |
* Broadcast a message when a virus is found, |
337 | 338 |
* this allows remote network management |
... | ... |
@@ -545,7 +547,9 @@ help(void) |
545 | 545 |
puts(_("\t--advisory\t\t-A\tFlag viruses rather than deleting them.")); |
546 | 546 |
puts(_("\t--blacklist=time\t-k\tTime (in seconds) to blacklist an IP.")); |
547 | 547 |
puts(_("\t--black-hole-mode\t\tDon't scan messages aliased to /dev/null.")); |
548 |
+#ifdef BOUNCE |
|
548 | 549 |
puts(_("\t--bounce\t\t-b\tSend a failure message to the sender.")); |
550 |
+#endif |
|
549 | 551 |
puts(_("\t--broadcast\t\t-B [IFACE]\tBroadcast to a network manager when a virus is found.")); |
550 | 552 |
puts(_("\t--config-file=FILE\t-c FILE\tRead configuration from FILE.")); |
551 | 553 |
puts(_("\t--debug\t\t\t-D\tPrint debug messages.")); |
... | ... |
@@ -653,11 +657,19 @@ main(int argc, char **argv) |
653 | 653 |
int opt_index = 0; |
654 | 654 |
struct cidr_net *net; |
655 | 655 |
struct in_addr ignoreIP; |
656 |
+#ifdef BOUNCE |
|
656 | 657 |
#ifdef CL_DEBUG |
657 | 658 |
const char *args = "a:AbB:c:dDefF:I:k:K:lLm:M:nNop:PqQ:r:hHs:St:T:U:VwW:x:0:1:2"; |
658 | 659 |
#else |
659 | 660 |
const char *args = "a:AbB:c:dDefF:I:k:K:lLm:M:nNop:PqQ:r:hHs:St:T:U:VwW:0:1:2"; |
660 | 661 |
#endif |
662 |
+#else /*!BOUNCE*/ |
|
663 |
+#ifdef CL_DEBUG |
|
664 |
+ const char *args = "a:AB:c:dDefF:I:k:K:lLm:M:nNop:PqQ:r:hHs:St:T:U:VwW:x:0:1:2"; |
|
665 |
+#else |
|
666 |
+ const char *args = "a:AB:c:dDefF:I:k:K:lLm:M:nNop:PqQ:r:hHs:St:T:U:VwW:0:1:2"; |
|
667 |
+#endif |
|
668 |
+#endif /*BOUNCE*/ |
|
661 | 669 |
|
662 | 670 |
static struct option long_options[] = { |
663 | 671 |
{ |
... | ... |
@@ -666,9 +678,11 @@ main(int argc, char **argv) |
666 | 666 |
{ |
667 | 667 |
"advisory", 0, NULL, 'A' |
668 | 668 |
}, |
669 |
+#ifdef BOUNCE |
|
669 | 670 |
{ |
670 | 671 |
"bounce", 0, NULL, 'b' |
671 | 672 |
}, |
673 |
+#endif |
|
672 | 674 |
{ |
673 | 675 |
"broadcast", 2, NULL, 'B' |
674 | 676 |
}, |
... | ... |
@@ -806,9 +820,11 @@ main(int argc, char **argv) |
806 | 806 |
case 'A': |
807 | 807 |
advisory++; |
808 | 808 |
break; |
809 |
+#ifdef BOUNCE |
|
809 | 810 |
case 'b': /* bounce worms/viruses */ |
810 | 811 |
bflag++; |
811 | 812 |
break; |
813 |
+#endif |
|
812 | 814 |
case 'B': /* broadcast */ |
813 | 815 |
Bflag++; |
814 | 816 |
if(optarg) |
... | ... |
@@ -3400,10 +3416,12 @@ clamfi_eom(SMFICTX *ctx) |
3400 | 3400 |
fprintf(sendmail, "From: %s\n", from); |
3401 | 3401 |
else |
3402 | 3402 |
fprintf(sendmail, "From: %s\n", privdata->from); |
3403 |
+#ifdef BOUNCE |
|
3403 | 3404 |
if(bflag && privdata->from) { |
3404 | 3405 |
fprintf(sendmail, "To: %s\n", privdata->from); |
3405 | 3406 |
fprintf(sendmail, "Cc: %s\n", postmaster); |
3406 | 3407 |
} else |
3408 |
+#endif |
|
3407 | 3409 |
fprintf(sendmail, "To: %s\n", postmaster); |
3408 | 3410 |
|
3409 | 3411 |
if((!pflag) && privdata->to) |
... | ... |
@@ -3461,9 +3479,13 @@ clamfi_eom(SMFICTX *ctx) |
3461 | 3461 |
/* |
3462 | 3462 |
* Use our own hardcoded template |
3463 | 3463 |
*/ |
3464 |
+#ifdef BOUNCE |
|
3464 | 3465 |
if(bflag) |
3465 | 3466 |
fputs(_("A message you sent to\n"), sendmail); |
3466 | 3467 |
else if(pflag) |
3468 |
+#else |
|
3469 |
+ if(pflag) |
|
3470 |
+#endif |
|
3467 | 3471 |
/* |
3468 | 3472 |
* The message is only going to |
3469 | 3473 |
* the postmaster, so include |
... | ... |
@@ -69,7 +69,8 @@ This mode is incompatible with \-\-quarantine and \-\-quarantine-dir. |
69 | 69 |
\fB\-b, \-\-bounce\fR |
70 | 70 |
Send a failure message to the sender, and to the postmaster. |
71 | 71 |
[ \fBWarning\fR: most viruses and worms |
72 |
-fake their source address, so this option is not recommended ]. |
|
72 |
+fake their source address, so this option is not recommended, and needs |
|
73 |
+to be enabled at compile-time ]. |
|
73 | 74 |
See also \-\-noreject. |
74 | 75 |
.TP |
75 | 76 |
\fB\-B, \-\-broadcast[=<iface>]\fR |