git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Call initgroups() when dropping privilege, in order that Exim runs with
[exim.git]
/
src
/
src
/
filter.c
diff --git
a/src/src/filter.c
b/src/src/filter.c
index e551abef86decbfeb7ee42e41d579583ebca1ad1..e94cbd135b4b46171f590f6f1b36e7b32a218098 100644
(file)
--- a/
src/src/filter.c
+++ b/
src/src/filter.c
@@
-1,10
+1,10
@@
-/* $Cambridge: exim/src/src/filter.c,v 1.
6 2005/11/10 15:00:46
ph10 Exp $ */
+/* $Cambridge: exim/src/src/filter.c,v 1.
9 2006/02/07 11:19:00
ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 200
5
*/
+/* Copyright (c) University of Cambridge 1995 - 200
6
*/
/* See the file NOTICE for conditions of use and distribution. */
/* See the file NOTICE for conditions of use and distribution. */
@@
-2211,6
+2211,7
@@
while (commands != NULL)
uschar *to = commands->args[mailarg_index_to].u;
int size = 0;
int ptr = 0;
uschar *to = commands->args[mailarg_index_to].u;
int size = 0;
int ptr = 0;
+ int badflag = 0;
if (to == NULL) to = expand_string(US"$reply_address");
while (isspace(*to)) to++;
if (to == NULL) to = expand_string(US"$reply_address");
while (isspace(*to)) to++;
@@
-2240,9
+2241,10
@@
while (commands != NULL)
}
/* Create the "address" for the autoreply. This is used only for logging,
}
/* Create the "address" for the autoreply. This is used only for logging,
- as the actual recipients are extraced from the To: line by -t. We use the
+ as the actual recipients are extrac
t
ed from the To: line by -t. We use the
same logic here to extract the working addresses (there may be more than
same logic here to extract the working addresses (there may be more than
- one). */
+ one). Just in case there are a vast number of addresses, stop when the
+ string gets too long. */
tt = to;
while (*tt != 0)
tt = to;
while (*tt != 0)
@@
-2268,17
+2270,29
@@
while (commands != NULL)
Ustrlen(recipient));
}
Ustrlen(recipient));
}
+ /* Check size */
+
+ if (ptr > 256)
+ {
+ log_addr = string_cat(log_addr, &size, &ptr, US", ...", 5);
+ break;
+ }
+
/* Move on past this address */
tt = ss + (*ss? 1:0);
while (isspace(*tt)) tt++;
}
/* Move on past this address */
tt = ss + (*ss? 1:0);
while (isspace(*tt)) tt++;
}
- if (log_addr == NULL) log_addr = string_sprintf("invalid-to-line");
- else log_addr[ptr] = 0;
+ if (log_addr == NULL)
+ {
+ log_addr = string_sprintf(">**bad-reply**");
+ badflag = af_bad_reply;
+ }
+ else log_addr[ptr] = 0;
addr = deliver_make_addr(log_addr, FALSE);
addr = deliver_make_addr(log_addr, FALSE);
- setflag(addr,
af_pfr
);
+ setflag(addr,
(af_pfr|badflag)
);
if (commands->noerror) setflag(addr, af_ignore_error);
addr->next = *generated;
*generated = addr;
if (commands->noerror) setflag(addr, af_ignore_error);
addr->next = *generated;
*generated = addr;