JH/23 Bug 3066: Avoid leaking lookup database credentials to log.
+JH/24 Bug 3081: Fix a delivery process crash. When the router "errors_to"
+ option specified a fixed address, later rewriting on that address would
+ trip on the configuration data being readonly. Instead of modifying
+ in-place, copy data. Found and fixed by Peter Benie.
+
Exim version 4.97
-----------------
mx_fail_domains.
JH/45 Use a (new) separate store pool-pair for DKIM verify working data.
- Previously the permanent pool was used, so the sore could not be freed.
+ Previously the permanent pool was used, so the store could not be freed.
This meant a connection with many messages would use continually-growing
memory.
{
const uschar *yield = s;
const uschar *subject = s;
-uschar *domain = NULL;
+const uschar *domain = NULL;
BOOL done = FALSE;
int rule_number = 1;
int yield_start = 0, yield_end = 0;
else
{
- if (!domain) domain = Ustrrchr(subject, '@') + 1;
+ if (!domain) domain = CUstrrchr(subject, '@') + 1;
/* Use the general function for matching an address against a list (here
just one item, so use the "impossible value" separator UCHAR_MAX+1). */
save_domain = deliver_domain;
/* We have subject pointing to "localpart@domain" and domain pointing to
- the domain. Temporarily terminate the local part so that it can be
- set up as an expansion variable */
+ the domain. Split into local part and domain so that it can be set up as
+ an expansion variable */
- domain[-1] = 0;
- deliver_localpart = US subject;
+ deliver_localpart = US string_copyn(subject, domain-subject-1);
deliver_domain = domain;
new = expand_string(rule->replacement);
- domain[-1] = '@';
deliver_localpart = save_localpart;
deliver_domain = save_domain;
}