/* Alternate interface for ACL, used by expansions */
int
-acl_eval(int where, uschar *recipient, uschar *s, uschar **user_msgptr,
- uschar **log_msgptr)
+acl_eval(int where, uschar *s, uschar **user_msgptr, uschar **log_msgptr)
{
int rc;
address_item adb;
{
adb = address_defaults;
addr = &adb;
- addr->address = recipient;
- if (deliver_split_address(addr) == DEFER)
- {
- *log_msgptr = US"defer in percent_hack_domains check";
- return DEFER;
- }
- deliver_domain = addr->domain;
- deliver_localpart = addr->local_part;
+ addr->address = expand_string(US"$local_part@$domain");
+ addr->domain = deliver_domain;
+ addr->local_part = deliver_localpart;
+ addr->cc_local_part = deliver_localpart;
+ addr->lc_local_part = deliver_localpart;
}
return acl_check_internal(where, addr, s, 0, user_msgptr, log_msgptr);
acl_narg>0 ? sub[1] : US"<none>",
acl_narg>1 ? " +more" : "");
-ret = acl_eval(acl_where, NULL, sub[0], user_msgp, &tmp);
+ret = acl_eval(acl_where, sub[0], user_msgp, &tmp);
for (i = 0; i < nsub; i++)
acl_arg[i] = sub[i+1]; /* restore old args */
extern acl_block *acl_read(uschar *(*)(void), uschar **);
extern int acl_check(int, uschar *, uschar *, uschar **, uschar **);
-extern int acl_eval(int, uschar *, uschar *, uschar **, uschar **);
+extern int acl_eval(int, uschar *, uschar **, uschar **);
extern tree_node *acl_var_create(uschar *);
extern void acl_var_write(uschar *, uschar *, void *);
accept local_parts = a.b.c
acl_rcpt:
+ warn set acl_m_1 = ${acl {data}}
accept endpass
acl = ${tr{$local_part}{:}{\n}}
deny message = this message should not occur