git-svn: trunk@5055
aCaB authored on 2009/04/24 22:21:56... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Fri Apr 24 15:20:48 CEST 2009 (acab) |
|
2 |
+.................................... |
|
3 |
+ * clamav-milter: drop support for QuarantineReject: it's a bad idea and |
|
4 |
+ doesn't work anyway. |
|
5 |
+ |
|
1 | 6 |
Thu Apr 23 16:54:54 EEST 2009 (edwin) |
2 | 7 |
------------------------------------- |
3 | 8 |
* clamav-config.h.in, clamd/thrmgr.c, configure, configure.in: errno |
... | ... |
@@ -400,8 +400,6 @@ static int parse_action(char *action) { |
400 | 400 |
return 3; |
401 | 401 |
if(!strcasecmp(action, "Quarantine")) |
402 | 402 |
return 4; |
403 |
- if(!strcasecmp(action, "QuarantineReject")) |
|
404 |
- return 5; |
|
405 | 403 |
logg("!Unknown action %s\n", action); |
406 | 404 |
return -1; |
407 | 405 |
} |
... | ... |
@@ -419,19 +417,14 @@ static sfsistat action_reject(_UNUSED_ SMFICTX *ctx) { |
419 | 419 |
static sfsistat action_blackhole(_UNUSED_ SMFICTX *ctx) { |
420 | 420 |
return SMFIS_DISCARD; |
421 | 421 |
} |
422 |
-static sfsistat quarantine_common(SMFICTX *ctx, sfsistat ret) { |
|
422 |
+static sfsistat action_quarantine(SMFICTX *ctx) { |
|
423 | 423 |
if(smfi_quarantine(ctx, "quarantined by clamav-milter") != MI_SUCCESS) { |
424 | 424 |
logg("^Failed to quarantine message\n"); |
425 | 425 |
return SMFIS_TEMPFAIL; |
426 | 426 |
} |
427 |
- return ret; |
|
428 |
-} |
|
429 |
-static sfsistat action_quarantine(SMFICTX *ctx) { |
|
430 |
- return quarantine_common(ctx, SMFIS_ACCEPT); |
|
431 |
-} |
|
432 |
-static sfsistat action_quarantine_reject(SMFICTX *ctx) { |
|
433 |
- return quarantine_common(ctx, SMFIS_REJECT); |
|
427 |
+ return SMFIS_ACCEPT; |
|
434 | 428 |
} |
429 |
+ |
|
435 | 430 |
static sfsistat action_reject_msg(SMFICTX *ctx) { |
436 | 431 |
struct CLAMFI *cf; |
437 | 432 |
char buf[1024]; |
... | ... |
@@ -493,9 +486,6 @@ int init_actions(struct optstruct *opts) { |
493 | 493 |
case 4: |
494 | 494 |
CleanAction = action_quarantine; |
495 | 495 |
break; |
496 |
- case 5: |
|
497 |
- CleanAction = action_quarantine_reject; |
|
498 |
- break; |
|
499 | 496 |
default: |
500 | 497 |
logg("!Invalid action %s for option OnClean\n", opt->strarg); |
501 | 498 |
return 1; |
... | ... |
@@ -516,9 +506,6 @@ int init_actions(struct optstruct *opts) { |
516 | 516 |
case 4: |
517 | 517 |
InfectedAction = action_quarantine; |
518 | 518 |
break; |
519 |
- case 5: |
|
520 |
- InfectedAction = action_quarantine_reject; |
|
521 |
- break; |
|
522 | 519 |
case 2: |
523 | 520 |
InfectedAction = action_reject_msg; |
524 | 521 |
if((opt = optget(opts, "RejectMsg"))->enabled) { |
... | ... |
@@ -135,9 +135,6 @@ Example |
135 | 135 |
# Like Accept but the message is sent to oblivion |
136 | 136 |
# - Quarantine (not available for OnFail) |
137 | 137 |
# Like Accept but message is quarantined instead of being delivered |
138 |
-# - QuarantineReject (not available for OnFail) |
|
139 |
-# like Reject but a copy of the message is also quarantined |
|
140 |
-# Note: in Postfix this acts the same as Quarantine |
|
141 | 138 |
# |
142 | 139 |
# NOTE: In Sendmail the quarantine queue can be examined via mailq -qQ |
143 | 140 |
# For Postfix this causes the message to be placed on hold |
... | ... |
@@ -373,9 +373,9 @@ const struct clam_option clam_options[] = { |
373 | 373 |
|
374 | 374 |
{ "LocalNet", NULL, 0, TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_MILTER, "Messages originating from these hosts/networks will not be scanned\nThis option takes a host(name)/mask pair in CIRD notation and can be\nrepeated several times. If \"/mask\" is omitted, a host is assumed.\nTo specify a locally orignated, non-smtp, email use the keyword \"local\".", "local\n192.168.0.0/24\n1111:2222:3333::/48" }, |
375 | 375 |
|
376 |
- { "OnClean", NULL, 0, TYPE_STRING, "^(Accept|Reject|Defer|Blackhole|Quarantine|QuarantineReject)$", -1, "Accept", 0, OPT_MILTER, "Action to be performed on clean messages (mostly useful for testing).\nThe following actions are available:\nAccept: the message is accepted for delievery\nReject: immediately refuse delievery (a 5xx error is returned to the peer)\nDefer: return a temporary failure message (4xx) to the peer\nBlackhole: like Accept but the message is sent to oblivion\nQuarantine: like Accept but message is quarantined instead of being delivered\nQuarantineReject: like Reject but a copy of the message is also quarantined", "Accept" }, |
|
376 |
+ { "OnClean", NULL, 0, TYPE_STRING, "^(Accept|Reject|Defer|Blackhole|Quarantine)$", -1, "Accept", 0, OPT_MILTER, "Action to be performed on clean messages (mostly useful for testing).\nThe following actions are available:\nAccept: the message is accepted for delievery\nReject: immediately refuse delievery (a 5xx error is returned to the peer)\nDefer: return a temporary failure message (4xx) to the peer\nBlackhole: like Accept but the message is sent to oblivion\nQuarantine: like Accept but message is quarantined instead of being delivered", "Accept" }, |
|
377 | 377 |
|
378 |
- { "OnInfected", NULL, 0, TYPE_STRING, "^(Accept|Reject|Defer|Blackhole|Quarantine|QuarantineReject)$", -1, "Quarantine", 0, OPT_MILTER, "Action to be performed on clean messages (mostly useful for testing).\nThe following actions are available:\nAccept: the message is accepted for delievery\nReject: immediately refuse delievery (a 5xx error is returned to the peer)\nDefer: return a temporary failure message (4xx) to the peer\nBlackhole: like Accept but the message is sent to oblivion\nQuarantine: like Accept but message is quarantined instead of being delivered\nQuarantineReject: like Reject but a copy of the message is also quarantined", "Quarantine" }, |
|
378 |
+ { "OnInfected", NULL, 0, TYPE_STRING, "^(Accept|Reject|Defer|Blackhole|Quarantine)$", -1, "Quarantine", 0, OPT_MILTER, "Action to be performed on clean messages (mostly useful for testing).\nThe following actions are available:\nAccept: the message is accepted for delievery\nReject: immediately refuse delievery (a 5xx error is returned to the peer)\nDefer: return a temporary failure message (4xx) to the peer\nBlackhole: like Accept but the message is sent to oblivion\nQuarantine: like Accept but message is quarantined instead of being delivered", "Quarantine" }, |
|
379 | 379 |
|
380 | 380 |
{ "OnFail", NULL, 0, TYPE_STRING, "^(Accept|Reject|Defer)$", -1, "Defer", 0, OPT_MILTER, "Action to be performed on error conditions (this includes failure to\nallocate data structures, no scanners available, network timeouts, unknown\nscanner replies and the like.\nThe following actions are available:\nAccept: the message is accepted for delievery;\nReject: immediately refuse delievery (a 5xx error is returned to the peer);\nDefer: return a temporary failure message (4xx) to the peer.", "Defer" }, |
381 | 381 |
|