from Mailman import mm_cfg
def extend(mlist):
    if hasattr(mlist, 'pipeline'):
        pl = mlist.pipeline
    else:
        pl = mm_cfg.GLOBAL_PIPELINE
    if 'PostLimit' not in pl:
        pl.insert(pl.index('Moderate'), 'PostLimit')
        mlist.pipeline = pl
    if not hasattr(mlist, 'post_member_limit'):
        # To limit the number of member posts per period, set the following
        # to the limit.
        mlist.post_member_limit = 0
    if not hasattr(mlist, 'post_list_limit'):
        # To limit the number of list posts per period, set the following
        # to the limit.
        mlist.post_list_limit = 0
    if not hasattr(mlist, 'post_period'):
        # To set the time period, set the following.
        #  <=0 -> current day
        #   >0 -> number of hours
        mlist.post_period = 0
