$ 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:
-> Select Internet Site -> FQDN = localhost
$ 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>
$ sudo ./configure -with-cgi-id=www-data -with-mailhost=localhost -with-url-host=localhost $ sudo 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 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:
MAILMAN_SITE_LIST = 'mailman-admin' #For testing purposes, delete when moved into production DEFAULT_EMAIL_HOST = 'localhost' DEFAULT_URL_HOST = 'localhost'
For setting up the system locally use this:
MAILMAN_SITE_LIST = 'mailman-admin' #For testing purposes, delete when moved into production DEFAULT_EMAIL_HOST = 'localhost' DEFAULT_URL_HOST = 'localhost'
$ 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
$ /etc/init.d/apache2 reload
* Add crontab
$ 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 /etc/init.d/mailman start
$ 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 .
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:
#For testing purposes, delete when moved into production DEFAULT_EMAIL_HOST = 'localhost' DEFAULT_URL_HOST = 'localhost'
$ 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