if (yield != NULL)
{
+ int rc;
*resetok = FALSE; /* eval_acl() might allocate; do not reclaim */
- switch(eval_acl(sub, nelem(sub), &user_msg))
+ switch(rc = eval_acl(sub, nelem(sub), &user_msg))
{
case OK:
cond = TRUE;
f.expand_string_forcedfail = TRUE;
/*FALLTHROUGH*/
default:
- expand_string_message = string_sprintf("error from acl \"%s\"", sub[0]);
+ expand_string_message = string_sprintf("%s from acl \"%s\"",
+ rc_names[rc], sub[0]);
return NULL;
}
}
{
uschar *sub[10]; /* name + arg1-arg9 (which must match number of acl_arg[]) */
uschar *user_msg;
+ int rc;
switch(read_subs(sub, nelem(sub), 1, &s, skipping, TRUE, US"acl",
&resetok))
if (skipping) continue;
resetok = FALSE;
- switch(eval_acl(sub, nelem(sub), &user_msg))
+ switch(rc = eval_acl(sub, nelem(sub), &user_msg))
{
case OK:
case FAIL:
f.expand_string_forcedfail = TRUE;
/*FALLTHROUGH*/
default:
- expand_string_message = string_sprintf("error from acl \"%s\"", sub[0]);
+ expand_string_message = string_sprintf("%s from acl \"%s\"",
+ rc_names[rc], sub[0]);
goto EXPAND_FAILED;
}
}
extern uschar *raw_sender; /* Before rewriting */
extern uschar **raw_recipients; /* Before rewriting */
extern int raw_recipients_count;
+extern const uschar * rc_names[]; /* Mostly for debug output */
extern int rcpt_count; /* Count of RCPT commands in a message */
extern int rcpt_fail_count; /* Those that got 5xx */
extern int rcpt_defer_count; /* Those that got 4xx */
1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S
1999-03-02 09:44:33 10HmaX-0005vi-00 => userx@expansionfail R=others T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:delivery
-1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand event_action msg:delivery in smtp: error from acl "logger"
+1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand event_action msg:delivery in smtp: ERROR from acl "logger"
1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:complete
-1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand event_action msg:delivery in smtp: error from acl "logger"
+1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand event_action msg:delivery in smtp: ERROR from acl "logger"
-1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand event_action msg:delivery in smtp: error from acl "logger"
+1999-03-02 09:44:33 10HmaX-0005vi-00 failed to expand event_action msg:delivery in smtp: ERROR from acl "logger"
>
> Failed: Not enough arguments for 'acl' (min is 1)
> Failed: Not enough arguments for 'acl' (min is 1)
-> Failed: error from acl "a_nosuch"
+> Failed: ERROR from acl "a_nosuch"
> acl: (0) [] []
> acl: (1) [person@dom.ain] []
> acl: (2) [firstarg] [secondarg]
> acl:
> acl: (0) [] []
> acl: (1) [person@dom.ain] []
-> Failed: error from acl "a_defer"
+> Failed: DEFER from acl "a_defer"
> acl: (2) [new arg1] [top_arg_1]
> acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] []
>
> acl if: Y:(0) [] []
> acl if: Y:(1) [argY] []
> acl if: N:(2) [argN] [arg2]
-> Failed: error from acl "a_defer"
+> Failed: DEFER from acl "a_defer"
>
> # Default values for both if strings
>