.code
${addresses:>& Chief <ceo@up.stairs>, sec@base.ment (dogsbody)}
.endd
-expands to &`ceo@up.stairs&&sec@base.ment`&. Compare the &*address*& (singular)
+expands to &`ceo@up.stairs&&sec@base.ment`&. The string is expanded
+first, so if the expanded string starts with >, it may change the output
+separator unintentionally. This can be avoided by setting the output
+separator explicitly:
+.code
+${addresses:>:$h_from:}
+.endd
+
+Compare the &*address*& (singular)
expansion item, which extracts the working address from a single RFC2822
address. See the &*filter*&, &*map*&, and &*reduce*& items for ways of
processing lists.
int start, end, domain; /* Not really used */
while (isspace(*sub)) sub++;
- if (*sub == '>') { *outsep = *++sub; ++sub; }
+ if (*sub == '>')
+ if (*outsep = *++sub) ++sub;
+ else {
+ expand_string_message = string_sprintf("output separator "
+ "missing in expanding ${addresses:%s}", --sub);
+ goto EXPAND_FAILED;
+ }
parse_allow_group = TRUE;
for (;;)
addresses: ${addresses:Exim Person <local-part@dom.ain> (that's me), \
xyz@abc, nullgroupname:;, group: p@q, r@s; }
addresses: ${addresses:local-part@dom.ain <local-part@dom.ain>}
+addresses: ${addresses:>}
escape: ${escape:B7·F2ò}
excape8bit: ${escape8bit:undisturbed text\ttab\nnewline\ttab\\backslash \176tilde\177DEL\200\x81.}
> addresses: local-part@dom.ain+xyz@abc
> addresses: local-part@dom.ain:xyz@abc:p@q:r@s
> addresses:
+> Failed: output separator missing in expanding ${addresses:>}
>
> escape: B7\267F2\362
> excape8bit: undisturbed text tab