summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Finch <dot@dotat.at>2012-12-06 20:16:39 +0000
committerTony Finch <dot@dotat.at>2012-12-06 20:18:18 +0000
commit5de8faa3f396e967020b5152525faad90d828e95 (patch)
tree39b3f18911cadf68a8cf28ac37fdb25f59363a35
parentf62514b3755f6d7bd2b3db54498f4322d37b9bfd (diff)
Make gecos expansion work with test 0412 as well as 0254.
-rw-r--r--src/src/receive.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/src/receive.c b/src/src/receive.c
index 4d77bcd96..eef0531a8 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -2035,9 +2035,12 @@ for (h = header_list->next; h != NULL; h = h->next)
from_header = h;
if (!smtp_input)
{
+ int len;
uschar *s = Ustrchr(h->text, ':') + 1;
while (isspace(*s)) s++;
- if (strcmpic(s, originator_login) == 0)
+ len = h->slen - (s - h->text) - 1;
+ if (strncmpic(s, originator_login, len) == 0
+ && Ustrlen(originator_login) == len)
{
uschar *name = is_resent? US"Resent-From" : US"From";
header_add(htype_from, "%s: %s <%s@%s>\n", name, originator_name,