From: <ke...@us...> - 2006-04-17 09:46:19
|
Revision: 2910 Author: kevca Date: 2006-04-17 02:46:13 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/mailmanager/?rev=2910&view=rev Log Message: ----------- - Unicode from addresses break incoming mail (#1440861) Modified Paths: -------------- MailManager/branches/RELENG_2_1/Extensions/AccountPluggableBrain.py Modified: MailManager/branches/RELENG_2_1/Extensions/AccountPluggableBrain.py =================================================================== --- MailManager/branches/RELENG_2_1/Extensions/AccountPluggableBrain.py 2006-04-10 16:16:57 UTC (rev 2909) +++ MailManager/branches/RELENG_2_1/Extensions/AccountPluggableBrain.py 2006-04-17 09:46:13 UTC (rev 2910) @@ -150,8 +150,15 @@ # Create Ticket ################################################### self.logFlowPointEntry('process', 'create ticket') ################ + # getHeader may decode a unicode string for an email address, + # respecting RFC2047. We do not want to convert this, as email + # addresses do not support RFC2047 encoding, only punycode on + # the RHS. No agreement has yet been reached on an encoding for + # the LHS, so we leave it in whatever encoding it was sent in. decoded_from_header = self.getHeader(msg, 'from') - from_name, from_email = email.Utils.parseaddr(decoded_from_header) + raw_from_header = msg['from'] + from_name, ignore = email.Utils.parseaddr(decoded_from_header) + ignore, from_email = email.Utils.parseaddr(raw_from_header) print "Saving ticket with ruleset ", self.engine.rsname This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |