hi,
a couple people have reported that they had a bug with their cron mails,
the domain appending code failed to locate the insert point correctly if
the header was ending with a comment, resulting in:
From: root (Charlie)@domain
the following diff fixes the issue correctly resulting in:
From: root@domain (Charlie)
I have had several confirmations that it fixes the issue, I've done some
testing of my own with various formats, but I would really appreciate if
you could run with this and confirm after a while that you have not seen
any broken From / To / Cc header.
Index: smtp_session.c
===================================================================
RCS file: /cvs/src/usr.sbin/smtpd/smtp_session.c,v
retrieving revision 1.221
diff -u -p -r1.221 smtp_session.c
--- smtp_session.c 17 Dec 2014 15:49:23 -0000 1.221
+++ smtp_session.c 5 Jan 2015 22:36:55 -0000
@@ -315,7 +315,9 @@ header_append_domain_buffer(char *buffer
has_domain = 1;
if (buffer[i] == ':' && !escape && !comment && !quote)
has_group = 1;
- if (! isspace(buffer[i]))
+
+ /* update insert point if not in comment and not on a
whitespace */
+ if (!comment && buffer[i] != ')' && !isspace((int)buffer[i]))
pos_component = i;
}
--
Gilles Chehade
https://www.poolp.org @poolpOrg