- uschar *prefix = expand_string(ob->message_prefix);
- if (!prefix)
- {
- errno = ERRNO_EXPANDFAIL;
- addr->transport_return = PANIC;
- addr->message = string_sprintf("Expansion of \"%s\" (prefix for %s "
- "transport) failed", ob->message_prefix, tblock->name);
- yield = DEFER;
- }
- else if (!transport_write_string(fd, "%s", prefix)) yield = DEFER;
+ uschar * prefix = ob->message_prefix;
+ GET_OPTION("message_prefix");
+ if (prefix && *prefix)
+ if (!(prefix = expand_string(prefix)))
+ {
+ errno = ERRNO_EXPANDFAIL;
+ addr->transport_return = PANIC;
+ addr->message = string_sprintf("Expansion of \"%s\" (prefix for %s "
+ "transport) failed", ob->message_prefix, tblock->name);
+ yield = DEFER;
+ }
+ else if (!transport_write_string(fd, "%s", prefix))
+ yield = DEFER;