git-svn: trunk@3167
Nigel Horne authored on 2007/08/10 20:14:50... | ... |
@@ -33,7 +33,7 @@ |
33 | 33 |
*/ |
34 | 34 |
static char const rcsid[] = "$Id: clamav-milter.c,v 1.312 2007/02/12 22:24:21 njh Exp $"; |
35 | 35 |
|
36 |
-#define CM_VERSION "devel-090807" |
|
36 |
+#define CM_VERSION "devel-100807" |
|
37 | 37 |
|
38 | 38 |
#if HAVE_CONFIG_H |
39 | 39 |
#include "clamav-config.h" |
... | ... |
@@ -2904,7 +2904,7 @@ static sfsistat |
2904 | 2904 |
clamfi_envrcpt(SMFICTX *ctx, char **argv) |
2905 | 2905 |
{ |
2906 | 2906 |
struct privdata *privdata = (struct privdata *)smfi_getpriv(ctx); |
2907 |
- const char *to; |
|
2907 |
+ const char *to, *ptr; |
|
2908 | 2908 |
|
2909 | 2909 |
logg("*clamfi_envrcpt: %s\n", argv[0]); |
2910 | 2910 |
|
... | ... |
@@ -2922,6 +2922,14 @@ clamfi_envrcpt(SMFICTX *ctx, char **argv) |
2922 | 2922 |
if(to == NULL) |
2923 | 2923 |
to = argv[0]; |
2924 | 2924 |
|
2925 |
+ for(ptr = to; *ptr; ptr++) |
|
2926 |
+ if(strchr("|;", *ptr) != NULL) { |
|
2927 |
+ smfi_setreply(ctx, "554", "5.7.1", _("Suspicious recipient address blocked")); |
|
2928 |
+ logg("^Suspicious recipient address blocked: '%s'", to); |
|
2929 |
+ clamfi_cleanup(ctx); |
|
2930 |
+ return SMFIS_REJECT; |
|
2931 |
+ } |
|
2932 |
+ |
|
2925 | 2933 |
privdata->to[privdata->numTo] = cli_strdup(to); |
2926 | 2934 |
privdata->to[++privdata->numTo] = NULL; |
2927 | 2935 |
|