Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How to disable "create a new mailing list" option showing up on admin page for public.

Example: http://mm.gnu.org.in/cgi-bin/mailman/admin

share|improve this question
add comment

4 Answers 4

You can change /usr/lib/mailman/Mailman/Cgi/admin.py. Remember to back it up!

Original:

    creatorurl = Utils.ScriptURL('create')
    mailman_owner = Utils.get_site_email()
    extra = msg and _('right ') or ''
    welcome.extend([
        _('''To visit the administrators configuration page for an
        unadvertised list, open a URL similar to this one, but with a '/' and
        the %(extra)slist name appended.  If you have the proper authority,
        you can also <a href="%(creatorurl)s">create a new mailing list</a>.

        <p>General list information can be found at '''),
        Link(Utils.ScriptURL('listinfo'),
             _('the mailing list overview page')),
        '.',
        _('<p>(Send questions and comments to '),
        Link('mailto:%s' % mailman_owner, mailman_owner),
        '.)<p>',
        ])

Version without create link:

    creatorurl = Utils.ScriptURL('create')
    mailman_owner = Utils.get_site_email()
    extra = msg and _('right ') or ''
    welcome.extend([
        _('''To visit the administrators configuration page for an
        unadvertised list, open a URL similar to this one, but with a '/' and
        the %(extra)slist name appended.

        <p>General list information can be found at '''),
        Link(Utils.ScriptURL('listinfo'),
             _('the mailing list overview page')),
        '.',
        _('<p>(Send questions and comments to '),
        Link('mailto:%s' % mailman_owner, mailman_owner),
        '.)<p>',
        ])

Remember that this doesn't disable the creation of new lists, but just hide the link! So you still have to have a good list creation password!

share|improve this answer
add comment

This is dredging up a very old thread, but this is how I achieved it, that doesn't involve hacking python. I simply redirect the URL in the apache config.

On Ubuntu, it's /etc/apache2/sites-available/mailman.conf. Add this line:

Redirect /mailman/create /mailman/admin

And graceful Apache:

/etc/init.d/apache2 graceful

Any attempt to load http://example.com/mailman/create will just redirect to http://example.com/mailman/admin .

share|improve this answer
add comment

I just remove the link and change the /var/lib/mailman/Mailman/Cgi/listinfo.py not the admin.py . and add (at) like below , mailman_owner = Utils.get_site_email() welcome.extend([ _('''To visit the administrators configuration page for an unadvertised list, open a URL similar to this one, but with a '/' and the %(extra)slist name appended.

    <p>General list information can be found at '''),
    Link(Utils.ScriptURL('listinfo'),
         _('the mailing list overview page')),
    '.',
    _('<p>(Send questions and comments to '),
    ('mailman (at) mail.domain.com'),
    '.)<p>',
    ])

And with this in first page of mailman when we see all lists not link to mail . is most effective if we think about spammers .

share|improve this answer
add comment

You could make apache password protect the create script - that way your admins can still use it (all be it with separate credentials).

This is what mailman put in my apache config file:

    ScriptAlias /cgi-bin/ /path/to/cgi-bin/
    <Directory "/path/to/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

I added this:

    # For some reason, +SymLinksIfOwnerMatch causes apache to not apply auth
    <Directory "/path/to/cgi-bin/mailman/">
            Options -SymLinksIfOwnerMatch
    </Directory>
    <Directory "/path/to/cgi-bin/mailman/create">
            AuthType Basic
            AuthName "Authentication required"
            AuthUserFile "/path/to/mailmanusers"
            Require valid-user
    </Directory>

having created the AuthUserFile with one user in it with:

htpasswd -c /path/to/mailmanusers myusername
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.