mail(1) misses addresses when replying to all

There's a parsing error for fields where addresses are not separated by
space. This is often produced by MS Outlook, eg.:
Cc: <foo@bar.com>,"Mr Foo" <foo@baz.com>

The following line now splits into the right tokens:
Cc: f@b.com,z@y.de, <a@a.de>,<c@c.de>, "foo" <foo>,"bar" <bar>

PR:		bin/131861
Submitted by:	Pete French <petefrench at ticketswitch.com>
Tested by:	Pete French
Reviewed by:	mikeh
MFC after:	2 weeks
This commit is contained in:
Ulrich Spörlein 2010-05-27 12:59:49 +00:00
parent 65872f8fb5
commit a1d170a0b6
1 changed files with 4 additions and 3 deletions

View File

@ -496,10 +496,11 @@ skin(name)
*cp2++ = ' ';
}
*cp2++ = c;
if (c == ',' && *cp == ' ' && !gotlt) {
if (c == ',' && !gotlt &&
(*cp == ' ' || *cp == '"' || *cp == '<')) {
*cp2++ = ' ';
while (*++cp == ' ')
;
while (*cp == ' ')
cp++;
lastsp = 0;
bufend = cp2;
}