To set up the system Ubuntu 8.04 and Python 2.5 is neccessary. Unfortunately, newer versions of eg. Python are yet not compatible with the version on Mailman used here (Mailman 2.1.10), hence please use the versions named above.
As part of gsoc2010, the installation steps have been automated. Please read : http://systers.org/systers-dev/doku.php/svaksha:step_by_step_system_installation_automation for detailed instructions.
$ sudo addgroup admin
$ sudo adduser <name of user>
$ sudo vi /etc/group
Find the line that looks like this (number may be different)
admin:x:112:
And add any users that you want to have super-user privileges.
admin:x:112:user1,user2,user3
Write and quit /etc/group
$ sudo apt-get update
$ sudo apt-get upgrade
All package dependencies will be installed with the following commands. Select “Y” to install when prompted.
$ sudo apt-get install language-pack-en
$ sudo apt-get install ntp
$ sudo apt-get install bzr
$ sudo apt-get install python2.5
$ sudo apt-get install apache2
$ sudo apt-get install postfix
(use tab and arrow keys to navigate through option window)
-> Select Internet Site -> FQDN = yourdomain.com
For setting up the system locally use this (exchange <domain name> for a “valid” domain name such as my.dom.ain or yourcomputername.yournetworkname):
-> Select Internet Site -> FQDN = <domain name>
$ sudo apt-get install postgresql
$ sudo apt-get install build-essential
$ sudo apt-get install python-dev
$ sudo apt-get install python-psycopg2
Postfix should work right-out-of-the-so-called-box provide you picked Internet Site above.
$ cd ~ $ wget http://launchpad.net/mailman/2.1/2.1.10/+download/mailman-2.1.10.tgz
$ tar -zxvf mailman-2.1.10.tgz
The file will expand into a directory called mailman-2.1.10 in your home directory.
$ sudo groupadd mailman $ sudo useradd -s /bin/false -g mailman mailman
$ sudo mkdir /usr/local/mailman $ sudo chown -R mailman:mailman /usr/local/mailman $ sudo chmod -R 02775 /usr/local/mailman
$ cd <to expanded mailman dir>
$ ./configure -with-cgi-id=www-data -with-mailhost=localhost -with-urlhost=localhost $ make $ sudo make install
$ sudo su $ cd /usr/local/mailman $ bin/check_perms $ bin/check_perms -f
$ sudo su $ cd /usr/local/mailman/archives $ chown www-data private $ chmod o-x private $ exit
$ sudo /usr/local/mailman/bin/newlist
Please read the page bin_newlist_bug_588028 for steps to avoid after pulling the systers-stable branch (rev 73).
Follow the prompts.
$ sudo vi /usr/local/mailman/Mailman/mm_cfg.py
Scroll to the bottom of the file and add:
MTA = 'Postfix'
and since we are here add the following lines (which will set up the system locally) and exchange <domain name> for a “valid” domain name
MAILMAN_SITE_LIST = <insert the name of site list created before> #For testing purposes, delete when moved into production DEFAULT_EMAIL_HOST = '<domain name>' DEFAULT_URL_HOST = '<domain name>' add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
$ cd /usr/local/mailman $ sudo bin/genaliases $ sudo chown mailman:mailman data/aliases* $ sudo chmod g+w data/aliases*
$ sudo vi /etc/postfix/main.cf
Go to
alias_maps = hash:/etc/aliases
and Add:
hash:/usr/local/mailman/data/aliases
So the line looks like:
alias_maps = hash:/etc/aliases,hash:/usr/local/mailman/data/aliases
$ sudo /etc/init.d/postfix reload
$ sudo su $ cd /etc/apache2/sites-available $ vi mailman
Cut and Paste the following into mailman
ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
# To access the public archives:
Alias /pipermail/ /usr/local/mailman/archives/public/
<Directory /usr/local/mailman/cgi-bin/>
AllowOverride None
Options ExecCGI
AddHandler cgi-script .cgi
Order allow,deny
Allow from all
</Directory>
<Directory /usr/local/mailman/archives/public/>
Options Indexes FollowSymlinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Write and Quit
$ exit
to return to your shell
$ sudo a2ensite mailman
$ sudo /etc/init.d/apache2 reload
$ cd /usr/local/mailman/cron $ sudo crontab -u mailman crontab.in
cd /usr/local/mailman $ sudo cp scripts/mailman /etc/init.d/ $ sudo update-rc.d mailman defaults
$ sudo bin/mmsitepass <your-site-password>
$ cd /usr/local/mailman $ sudo bin/check_perms $ sudo bin/check_perms -f
$ sudo vi /etc/hosts
$ sudo /etc/init.d/mailman start
$ sudo adduser <name of new user>
$ sudo apt-get install mailx
$ sudo su <name of user> $ mail
$ sudo /etc/init.d/postgresql-8.3 stop
$ sudo vi /etc/postgresql/8.3/main/pg_hba.conf
Find this line:
#"local" is for Unix domain socket connections only
local all all ident sameuser
Comment it out and add the following line:
local all all md5
$ sudo /etc/init.d/postgresql-8.3 start
$ sudo su postgres $ createuser mailman -> Shall the new role be a superuser? (y/n) n -> Shall the new role be allowed to create databases? (y/n) y -> Shall the new role be allowed to create more new roles? (y/n) n
$ psql (this drops you into the sql interface for modifying the postgres db) postgres=# alter user mailman password 'mailman'; ALTER ROLE ctrl-D (to exit psql) ctrl-D (to go back to original user shell)
$ sudo /etc/init.d/mailman stop
$ cd /usr/local/mailman $ pwd (to make sure you are in /usr/local/mailman) $ sudo bzr checkout --lightweight lp:systers .
Please see - Bazaar Branches
You will probably get a message about .moved files since you are over-writing existing files. This is ok.
$ sudo su $ find /usr/local/mailman -name "*.moved" |xargs rm
$ sudo bin/check_perms -f
$ sudo vi /usr/local/mailman/Mailman/mm_cfg.py
Readd (at bottom of file):
For setting up Systers-Mailman locally (use the same “valid” domain name as earlier, exchanging this for <domain name>):
#For testing purposes, delete when moved into production DEFAULT_EMAIL_HOST = '<domain name>' DEFAULT_URL_HOST = '<domain name>' add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
$ sudo aptitude install python-markdown
$ sudo apt-get install python-storm
$ sudo /etc/init.d/mailman start
$ sudo apt-get remove --purge build-essential $ sudo apt-get remove --purge python2.5-dev $ sudo apt-get autoremove