Hi,

Brad Knowles wrote:

The latest crisis that has me wondering is the subject prefix stuff. Looking in NewsRunner.py, starting at line 104, we have:

    # Should we restore the original, non-prefixed subject for gatewayed
    # messages?
    origsubj = msgdata.get('origsubj')
    if not mlist.news_prefix_subject_too and origsubj is not None:
        del msg['subject']
        msg['subject'] = origsubj


However, we still have a problem. If mail clients reply to the message to the list (which will include the subject prefix), then this will result in a new message with a subject prefix for the list already present. Now, Mailman is smart and avoids adding a second subject prefix, but it doesn't strip out the subject prefix if one already exists. For the mailing list, this subject prefix stripping isn't necessary. But for gatewaying to the newsgroup, it might be desirable.

Sorry but I have no newsgroup forwarding environment here. Our system administrator (myself) determined long ago that newsgroups (usenet and fj) have extremely low S/N ratio and waste of storage and bandwidth. ;-)



This would also resolve the issue of restoring the original subject when gatewaying -- don't bother, and just let the subject prefix stripper deal with it.



If this were sed or Perl, I could quickly put together a one-line hack to implement this feature. For example, just doing something off the top of my head, you might be able to use something like:


subject=y/\w*$prefix\w*/ /;

Things are not easy because there are MIME subjects and we also start numbering prefix in mailman 2.1.6. May be we can calculate 'stripped_subject' in CookHeaders.py and store in msgdata for later use. Or, strip in a magical ;-) way which I use in CookHeaders.py and in HyperArch.py, in NewsRunner.py again.


Anyway, I will try.

--
Tokio Kikuchi, tkikuchi@ is.kochi-u.ac.jp
http://weather.is.kochi-u.ac.jp/

_______________________________________________
Mailman-Developers mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Reply via email to