- uschar *expmessage = expand_string(addr->router->cannot_route_message);
- if (!expmessage)
- {
- if (!f.expand_string_forcedfail)
- log_write(0, LOG_MAIN|LOG_PANIC, "failed to expand "
- "cannot_route_message in %s router: %s", addr->router->name,
- expand_string_message);
- }
- else message = expmessage;
+ uschar * s = addr->router->cannot_route_message;
+ GET_OPTION("cannot_route_message");
+ if (s)
+ {
+ if ((s = expand_string(s)))
+ message = s;
+ else
+ if (!f.expand_string_forcedfail)
+ log_write(0, LOG_MAIN|LOG_PANIC, "failed to expand "
+ "cannot_route_message in %s router: %s", addr->router->name,
+ expand_string_message);
+ }