Mailman + The Perfect Server - Ubuntu 11.10 [ISPConfig 3]

Discussion in 'Installation/Configuration' started by Tastiger, Oct 24, 2011.

  1. Tastiger

    Tastiger Member HowtoForge Supporter

    My server is now upgraded to the above after starting 10.4 and I wish to integrate mailman.

    The server has 6 email domains - all configured through ISPConfig 3 - and I want to enable mailman on 2 of those.

    Can someone point me to the best "how to" on installation of mailman in my current environment?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    This is from my working copy of the ISPConfig 3 Manual for ISPConfig 3.0.4 (which will be released after ISPConfig 3.0.4 has been released):

    Afterwards, wait until ISPConfig 3.0.4 is released (comes with Mailman support) and then upgrade to 3.0.4. During the upgrade, please choose to let ISPConfig reconfigure all services.
     
  3. Tastiger

    Tastiger Member HowtoForge Supporter

    Just what I was after - Many Thanks
     
  4. Tastiger

    Tastiger Member HowtoForge Supporter

    Last edited: Nov 7, 2011
  5. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/apache2/conf.d/mailman.conf?
     
  6. Tastiger

    Tastiger Member HowtoForge Supporter

    Code:
     Sample configuration for Debian mailman with Apache
    
    # We can find mailman here:
    ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/
    # And the public archives:
    Alias /pipermail/ /var/lib/mailman/archives/public/
    # Logos:
    Alias /images/mailman/ /usr/share/images/mailman/
    
    # Use this if you don't want the "cgi-bin" component in your URL:
    # In case you want to access mailman through a shorter URL you should enable
    # this:
    #ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
    # In this case you need to set the DEFAULT_URL_PATTERN in
    # /etc/mailman/mm_cfg.py to http://%s/mailman/ for the cookie
    # authentication code to work.  Note that you need to change the base
    # URL for all the already-created lists as well.
    
    <Directory /usr/lib/cgi-bin/mailman/>
        AllowOverride None
        Options ExecCGI
        AddHandler cgi-script .cgi
        Order allow,deny
    
     
  7. falko

    falko Super Moderator Howtoforge Staff

    That's not the full file (is it?).
     
  8. Tastiger

    Tastiger Member HowtoForge Supporter

    Code:
    # Sample configuration for Debian mailman with Apache
    
    # We can find mailman here:
    ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/
    # And the public archives:
    Alias /pipermail/ /var/lib/mailman/archives/public/
    # Logos:
    Alias /images/mailman/ /usr/share/images/mailman/
    
    # Use this if you don't want the "cgi-bin" component in your URL:
    # In case you want to access mailman through a shorter URL you should enable
    # this:
    #ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
    # In this case you need to set the DEFAULT_URL_PATTERN in
    # /etc/mailman/mm_cfg.py to http://%s/mailman/ for the cookie
    # authentication code to work.  Note that you need to change the base
    # URL for all the already-created lists as well.
    
    <Directory /usr/lib/cgi-bin/mailman/>
        AllowOverride None
        Options ExecCGI
        AddHandler cgi-script .cgi
        Order allow,deny
    
    Yes it is - what am i missing????:confused:
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Did you scroll to the end? At least the closing </Directory> is missing.
     
  10. Tastiger

    Tastiger Member HowtoForge Supporter

    Oops :eek: - should have maximized the putty window - sorry about that....

    Code:
    # Sample configuration for Debian mailman with Apache
    
    # We can find mailman here:
    ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/
    # And the public archives:
    Alias /pipermail/ /var/lib/mailman/archives/public/
    # Logos:
    Alias /images/mailman/ /usr/share/images/mailman/
    
    # Use this if you don't want the "cgi-bin" component in your URL:
    # In case you want to access mailman through a shorter URL you should enable
    # this:
    #ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
    # In this case you need to set the DEFAULT_URL_PATTERN in
    # /etc/mailman/mm_cfg.py to http://%s/mailman/ for the cookie
    # authentication code to work.  Note that you need to change the base
    # URL for all the already-created lists as well.
    
    <Directory /usr/lib/cgi-bin/mailman/>
        AllowOverride None
        Options ExecCGI
        AddHandler cgi-script .cgi
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/lib/mailman/archives/public/>
        Options FollowSymlinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /usr/share/images/mailman/>
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    
    
    ## The following describes how to configure mailman on
    ## a dedicated virtual host, courtesy Marco d'Itri.
    
    # Add these lines in /etc/mailman/mm_cfg.py:
    #DEFAULT_EMAIL_HOST = 'lists.example.net'
    #DEFAULT_URL_HOST = 'lists.example.net'
    #DEFAULT_URL_PATTERN = 'http://%s/'
    
    #<VirtualHost *>
    #ServerName lists.example.net
    #DocumentRoot /var/www/lists
    #ErrorLog /var/log/apache2/lists-error.log
    #CustomLog /var/log/apache2/lists-access.log combined
    #
    #<Directory /var/lib/mailman/archives/>
    #    Options FollowSymLinks
    #    AllowOverride None
    #</Directory>
    #
    #Alias /pipermail/ /var/lib/mailman/archives/public/
                                                           
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. Did you restart Apache? If that didn't work, can you post the polyfidelity.org.au vhost configuration?
     
  12. Tastiger

    Tastiger Member HowtoForge Supporter

    /etc/apache2/sites-enabled/900-polyfidelity.org.au.vhost

    Code:
    <Directory /var/www/polyfidelity.org.au>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
    
    <VirtualHost *:80>
        DocumentRoot /var/www/clients/client0/web32/web
    
        ServerName polyfidelity.org.au
        ServerAlias *.polyfidelity.org.au
        ServerAlias bendigo.polyfidelity.org.au
        ServerAlias www.polyfidelity.org.au
        ServerAdmin [email protected]
    
        ErrorLog /var/log/ispconfig/httpd/polyfidelity.org.au/error.log
    
    
        ErrorDocument 400 /error/400.html
        ErrorDocument 401 /error/401.html
        ErrorDocument 403 /error/403.html
        ErrorDocument 404 /error/404.html
        ErrorDocument 405 /error/405.html
        ErrorDocument 500 /error/500.html
        ErrorDocument 502 /error/502.html
        ErrorDocument 503 /error/503.html
    
        <IfModule mod_ssl.c>
        </IfModule>
        <Directory /var/www/polyfidelity.org.au/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    
            # ssi enabled
            AddType text/html .shtml
            AddOutputFilter INCLUDES .shtml
            Options +Includes
        </Directory>
        <Directory /var/www/clients/client0/web32/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    
            # ssi enabled
            AddType text/html .shtml
            AddOutputFilter INCLUDES .shtml
            Options +Includes
        </Directory>
    
        <IfModule mod_ruby.c>
          <Directory /var/www/clients/client0/web32/web>
            Options +ExecCGI
          </Directory>
          RubyRequire apache/ruby-run
          #RubySafeLevel 0
          <Files *.rb>
            SetHandler ruby-object
            RubyHandler Apache::RubyRun.instance
          </Files>
          <Files *.rbx>
            SetHandler ruby-object
            RubyHandler Apache::RubyRun.instance
          </Files>
        </IfModule>
    
    
        # cgi enabled
    	<Directory /var/www/clients/client0/web32/cgi-bin>
          Order allow,deny
          Allow from all
        </Directory>
        ScriptAlias  /cgi-bin/ /var/www/clients/client0/web32/cgi-bin/
        AddHandler cgi-script .cgi
        AddHandler cgi-script .pl
        # suexec enabled
        SuexecUserGroup web32 client0
        # Clear PHP settings of this website
        <FilesMatch "\.ph(p3?|tml)$">
            SetHandler None
        </FilesMatch>
        # suphp enabled
        <Directory /var/www/clients/client0/web32/web>
    		<IfModule mod_suphp.c>
            suPHP_Engine on
            # suPHP_UserGroup web32 client0
            AddHandler x-httpd-suphp .php .php3 .php4 .php5
            suPHP_AddHandler x-httpd-suphp
    		</IfModule>
        </Directory>
    
        RewriteEngine on
        RewriteCond %{HTTP_HOST}   ^bendigo.polyfidelity.org.au$ [NC]
        RewriteRule   ^/(.*)$ /bendigo/$1  [L]
    
        # add support for apache mpm_itk
        <IfModule mpm_itk_module>
          AssignUserId web32 client0
        </IfModule>
    
        <IfModule mod_dav_fs.c>
    	  # Do not execute PHP files in webdav directory
          <Directory /var/www/clients/client0/web32/webdav>
    	    <FilesMatch "\.ph(p3?|tml)$">
              SetHandler None
            </FilesMatch>
          </Directory>
          # DO NOT REMOVE THE COMMENTS!
          # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
          # WEBDAV BEGIN
          # WEBDAV END
        </IfModule>
    
    
    </VirtualHost>
    
    
    
    
     
  13. falko

    falko Super Moderator Howtoforge Staff

    Can you switch off suExec and try again?
     
  14. Tastiger

    Tastiger Member HowtoForge Supporter

    No such luck with turning off suExec. (+ I have a niggling feeling that Joomla needs suExec)

    This to me is starting to look similar to the issues with Squirrel Mail - it seems as though Mailman does not like the environment required by Joomla.

    However that being said I have tried different php settings to no avail - I have just tried setting up a list in a test environment that is not Joomla friendly but still getting a 404 error.

    This is becoming somewhat frustrating - I have attached screenshots of my ISP Config settings to see if they can shed some more light....
     

    Attached Files:

    Last edited: Nov 12, 2011
  15. falko

    falko Super Moderator Howtoforge Staff

    Mailman is no PHP application, so your PHP settings do not matter. Are there any errors in the website's error log or the overall Apache error log?
     
  16. Tastiger

    Tastiger Member HowtoForge Supporter

    Could find nothing in /var/log/apache2/error.log

    However in /var/log/ispconfig/httpd/polyfidelity.org.au/error.log

    and in /var/log/ispconfig/httpd/tastiger.dhs.org/error.log

    Update
    Just as a last ditch attempt I again switched off suExec and rebooted the server and I can now access the archives at:
    http://tastiger.dhs.org/pipermail/test/ and
    http://polyfidelity.org.au/pipermail/committee/
    any other links give me a 404 error....
     
    Last edited: Nov 13, 2011
  17. falko

    falko Super Moderator Howtoforge Staff

    I guess that the Mailman aliases are conflicting with
    Code:
    ScriptAlias  /cgi-bin/ /var/www/clients/client0/web32/cgi-bin/
    Does it work if you switch off CGI for the website?
     
  18. Tastiger

    Tastiger Member HowtoForge Supporter

    Yes it does - now to look through the forums and check about suExec as i still have a suspicion it needs to be activated to be Joomla compatible
     
  19. ghall

    ghall Member

    A Mailman Issue

    Hi everyone,
    I have Ispconfig 3 installed on Ubuntu 11.04 x64 (just upgraded to the new 3.0.4.4). Users want to use mailman so...

    found this forum post and I apt-get installed mailman and ran newlist mailman and received this error:

    root@mailer:/tmp/ispconfig3_install/install# newlist mailman
    Enter the email of the person running the list: [email protected]
    Initial mailman password:
    Traceback (most recent call last):
    File "/usr/sbin/newlist", line 266, in <module>
    main()
    File "/usr/sbin/newlist", line 208, in main
    emailhost=host_name, urlhost=urlhost)
    File "/var/lib/mailman/Mailman/MailList.py", line 504, in Create
    self.InitVars(name, admin, crypted_password, urlhost=urlhost)
    File "/var/lib/mailman/Mailman/MailList.py", line 408, in InitVars
    baseclass.InitVars(self)
    File "/var/lib/mailman/Mailman/Archiver/Archiver.py", line 124, in InitVars
    }, mlist=self))
    File "/var/lib/mailman/Mailman/Utils.py", line 580, in maketext
    return findtext(templatefile, dict, raw, lang, mlist)[0]
    File "/var/lib/mailman/Mailman/Utils.py", line 557, in findtext
    raise IOError(errno.ENOENT, 'No template file found', templatefile)
    IOError: [Errno 2] No template file found: 'emptyarchive.html'

    Tried to find if anyone else received this error and no luck. Any help would be appreciated into solving this issue.
     
  20. falko

    falko Super Moderator Howtoforge Staff

Share This Page