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
Return remote errors for LMTP over pipe (so now it's the same as LMTP
[exim.git]
/
src
/
src
/
filter.c
diff --git
a/src/src/filter.c
b/src/src/filter.c
index e3d43b4168d0acf22c1abc560dc986c43b865a69..d30afb8dd09a5acf1c8c3a497ca20f94962700cd 100644
(file)
--- a/
src/src/filter.c
+++ b/
src/src/filter.c
@@
-1,10
+1,10
@@
-/* $Cambridge: exim/src/src/filter.c,v 1.
8 2005/12/19 12:25:21
ph10 Exp $ */
+/* $Cambridge: exim/src/src/filter.c,v 1.
13 2006/09/05 14:05:43
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. */
@@
-1044,6
+1044,13
@@
switch (command)
case elif_command:
case else_command:
case endif_command:
case elif_command:
case else_command:
case endif_command:
+ if (seen_force || noerror_force)
+ {
+ *error_pointer = string_sprintf("\"seen\", \"unseen\", or \"noerror\" "
+ "near line %d is not followed by a command", line_number);
+ yield = FALSE;
+ }
+
if (expect_endif > 0)
had_else_endif = (command == elif_command)? had_elif :
(command == else_command)? had_else : had_endif;
if (expect_endif > 0)
had_else_endif = (command == elif_command)? had_elif :
(command == else_command)? had_else : had_endif;
@@
-1316,6
+1323,12
@@
switch (command)
case seen_command:
case unseen_command:
case seen_command:
case unseen_command:
+ if (*ptr == 0)
+ {
+ *error_pointer = string_sprintf("\"seen\" or \"unseen\" "
+ "near line %d is not followed by a command", line_number);
+ yield = FALSE;
+ }
if (seen_force)
{
*error_pointer = string_sprintf("\"seen\" or \"unseen\" repeated "
if (seen_force)
{
*error_pointer = string_sprintf("\"seen\" or \"unseen\" repeated "
@@
-1331,6
+1344,12
@@
switch (command)
/* So does noerror */
case noerror_command:
/* So does noerror */
case noerror_command:
+ if (*ptr == 0)
+ {
+ *error_pointer = string_sprintf("\"noerror\" "
+ "near line %d is not followed by a command", line_number);
+ yield = FALSE;
+ }
noerror_force = TRUE;
was_noerror = TRUE;
break;
noerror_force = TRUE;
was_noerror = TRUE;
break;
@@
-1414,7
+1433,7
@@
Returns: TRUE if the condition is met
static BOOL
test_condition(condition_block *c, BOOL toplevel)
{
static BOOL
test_condition(condition_block *c, BOOL toplevel)
{
-BOOL yield;
+BOOL yield
= FALSE
;
const pcre *re;
uschar *exp[2], *p, *pp;
const uschar *regcomp_error = NULL;
const pcre *re;
uschar *exp[2], *p, *pp;
const uschar *regcomp_error = NULL;
@@
-1834,11
+1853,12
@@
while (commands != NULL)
else
{
else
{
+ if (s[0] != '/' && (filter_options & RDO_PREPEND_HOME) != 0 &&
+ deliver_home != NULL && deliver_home[0] != 0)
+ s = string_sprintf("%s/%s", deliver_home, s);
DEBUG(D_filter) debug_printf("Filter: %ssave message to: %s%s\n",
(commands->seen)? "" : "unseen ", s,
commands->noerror? " (noerror)" : "");
DEBUG(D_filter) debug_printf("Filter: %ssave message to: %s%s\n",
(commands->seen)? "" : "unseen ", s,
commands->noerror? " (noerror)" : "");
- if (s[0] != '/' && deliver_home != NULL && deliver_home[0] != 0)
- s = string_sprintf("%s/%s", deliver_home, s);
/* Create the new address and add it to the chain, setting the
af_pfr and af_file flags, the af_ignore_error flag if necessary, and the
/* Create the new address and add it to the chain, setting the
af_pfr and af_file flags, the af_ignore_error flag if necessary, and the
@@
-2166,7
+2186,6
@@
while (commands != NULL)
string_printing(s), command_list[commands->command]);
return FF_ERROR;
}
string_printing(s), command_list[commands->command]);
return FF_ERROR;
}
- pp++;
}
p = pp;
}
}
p = pp;
}