uschar *inttype = US"";
uschar *sptr;
uschar *s = buffer;
-uschar *saved_condition, *strtemp;
uschar **str_target;
uschar name[64];
uschar name2[64];
control block and flags word. */
case opt_stringptr:
- if (data_block == NULL)
- str_target = (uschar **)(ol->value);
- else
- str_target = (uschar **)((uschar *)data_block + (long int)(ol->value));
+ str_target = data_block ? USS (US data_block + (long int)(ol->value))
+ : USS (ol->value);
if (ol->type & opt_rep_con)
{
+ uschar * saved_condition;
/* We already have a condition, we're conducting a crude hack to let
multiple condition rules be chained together, despite storing them in
text form. */
- saved_condition = *str_target;
- strtemp = string_sprintf("${if and{{bool_lax{%s}}{bool_lax{%s}}}}",
- saved_condition, sptr);
- *str_target = string_copy_malloc(strtemp);
+ *str_target = string_copy_malloc( (saved_condition = *str_target)
+ ? string_sprintf("${if and{{bool_lax{%s}}{bool_lax{%s}}}}",
+ saved_condition, sptr)
+ : sptr);
/* TODO(pdp): there is a memory leak here and just below
when we set 3 or more conditions; I still don't
understand the store mechanism enough to know
break;
case opt_rewrite:
- if (data_block == NULL)
- *((uschar **)(ol->value)) = sptr;
+ if (data_block)
+ *USS (US data_block + (long int)(ol->value)) = sptr;
else
- *((uschar **)((uschar *)data_block + (long int)(ol->value))) = sptr;
+ *USS (ol->value) = sptr;
freesptr = FALSE;
if (type == opt_rewrite)
{
if (r->condition)
{
- DEBUG(D_route) debug_printf("checking \"condition\"\n");
+ DEBUG(D_route) debug_printf("checking \"condition\" \"%.80s\"...\n", r->condition);
if (!expand_check_condition(r->condition, r->name, US"router"))
{
if (search_find_defer)
--------> r3 router <--------
local_part=solik domain=otherhost.test.ex
checking domains
-checking "condition"
+checking "condition" "${if eq{$address_data}{}{no}{yes}}"...
processing address_data
calling r3 router
rda_interpret (string): $local_part@$original_domain.sub.test.ex
--------> r3 router <--------
local_part=solik domain=otherhost.sub.test.ex
checking domains
-checking "condition"
+checking "condition" "${if eq{$address_data}{}{no}{yes}}"...
r3 router skipped: condition failure
--------> r4 router <--------
local_part=solik domain=otherhost.sub.test.ex
--------> r3 router <--------
local_part=xxx domain=testsub.test.ex
checking domains
-checking "condition"
+checking "condition" "${if eq{$address_data}{}{no}{yes}}"...
processing address_data
calling r3 router
rda_interpret (string): $local_part@$original_domain.sub.test.ex
--------> cccc_2nd_time router <--------
local_part=cccc domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{no}{yes}}"...
cccc_2nd_time router skipped: condition failure
--------> cccc_redirect router <--------
local_part=cccc domain=myhost.test.ex
--------> bbbb router <--------
local_part=bbbb domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{yes}{no}}"...
calling bbbb router
rda_interpret (string): bbbb@$domain, defer_bbbb@$domain
expanded: bbbb@myhost.test.ex, defer_bbbb@myhost.test.ex
--------> unseen_aaaa router <--------
local_part=aaaa domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{yes}{no}}"...
calling unseen_aaaa router
rda_interpret (string): defer_aaaa@$domain
expanded: defer_aaaa@myhost.test.ex
--------> cccc_2nd_time router <--------
local_part=cccc domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{no}{yes}}"...
cccc_2nd_time router skipped: condition failure
--------> cccc_redirect router <--------
cccc_redirect router skipped: previously routed cccc@myhost.test.ex
--------> cccc_2nd_time router <--------
local_part=cccc domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{no}{yes}}"...
calling cccc_2nd_time router
rda_interpret (string): $local_part@$domain
expanded: cccc@myhost.test.ex
--------> bbbb router <--------
local_part=bbbb domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{yes}{no}}"...
bbbb router skipped: condition failure
--------> bbbb_0 router <--------
local_part=bbbb domain=myhost.test.ex
--------> unseen_aaaa router <--------
local_part=aaaa domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{yes}{no}}"...
unseen_aaaa router skipped: condition failure
--------> seen_aaaa router <--------
local_part=aaaa domain=myhost.test.ex
--------> cccc_2nd_time router <--------
local_part=cccc domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{no}{yes}}"...
calling cccc_2nd_time router
rda_interpret (string): $local_part@$domain
expanded: cccc@myhost.test.ex
--------> bbbb router <--------
local_part=bbbb domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{yes}{no}}"...
bbbb router skipped: condition failure
--------> bbbb_0 router <--------
local_part=bbbb domain=myhost.test.ex
--------> unseen_aaaa router <--------
local_part=aaaa domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{yes}{no}}"...
unseen_aaaa router skipped: condition failure
--------> seen_aaaa router <--------
local_part=aaaa domain=myhost.test.ex
--------> aaaa_2nd_time router <--------
local_part=aaaa domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{no}{yes}}"...
aaaa_2nd_time router skipped: condition failure
--------> aaaa router <--------
local_part=aaaa domain=myhost.test.ex
--------> aaaa_2nd_time router <--------
local_part=aaaa domain=myhost.test.ex
checking local_parts
-checking "condition"
+checking "condition" "${if first_delivery{no}{yes}}"...
calling aaaa_2nd_time router
rda_interpret (string): aaaa@$domain
expanded: aaaa@myhost.test.ex
eximtesthost.test.ex ip4.ip4.ip4.ip4 MX=5
mxt1.test.ex in "@mx_any"? yes (matched "@mx_any")
mxt1.test.ex in "+anymx"? yes (matched "+anymx")
-checking "condition"
+checking "condition" "${if match_domain{$domain}{+anymx}{yes}}"...
DNS lookup of mxt1.test.ex (MX) using fakens
DNS lookup of mxt1.test.ex (MX) succeeded
DNS lookup of eximtesthost.test.ex (A) using fakens