= How to use Mailman as a source of authentication
Kudos to Christopher Gabriel for his [http://www.cgabriel.org/2009/09/21/ldap-e-la-disperazione/ original idea].
[https://www.gnu.org/software/mailman/ Mailman] can be used as a source of authentication for Trac. This is super handy, as it allows to have a single sign-on between the two. This page describes how to set this up.
First, please install mod_macro and mod_python, and add `www-data` to the group `list`.
An Apache macro needs to be defined as follows:
{{{#!apache
AuthName "$name"
AuthType Basic
PythonPath "sys.path+['/etc/apache2/']"
PythonAuthenHandler mailauth
PythonOption MailmanList $list
AuthUserFile /dev/null
AuthBasicAuthoritative Off
require valid-user
AuthName "$name"
AuthType Basic
PythonPath "sys.path+['/etc/apache2/']"
PythonAuthenHandler mailauth
PythonOption MailmanList $list
AuthUserFile /dev/null
AuthBasicAuthoritative Off
require valid-user
AuthName "$name"
AuthType Basic
PythonPath "sys.path+['/etc/apache2/']"
PythonAuthenHandler mailauth
PythonOption MailmanList $list
AuthUserFile /dev/null
AuthBasicAuthoritative Off
require valid-user
AuthName "$name"
AuthType Basic
PythonPath "sys.path+['/etc/apache2/']"
PythonAuthenHandler mailauth
PythonOption MailmanList $list
AuthUserFile /dev/null
AuthBasicAuthoritative Off
require valid-user
}}}
Then, in the relative !VirtualHost add the following:
{{{#!apache
Use PrivateProjectMailman progetto-x lista-progetto-x
}}}
or:
{{{#!apache
Use PublicProjectMailman progetto-x lista-progetto-x
}}}
And you are done.