Date: Wed, 14 Apr 2010 18:33:53 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= <uqs@spoerlein.net> To: Pete French <petefrench@ticketswitch.com> Cc: freebsd-stable@freebsd.org Subject: Re: Any chance of someone commiting the patch in bin/131861 ? Message-ID: <20100414163352.GS85798@acme.spoerlein.net> In-Reply-To: <E1O23jR-000Aix-67@dilbert.ticketswitch.com> References: <20100414142530.GR85798@acme.spoerlein.net> <E1O23jR-000Aix-67@dilbert.ticketswitch.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Wed, 14.04.2010 at 15:38:21 +0100, Pete French wrote:
> > Sorry Pete, but the patch still seems incomplete. You merely catch the
> > case when a comma is followed by space or quotation marks, but the email
> > header might look like this:
> > To: foo@domain.com,bar@otherdomain.com
>
> I think the original code handles cases like that fine, my patch merely
> looks for an extra possibility. I've just tested it with the
> above, and it works.
>
> Can you give me an example of one which doesn't work for you ? Either
> in the original /usr/bin/mail or in my patched version ?
Well, the following header didn't work:
Cc: <a@a.a>,<b@b.b>
Postfix will re-write this as part of sanitization, so I had to revert
to creating mbox files by hand. Anyway, could you please test the
following patch with a wider variety of mails?
[-- Attachment #2 --]
commit 59a3e2a82bdeafb7bb46e8d5c39dcb2474d7f826
Author: Ulrich Spörlein <uqs@spoerlein.net>
Date: Wed Apr 14 17:07:10 2010 +0200
bin/131861: [patch] 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>
diff --git a/usr.bin/mail/util.c b/usr.bin/mail/util.c
index df2d840..af962c8 100644
--- a/usr.bin/mail/util.c
+++ b/usr.bin/mail/util.c
@@ -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;
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100414163352.GS85798>
