FAQ
Does anyone know where I can find the following config options:

msg_footer (nondigest): Footer added to mail sent to regular list members
Text appended to the bottom of every immediately-delivery message.

****
This text can include %(field)s format strings which are resolved against the
list's attribute dictionary (__dict__).
****

I see how to configure the footers, but I cannot find any listing of what
fields I can put in the footers other than the "useful" examples which seem
limited to what is already in use in the footer. In particular, i am looking
for the whole of the list's attribute dictionary "(__dict__)" from above.

Thanks,

J. Simmons
Web Coordinator, Oxford University Press
jrs at oup-usa.org
919/677-0977 ext. 5351

Search Discussions

  • Dan Mick at Jun 20, 2000 at 10:16 pm

    JRS wrote:
    Does anyone know where I can find the following config options:

    msg_footer (nondigest): Footer added to mail sent to regular list members
    Text appended to the bottom of every immediately-delivery message.

    ****
    This text can include %(field)s format strings which are resolved against the
    list's attribute dictionary (__dict__).
    ****

    I see how to configure the footers, but I cannot find any listing of what
    fields I can put in the footers other than the "useful" examples which seem
    limited to what is already in use in the footer. In particular, i am looking
    for the whole of the list's attribute dictionary "(__dict__)" from above.
    You can do a quick look with 'withlist':

    cd ~mailman
    python -i bin/withlist <listname>
    dir(m)

    It's not pretty, but it does show you what attributes are available.
    For the value of any particular attribute, use

    m.<attrname>

    Note: when you do this, you're writing Python code. Don't assign
    things to m or m.<attribute> unless you know what you're doing...but
    the above (dir(m) and m.<attr>) are completely safe.
  • Leonardo Rochael Almeida at Jun 20, 2000 at 10:32 pm

    On Tue, 20 Jun 2000, Dan Mick wrote:

    JRS wrote:
    Does anyone know where I can find the following config options:

    msg_footer (nondigest): Footer added to mail sent to regular list members
    Text appended to the bottom of every immediately-delivery message.

    ****
    This text can include %(field)s format strings which are resolved against the
    list's attribute dictionary (__dict__).
    ****

    I see how to configure the footers, but I cannot find any listing of what
    fields I can put in the footers other than the "useful" examples which seem
    limited to what is already in use in the footer. In particular, i am looking
    for the whole of the list's attribute dictionary "(__dict__)" from above.
    You can do a quick look with 'withlist':

    cd ~mailman
    python -i bin/withlist <listname>
    dir(m)

    It's not pretty, but it does show you what attributes are available.
    For the value of any particular attribute, use

    m.<attrname>
    Just a tip. if <attrname> is an attribute full of values (such as long
    lists or dictionaries), or with long values (such as e-mails held for
    approval 'cause they were too big), you won't be able to do much with the
    values. One suggestion is to type:
    type(m.<attribute>)
    to discover what type of attribute it is.
    Note: when you do this, you're writing Python code. Don't assign
    things to m or m.<attribute> unless you know what you're doing...but
    the above (dir(m) and m.<attr>) are completely safe.
    Well, unless I'm mistaken (which I usually am :-), you can do pretty much
    anything, as long as you don't call "m.Save()".

    Regards, Leo
  • Dan Mick at Jun 20, 2000 at 10:37 pm

    Just a tip. if <attrname> is an attribute full of values (such as long
    lists or dictionaries), or with long values (such as e-mails held for
    approval 'cause they were too big), you won't be able to do much with the
    values. One suggestion is to type:
    type(m.<attribute>)
    to discover what type of attribute it is.
    Sure. But knowing the type doesn't tell you much about what it contains.
    Note: when you do this, you're writing Python code. Don't assign
    things to m or m.<attribute> unless you know what you're doing...but
    the above (dir(m) and m.<attr>) are completely safe.
    Well, unless I'm mistaken (which I usually am :-), you can do pretty much
    anything, as long as you don't call "m.Save()".
    True; I was erring on the side of caution (as "assigning to an
    attribute" doesn't stay permanent without the Save, and there's no
    point in it for "exploring".)
  • Leonardo Rochael Almeida at Jun 20, 2000 at 11:07 pm
    On Tue, 20 Jun 2000, Dan Mick wrote:
    Just a tip. if <attrname> is an attribute full of values (such as long
    lists or dictionaries), or with long values (such as e-mails held for
    approval 'cause they were too big), you won't be able to do much with the
    values. One suggestion is to type:
    type(m.<attribute>)
    to discover what type of attribute it is.
    Sure. But knowing the type doesn't tell you much about what it contains.
    Yes, but you can, if it is a list or tuple, get m.<attribute>[0] or
    m.<attribute>[0:5] to get just a few elements. Or if it is a dictionary
    (for the perl folks in the audience, dictionary is the python idiom for
    associative arrays or hashes), you can get m.<attribute>.keys() to get the
    (tada!!) keys or m.<attribute>['<one of the keys>'].

    You can also call type() on elements of lists and dictionaries in case
    they are big too.
    Note: when you do this, you're writing Python code. Don't assign
    things to m or m.<attribute> unless you know what you're doing...but
    the above (dir(m) and m.<attr>) are completely safe.
    Well, unless I'm mistaken (which I usually am :-), you can do pretty much
    anything, as long as you don't call "m.Save()".
    True; I was erring on the side of caution (as "assigning to an
    attribute" doesn't stay permanent without the Save, and there's no
    point in it for "exploring".)
    Regards, Leo

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedJun 19, '00 at 8:14p
activeJun 20, '00 at 11:07p
posts5
users3
websitelist.org

People

Translate

site design / logo © 2022 Grokbase