Update of /cvsroot/mailman/mailman/Mailman
In directory usw-pr-cvs1:/tmp/cvs-serv5770

Modified Files:
        MailCommandHandler.py 
Log Message:
ProcessSubscribeCmd(): If the address isn't given in the command, try
to dig the full name out of the From: header.


Index: MailCommandHandler.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/MailCommandHandler.py,v
retrieving revision 2.32
retrieving revision 2.33
diff -C2 -d -r2.32 -r2.33
*** MailCommandHandler.py       5 Mar 2002 04:52:04 -0000       2.32
--- MailCommandHandler.py       15 Mar 2002 17:34:29 -0000      2.33
***************
*** 26,29 ****
--- 26,30 ----
  import traceback
  import email.Iterators
+ import email.Utils
  from cStringIO import StringIO
  
***************
*** 627,632 ****
          """Parse subscription request and send confirmation request."""
          digest = self.digest_is_default
!         password = ""
!         address = ""
          done_digest = 0
          if not len(args):
--- 628,634 ----
          """Parse subscription request and send confirmation request."""
          digest = self.digest_is_default
!         password = ''
!         address = ''
!         fullname = ''
          done_digest = 0
          if not len(args):
***************
*** 656,660 ****
              password = Utils.MakeRandomPassword()
          if not address:
!             subscribe_address = Utils.LCDomain(mail.get_sender())
          else:
              subscribe_address = address
--- 658,666 ----
              password = Utils.MakeRandomPassword()
          if not address:
!             sender = mail['from']
!             if not sender:
!                 sender = mail.get_sender()
!             fullname, addr = email.Utils.parseaddr(sender)
!             subscribe_address = Utils.LCDomain(addr)
          else:
              subscribe_address = address
***************
*** 663,666 ****
--- 669,673 ----
              # FIXME: extract fullname
              userdesc = UserDesc(address=subscribe_address,
+                                 fullname=fullname,
                                  password=password,
                                  digest=digest)


_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins

Reply via email to