[Mailman-Developers] [ mailman-Bugs-517192 ] 2.0.8 borks on dot in local part of addr

noreply@sourceforge.net noreply@sourceforge.net
Mon, 06 May 2002 20:01:54 -0700


Bugs item #517192, was opened at 2002-02-13 13:20
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=100103&aid=517192&group_id=103

Category: mail delivery
Group: 2.0.x
Status: Open
Resolution: Out of Date
Priority: 5
Submitted By: CrackMonkey (monkeymaster)
Assigned to: Nobody/Anonymous (nobody)
Summary: 2.0.8 borks on dot in local part of addr

Initial Comment:
In a mail address's local part (the part to the left of
the at sign), it is perfectly valid to have periods. 
However, mailman stops reading the address right at the
@, so that "mr.bad@pigdog.org" is shown as "mr.bad". 
this is disastrous for lists where only subscribers are
allowed to post, since the system doesn't allow for
exceptions that lack an @ and a FQDN.

Either allowing exceptions to be of a more forgiving
format, or fixing the broken regex that truncates the
mail addresses would solve my problem.  I'm getting
tired of moderating a legitimate user's posts,
especially since the system won't even send the
warnings to the correct address.

----------------------------------------------------------------------

>Comment By: CrackMonkey (monkeymaster)
Date: 2002-05-06 20:01

Message:
Logged In: YES 
user_id=76237

mr.bad@pigdog.org *is* a member of the list, but those
headers cause mailman to tell me:

List:    CrackMonkey@crackmonkey.org                       
                    From:    mr.bad                        
                                        Subject: %^$!$^$%!!
W32.Elkern and Kin                                         
Reason:  Post by non-member to a members-only list         
                

Note the lack of an @ or FQDN in the From:

Yes, I am using python 2.2.1

----------------------------------------------------------------------

Comment By: Barry Warsaw (bwarsaw)
Date: 2002-05-06 19:59

Message:
Logged In: YES 
user_id=12800

I don't quite understand, are you saying that even though
"mr.bad@pigdog.org" is a member of the list, this message is
being not matching as being posted from a member?  Under
Python 2.2.1?

----------------------------------------------------------------------

Comment By: CrackMonkey (monkeymaster)
Date: 2002-05-06 19:37

Message:
Logged In: YES 
user_id=76237

So when testing the 2.2.1 Python, I see the difference. 
However, the following headers cause it to reject "mr.bad"
as a non-subscriber:

Received: from mail15.speakeasy.net (mail.speakeasy.net)
[216.254.0.215] 
	by zork.zork.net with esmtp (Exim 3.35 #1 (Debian))
	id 174ukJ-0000VO-00; Mon, 06 May 2002 19:30:31 -0700
Received: (qmail 3123 invoked from network); 7 May 2002
02:30:29 -0000
Received: from unknown (HELO tyrell) ([66.217.50.46])
(envelope-sender <mr.bad@pigdog.org>)
          by mail15.speakeasy.net (qmail-ldap-1.03) with
DES-CBC3-SHA encrypted SMTP
          for <crackmonkey@crackmonkey.org>; 7 May 2002
02:30:29 -0000
Received: from evan by tyrell with local (Exim 3.35 #1 (Debian))
	id 174uii-0002m8-00
	for <crackmonkey@crackmonkey.org>; Mon, 06 May 2002 22:28:52
-0400
To: crackmonkey@crackmonkey.org
Subject: %^$!$^$%!! W32.Elkern and Kin
From: Mr. Bad <mr.bad@pigdog.org>
Organization: Pigdog Journal
X-PGP-Fingerprint: 91F8 6B2D EBEA 8D7A 3F20  E5B0 6D97 B3BC
F498 A1D9
X-Revolutionary-Date: Septidi, 17 Flore'al 210 9:25:94 -20833
Date: Mon, 06 May 2002 22:28:48 -0400
Message-ID:
<878z6wofmn.fsf@tyrell.bad-people-of-the-future.san-francisco.ca.us>
Lines: 27
User-Agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.1
 (i386-debian-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii


----------------------------------------------------------------------

Comment By: Barry Warsaw (bwarsaw)
Date: 2002-05-02 21:08

Message:
Logged In: YES 
user_id=12800

monkeymaster, please try the patch, or include a Python
2.2.1 session that shows the bug still exists.  I believe
this bug report should be marked closed.

----------------------------------------------------------------------

Comment By: Barry Warsaw (bwarsaw)
Date: 2002-05-02 21:07

Message:
Logged In: YES 
user_id=12800

BTW, I'm attaching the patch to Python 2.1.3's rfc822.py
that I plan on checking in momentarily.  This backports the
Python 2.2.1 patch for the problem, and with this, my 2-line
example below also succeeds for Python 2.1.3.

If there's ever a Python 2.1.4, this patch will be part of it.

----------------------------------------------------------------------

Comment By: Dan Mick (dmick)
Date: 2002-05-02 20:18

Message:
Logged In: YES 
user_id=10725

I can echo that Python 2.2 doesn't have the parseaddr 
problem.  monkeymaster, can you try Barry's two-line
experiment and see if that works or fails?

----------------------------------------------------------------------

Comment By: CrackMonkey (monkeymaster)
Date: 2002-04-29 15:21

Message:
Logged In: YES 
user_id=76237

This happens even when I use python 2.2

----------------------------------------------------------------------

Comment By: Barry Warsaw (bwarsaw)
Date: 2002-04-27 09:34

Message:
Logged In: YES 
user_id=12800

This is really a bug with earlier versions of Python, I
believe.  MM2.0.x uses the standard library function
rfc822.parseaddr() to break and address into its realname +
email constituent parts.  Here are some examples:

% python
Python 2.2.1 (#1, Apr 22 2002, 17:14:12) 
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> from rfc822 import parseaddr
>>> parseaddr('Mr. Bad <mr.bad@pigdog.org>')
('Mr. Bad', 'mr.bad@pigdog.org')

% python2.1
Python 2.1.3 (#1, Apr 22 2002, 18:17:38) 
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> from rfc822 import parseaddr
>>> parseaddr('Mr. Bad <mr.bad@pigdog.org>')
('', 'Mr.Bad')

So this is clearly broken in Python 2.1.3, and works in
Python 2.2.1.  I'll look at backporting the fix to Python
2.1 in case there's ever a 2.1.4.  But if you're using an
earlier version of Python, this will still be broken. 
Consider upgrading to Python 2.2.1.

----------------------------------------------------------------------

Comment By: CrackMonkey (monkeymaster)
Date: 2002-04-26 12:54

Message:
Logged In: YES 
user_id=76237

The bug turns out not to be when there is a period in the
address, but in the plain text name. The mail address in
question is:

Mr. Bad <mr.bad@pigdog.org>

I realized this when I saw people who had different text
names from their e-mail addresses, as in:

Jr. Pickle <picklejr@someplace.foo>

This would show up as the mythical address "jr.pickle" in
mailman, and things would b0rk.

----------------------------------------------------------------------

Comment By: Barry Warsaw (bwarsaw)
Date: 2002-03-14 11:18

Message:
Logged In: YES 
user_id=12800

Either I need more information, or this problem is fixed in
MM2.1.  Quite often I uses test addresses like
"barry.warsaw@<wherever>" and I've had no problems with it.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=100103&aid=517192&group_id=103