Public bug reported:
I use mailman-2.1.14-6 on fedora 15
When I use english regex topics, all works good.
If I use russian regex, subscribers-members of a topic don't receive e-mails. Bacause subject doesn't match with regex.
In source code(/usr/lib/mailman/Mailman/Handlers/Tagger.py) I found that subject doesn't modified from MIME format.
If it english all seem good, but in my case I saw:
pattern is "<C8><D5><CA>" line is "=?KOI8-R?Q?=C8=D5=CA?="
I create simple patch that use decode_header function from email module
** Affects: mailman Importance: Undecided Status: New
** Tags: charset header mailman topics
** Attachment added: "patch for topics" https://bugs.launchpad.net/bugs/891676/+attachment/2599733/+files/Tagger.pat...
Thanks for your report.
This issue affects messages with RFC 2047 encoded Subject: and/or Keywords: headers as well as messages with encoded bodies containing Subject: and/or Keywords: pseudo-headers. The patch at comment #1 is incomplete as it doesn't take into account pseudo-headers and only decodes the first encoded word in an RFC 2047 encoded header.
** Changed in: mailman Importance: Undecided => Medium
** Changed in: mailman Status: New => In Progress
** Changed in: mailman Milestone: None => 2.1.15
** Changed in: mailman Assignee: (unassigned) => Mark Sapiro (msapiro)
Attached is a tentative patch for this issue. There will still be problems if the encoding of the regexp doesn't match that of the message header. E.g., if the characters in the regexp are encoded as koi8-r and the Subject header is encoded as utf-8.
What do you think of this patch?
** Patch added: "Tentative patch for this issue" https://bugs.launchpad.net/mailman/+bug/891676/+attachment/2599840/+files/Ta...
I have revised the patch to decode the headers in the character set of the list's preferred language which should match the character set of the topics regexps.
** Patch added: "Patch for this issue." https://bugs.launchpad.net/mailman/+bug/891676/+attachment/2600032/+files/Ta...
I've committed the fix in Comment #4. Note that this still does not address the issue with pseudo-headers in the message body if the charset of the message body is not compatible with that of the list's preferred language. I don't intend to fix that unless it proves to be an issue in practice.
** Changed in: mailman Status: In Progress => Fix Committed
Thanks for a patch, Mark! all works good.
May I add, that this affects non-national characters as well, notably brackets as used in the documentation (http://www.gnu.org/software/mailman/mailman-member/node30.html). Depending on mail client, topics such as [Networking] (as taken from the documentation) are downright impossible to define if the subject as a whole contains any characters the client decides to encode.
I don't know the roadmap for 2.1.15, but I think this bug calls for a speedy release of a patched version.
** Changed in: mailman Status: Fix Committed => Fix Released