Difference between revisions of "Mailman"

From ArchWiki
Jump to: navigation, search
(added icons)
Line 49: Line 49:
 
         }
 
         }
 
   
 
   
 +
        location /icons {
 +
                alias /usr/lib/mailman/icons/;
 +
                autoindex on;
 +
        }
 +
 
         location /pipermail {
 
         location /pipermail {
 
                 alias /var/lib/mailman/archives/public;
 
                 alias /var/lib/mailman/archives/public;

Revision as of 14:41, 1 October 2011


Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Mailman#)

Installing Mailman is pretty easy, but getting the web stuff to work was a little tricky.

# pacman -S mailman fcgiwrap nginx

We need to wrap mailman with fcgiwrap in order to get nginx to understand what's going on. After this installs, run this to set up your first list:

# /usr/lib/mailman/bin/newlist mailman

This will create a new mailing list, 'mailman.' This is required for mailman to start. To get mailman running, do this:

# /etc/rc.d/mailman start

You should see a message that it worked. Now that you've got mailman running, we need to get it hooked up through fcgi. Start fcgiwrap by doing this:

 # /etc/rc.d/fcgiwrap start

This will start fcgiwrap on localhost:9001. If you'd like to change the configuration, it's in /etc/conf.d/fcgiwrap.

Open up the nginx config file:

 # vim /etc/nginx/conf/nginx.conf

and add a section like this:

 server {
       server_name lists.MYDOMAIN.com;
       root /usr/lib/mailman/cgi-bin;

       location = / {
               rewrite ^ /mailman/listinfo permanent;
       }

       location / {
               rewrite ^ /mailman$uri;
       }

       location ~ ^/mailman(/[^/]*)(/.*)?$ {
               fastcgi_split_path_info (^/mailman/[^/]*)(.*)$;
               include conf/fastcgi_params;
               fastcgi_param GATEWAY_INTERFACE CGI/1.1;
               fastcgi_param SCRIPT_FILENAME $document_root$1;
               fastcgi_param PATH_INFO $fastcgi_path_info;
               fastcgi_param PATH_TRANSLATED $document_root$2;
               fastcgi_pass 127.0.0.1:9001;
       }

       location /icons {
               alias /usr/lib/mailman/icons/;
               autoindex on;
       }
       location /pipermail {
               alias /var/lib/mailman/archives/public;
               autoindex on;
       }
 }

Then start up nginx:

# /etc/rc.d/nginx start

And you should be able to visit http://lists.MYDOMAIN.com, and it should all work!