X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fexpand.c;h=a22ee2af4ce004a37be2f2b12ef26ab278bab27b;hb=b1929cd76c53cc62328ec5204e115ceb6d77229b;hp=391b943cfcb40afe343c9461bbda7888c0b753e7;hpb=4840604e4f365545a43f01d0e953ce33afd1c3d5;p=exim.git diff --git a/src/src/expand.c b/src/src/expand.c index 391b943cf..a22ee2af4 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -181,6 +181,7 @@ static uschar *op_table_main[] = { US"h", US"hash", US"hex2b64", + US"hexquote", US"l", US"lc", US"length", @@ -216,6 +217,7 @@ enum { EOP_H, EOP_HASH, EOP_HEX2B64, + EOP_HEXQUOTE, EOP_L, EOP_LC, EOP_LENGTH, @@ -408,6 +410,7 @@ static var_entry var_table[] = { { "address_data", vtype_stringptr, &deliver_address_data }, { "address_file", vtype_stringptr, &address_file }, { "address_pipe", vtype_stringptr, &address_pipe }, + { "authenticated_fail_id",vtype_stringptr, &authenticated_fail_id }, { "authenticated_id", vtype_stringptr, &authenticated_id }, { "authenticated_sender",vtype_stringptr, &authenticated_sender }, { "authentication_failed",vtype_int, &authentication_failed }, @@ -674,6 +677,16 @@ static var_entry var_table[] = { { "tod_logfile", vtype_todlf, NULL }, { "tod_zone", vtype_todzone, NULL }, { "tod_zulu", vtype_todzulu, NULL }, +#ifdef EXPERIMENTAL_TPDA + { "tpda_defer_errno", vtype_int, &tpda_defer_errno }, + { "tpda_defer_errstr", vtype_stringptr, &tpda_defer_errstr }, + { "tpda_delivery_confirmation", vtype_stringptr, &tpda_delivery_confirmation }, + { "tpda_delivery_domain", vtype_stringptr, &tpda_delivery_domain }, + { "tpda_delivery_fqdn", vtype_stringptr, &tpda_delivery_fqdn }, + { "tpda_delivery_ip", vtype_stringptr, &tpda_delivery_ip }, + { "tpda_delivery_local_part",vtype_stringptr,&tpda_delivery_local_part }, + { "tpda_delivery_port", vtype_int, &tpda_delivery_port }, +#endif { "transport_name", vtype_stringptr, &transport_name }, { "value", vtype_stringptr, &lookup_value }, { "version_number", vtype_stringptr, &version_string }, @@ -1896,8 +1909,8 @@ while (i < nsub) DEBUG(D_expand) debug_printf("expanding: acl: %s arg: %s%s\n", sub[0], - acl_narg>0 ? sub[1] : US"", - acl_narg>1 ? " +more" : ""); + acl_narg>0 ? acl_arg[0] : US"", + acl_narg>1 ? " +more" : ""); ret = acl_eval(acl_where, sub[0], user_msgp, &tmp); @@ -5664,6 +5677,22 @@ while (*s != 0) continue; } + /* Convert octets outside 0x21..0x7E to \xXX form */ + + case EOP_HEXQUOTE: + { + uschar *t = sub - 1; + while (*(++t) != 0) + { + if (*t < 0x21 || 0x7E < *t) + yield = string_cat(yield, &size, &ptr, + string_sprintf("\\x%02x", *t), 4); + else + yield = string_cat(yield, &size, &ptr, t, 1); + } + continue; + } + /* count the number of list elements */ case EOP_LISTCOUNT: @@ -6542,7 +6571,7 @@ else else { while (isspace(*endptr)) endptr++; - if (*endptr == 0) return (int)value; + if (*endptr == 0) return value; } }