{"id":1760,"date":"2012-07-16T08:59:08","date_gmt":"2012-07-16T08:59:08","guid":{"rendered":"https:\/\/lineo.es\/configurar-mailman-gentoo\/"},"modified":"2026-04-01T07:19:31","modified_gmt":"2026-04-01T07:19:31","slug":"gentoo-mailman","status":"publish","type":"post","link":"https:\/\/lineo.es\/en\/gentoo-mailman\/","title":{"rendered":"Gentoo: Mailman with Nginx &#038; Exim"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1760\" class=\"elementor elementor-1760\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"elementor-element elementor-element-efc683e e-flex e-con-boxed e-con e-parent\" data-id=\"efc683e\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-f5eae76 e-con-full e-flex e-con e-child\" data-id=\"f5eae76\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0edb4b0 elementor-widget elementor-widget-theme-post-title elementor-page-title elementor-widget-heading\" data-id=\"0edb4b0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"theme-post-title.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Gentoo: Mailman with Nginx &#038; Exim<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-833834f e-con-full e-flex e-con e-child\" data-id=\"833834f\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-07d4168 elementor-widget elementor-widget-text-editor\" data-id=\"07d4168\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This is how I installed\u00a0<a href=\"http:\/\/www.gnu.org\/software\/mailman\/\">Mailman<\/a>\u00a0in a\u00a0<a href=\"http:\/\/www.gentoo.org\/\">Gentoo<\/a>\u00a0server, using\u00a0<a href=\"http:\/\/nginx.org\/\">Nginx<\/a>\u00a0as the web server and\u00a0<a href=\"http:\/\/www.exim.org\/\">Exim<\/a>\u00a0as the MTA.<\/p><h4>Mailman<\/h4><p>By default Mailman runs with the Apache user and group. First step is to configure Mailman so it runs with the Nginx user and group. To do so edit \/etc\/make.conf and add these lines:<\/p><pre style=\"padding-left: 40px;\">\/etc\/make.conf\nMAILMAN_CGIUID=\"nginx\"\nMAILMAN_CGIGID=\"nginx\"<\/pre><p>Now you can go ahead and emerge Mailman. Next comes to configure it.<\/p><p>Edit\u00a0<tt>\/etc\/mailman\/mm_cfg.py<\/tt>\u00a0(replace the url and email hosts by yours):<\/p><pre style=\"padding-left: 40px;\">\/etc\/mailman\/mm_cfg.py\nDEFAULT_URL_HOST = 'mailman.example.com'\nDEFAULT_EMAIL_HOST = 'example.com'\n\n# https\nDEFAULT_URL_PATTERN = 'https:\/\/%s\/mailman\/'\nPUBLIC_ARCHIVE_URL = 'https:\/\/%(hostname)s\/pipermail\/%(listname)s'\n\n# Let Mailman know that the MTA (Exim) needs no aliases setting\nMTA = None<\/pre><p>As the mailman user (add the cron jobs, create the site password, and add the main list):<\/p><pre style=\"padding-left: 40px;\"># su - mailman\n\nmailman $ crontab cron\/crontab.in\nmailman $ bin\/mmsitepass\nmailman $ bin\/newlist mailman<\/pre><p>Run mailman:<\/p><pre style=\"padding-left: 40px;\"># rc-update add mailman default\n# service mailman start<\/pre><h4>Nginx<\/h4><p>The Mailman web interface works with the CGI interface. To get it working with Nginx start by emerging spawn-fcgi and fcgiwrap:<\/p><pre style=\"padding-left: 40px;\"># emerge spawn-fcgi fcgiwrap<\/pre><p>Create the configuration file and edit it:<\/p><pre style=\"padding-left: 40px;\"># cd \/etc\/conf.d\n# cp spawn-fcgi spawn-fcgi.fcgiwrap<\/pre><p>These are the changes to the configuration file:<\/p><pre style=\"padding-left: 40px;\">\/etc\/conf.d\/spawn-fcgi.fcgiwrap\nFCGI_SOCKET=\/run\/fcgiwrap.sock\nFCGI_ADDRESS=\nFCGI_PORT=\nFCGI_PROGRAM=\/usr\/sbin\/fcgiwrap\nFCGI_USER=nginx\nFCGI_GROUP=nginx<\/pre><p>Now start the daemon:<\/p><pre style=\"padding-left: 40px;\"># cd \/etc\/init.d\n# ln -s spawn-fcgi spawn-fcgi.fcgiwrap\n# rc-update add spawn-fcgi.fcgiwrap default\n# service spawn-fcgi.fcgiwrap start<\/pre><p>Now add the Nginx server configuration:<\/p><blockquote><pre>\/etc\/nginx\/mailman.conf\nserver {\n\u00a0\u00a0\u00a0 listen 80;\n\u00a0\u00a0\u00a0 server_name mailman.example.com;\n\n\u00a0\u00a0\u00a0 location \/.well-known\/acme-challenge {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 root \/var\/www\/letsencrypt;\n\u00a0\u00a0\u00a0 }\n\n\u00a0\u00a0\u00a0 location \/ {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return 301 https:\/\/$host$request_uri;\n\u00a0\u00a0\u00a0 }\n}\n\nserver {\n    listen 443 ssl;\n    server_name mailman.example.com;\n    root \/usr\/lib64\/mailman\/cgi-bin;\n\n\u00a0\u00a0\u00a0 ssl_certificate \/etc\/letsencrypt\/live\/mailman.example.com\/fullchain.pem;\n\u00a0\u00a0\u00a0 ssl_certificate_key \/etc\/letsencrypt\/live\/mailman.example.com\/privkey.pem;\n    # Redirect\n    location \/ {\n        rewrite ^ \/mailman\/listinfo permanent;\n    }\n\n    location ~ ^\/mailman(\/[^\/]*)(\/.*)?$ {\n        fastcgi_split_path_info ^\/mailman\/([^\/]*)(.*)$;\n        include fastcgi_params;\n        fastcgi_param SCRIPT_FILENAME $document_root\/$1;\n        fastcgi_param PATH_INFO $fastcgi_path_info;\n        fastcgi_pass unix:\/run\/fcgiwrap.sock-1;\n    }\n\n    location \/mailman-icons {\n        alias \/usr\/lib64\/mailman\/icons;\n    }\n\n    location \/pipermail {\n        alias \/var\/lib\/mailman\/archives\/public;\n    }\n}<\/pre><\/blockquote><p>Include the file into the main Nginx configuration file:<\/p><pre style=\"padding-left: 40px;\">\/etc\/nginx\/nginx.conf\ninclude mailman.conf;<\/pre><p>Add nginx to the mailman group, so it has access rights to the archive:<\/p><pre style=\"padding-left: 40px;\"># gpasswd -a nginx mailman<\/pre><p>And restart Nginx:<\/p><pre style=\"padding-left: 40px;\"># service nginx restart<\/pre><h4>Exim<\/h4><p>There is very good documentation on running Mailman with Exim:\u00a0<a href=\"http:\/\/www.exim.org\/howto\/mailman21.html\">Using Exim 4 and Mailman 2.1 together<\/a>.<\/p><p>The only thing I found missing from the docs is a reference to the\u00a0<i>mailman-loop<\/i>\u00a0address. Add an alias for\u00a0<i>mailman-loop<\/i>\u00a0to a routable address, edit the\u00a0<tt>\/etc\/mail\/aliases<\/tt>\u00a0file, for example:<\/p><pre style=\"padding-left: 40px;\">\/etc\/mail\/aliases\nmailman-loop: root<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>This is how I installed\u00a0Mailman\u00a0in a\u00a0Gentoo\u00a0server, using\u00a0Nginx\u00a0as the web server and\u00a0Exim\u00a0as the MTA. Mailman By default Mailman runs with the Apache user and group. First step is to configure Mailman so it runs with the Nginx user and group. To do so edit \/etc\/make.conf and add these lines: \/etc\/make.conf MAILMAN_CGIUID=&#8221;nginx&#8221; MAILMAN_CGIGID=&#8221;nginx&#8221; Now you can go [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"elementor_header_footer","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1760","post","type-post","status-publish","format-standard","hentry","category-sin-categoria"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/lineo.es\/en\/wp-json\/wp\/v2\/posts\/1760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lineo.es\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lineo.es\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lineo.es\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lineo.es\/en\/wp-json\/wp\/v2\/comments?post=1760"}],"version-history":[{"count":5,"href":"https:\/\/lineo.es\/en\/wp-json\/wp\/v2\/posts\/1760\/revisions"}],"predecessor-version":[{"id":2143,"href":"https:\/\/lineo.es\/en\/wp-json\/wp\/v2\/posts\/1760\/revisions\/2143"}],"wp:attachment":[{"href":"https:\/\/lineo.es\/en\/wp-json\/wp\/v2\/media?parent=1760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lineo.es\/en\/wp-json\/wp\/v2\/categories?post=1760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lineo.es\/en\/wp-json\/wp\/v2\/tags?post=1760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}