[Mailman-Users] Modifying the List-* headers

David Chin dwchin at umich.edu
Sun Dec 30 16:31:27 CET 2001


In message <20011230123937.82AD8362 at tenaya.physics.lsa.umich.edu>, David Chin w
rites:
> 
> Is there a way to modify the List-* headers that go out with each message? 
> I'd like to have it so that the mailto: URI comes before the http: URI, 
> since it sux to have a browser come up when all you need to do is send a 
> message to listname-unsubscribe or whatnot.

Found the appropriate thing in $prefix/Mailman/CookHeaders.py:

    # DWCHIN: change subfieldfmt to put the mailto: link first
    #subfieldfmt = '<%s>, <mailto:%s?subject=%ssubscribe>'
    subfieldfmt = '<mailto:%s?subject=%ssubscribe>, <%s>'
    listinfo = mlist.GetScriptURL('listinfo', absolute=1)
    #
    # TBD: List-Id is not in the RFC, but it was in an earlier draft so we
    # leave it in for historical reasons.
    #headers = {
    #    'List-Id'         : listid,
    #    'List-Help'       : '<mailto:%s?subject=help>' % requestaddr,
    #    'List-Unsubscribe': subfieldfmt % (listinfo, requestaddr, 'un'),
    #    'List-Subscribe'  : subfieldfmt % (listinfo, requestaddr, ''),
    #    'List-Post'       : '<mailto:%s>' % mlist.GetListEmail(),
    #    }
    # DWCHIN: change headers to put the mailto: link first
    headers = {
        'List-Id'         : listid,
        'List-Help'       : '<mailto:%s?subject=help>' % requestaddr,
        'List-Unsubscribe': subfieldfmt % (requestaddr, 'un', listinfo),
        'List-Subscribe'  : subfieldfmt % (requestaddr, '', listinfo),
        'List-Post'       : '<mailto:%s>' % mlist.GetListEmail(),
        }
    #

Cheers,
--Dave
  dwchin at umich.edu






More information about the Mailman-Users mailing list