Project:Organic groups list manager
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)

Issue Summary

og2list wouldn't work for mail with the To field populated with a straight address like name@example.com, the regex matches only name <address> types. A message with a header like the following would fail and bounce because of the To: field.

Received: by 10.82.162.18 with HTTP; Wed, 20 Dec 2006 14:04:31 -0800 (PST)
Message-ID: <e252382b50612201404s7f16d4e2335260de8b5fe73f@mail.example.com>
Date: Wed, 20 Dec 2006 15:04:31 -0700
From: Name <name@example.com>
To: testgroup@lists.example.com
Subject: post from e-mail
In-Reply-To: <e25882b5061220df2p64ca25f8la7d373ff075e307f@mail.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <e25882b506sdf1322p64ca25f8lf70373ff075e307f@mail.example.com>

The chance of this error is even mentioned on line 331 of mail-in.pl. I will try and look for more formats the To field can be in and update this report, the from regex also needs updating as pointed out in another bug report.

I can also roll a bunch when I get some more time to. For my particular error I just had to add the following code after line 335, but a more robust solution would be better as this quick one assumes if not "name " then just "address".

if (!$to_address) {
        $to_address = $head->get("To",0);
}

Comments

#1

I mean to say I can roll a patch when I have some more time to. I'll look into other formats (if any) and update this report if no one else has pointed them out.

#2

The information posted on http://cr.yp.to/immhf.html, which refers to the RFCs, seems to adequately point out the variations for field values.

It would be too much to list what that site says is allowed for field values but for most cases the following examples cover formats:

name@example.com
"name"
name

(of course the domain part could also be expanded such as subdomain.example.com)

The page also says comments (parentheses) and domain literals ([]) are allowed but the little testing I did trying these were not accepted.

#3

Ah. Here are the examples again, correctly showing up:

name@example.com
"name" <name@example.com>
name <name@example.com>

#4

Status:active» postponed (maintainer needs more info)

Are you sure this is broken? With which version did you try?

#5

I got the dev snapshot on Nov. 29 2006, relative files for this issue:

og2list.module,v 1.70.2.4 2006/11/28 18:08:34 killes Exp $

mail-in.pl,v 1.27.2.3 2006/11/28 18:08:34 killes Exp $

Does that help?

nobody click here