Sympa Installation Howto Stefano Brivio [email protected]
Total Page:16
File Type:pdf, Size:1020Kb
Sympa installation howto Stefano Brivio [email protected] Riccardo Setti [email protected] Diario delle Revisioni Revisione 1.0.0 2005/08/14 1.0.0 Sympa integration with Kolab groupware HOWTO 1. Abstract In this how-to we will go through the steps needed to install and configure the Sympa mailing list in order to provide integration with the Kolab Groupware Project, using OpenLDAP for distribution lists and authentication, MySQL for storing Sympa accounts and Postfix as MTA. 2. Sympa installation This how-to refers to 5.1 version of Sympa which is downloadable from www.sympa.org. As an OpenPKG package is still unavailable you will need to install it from source. wget http://www.sympa.org/distribution/sympa-5.1.tar.gz With this command you download just the manager itself, without its dependencies (mostly Perl classes), listed here: 1 Sympa installation howto • DBI wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.48.tar.gz • DBD-mysql-3.0002 wget http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-3.0002.tar.gz • MHonArc-2.6.15 wget http://search.cpan.org/CPAN/authors/id/E/EH/EHOOD/MHonArc-2.6.15.tar.gz • libintl-perl-1.14 wget http://search.cpan.org/CPAN/authors/id/G/GU/GUIDO/libintl-perl-1.14.tar.gz • XML-LibXML-Common-0.13 wget http://search.cpan.org/CPAN/authors/id/P/PH/PHISH/XML-LibXML-Common-0.13.tar.gz • XML-LibXML-1.58 wget http://search.cpan.org/CPAN/authors/id/P/PH/PHISH/XML-LibXML-1.58.tar.gz • perl-ldap-0.3202 wget http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/perl-ldap-0.33.tar.gz • Template-Toolkit-2.14 wget http://www.cpan.org/modules/by-module/Template/Template-Toolkit-2.14.tar.gz • CGI::FAST class wget http://search.cpan.org/CPAN/authors/id/L/LD/LDS/CGI.pm-3.11.tar.gz To download the classes needed by Sympa you can proceed in two ways: by downloading them manually from CPAN or through the CPAN shell. 2 Sympa installation howto Let’s now decompress the Perl classes. In every directory you have to issue these commands: eval ‘/kolab/bin/openpkg rc --eval all env‘ to set the environment variables according to OpenPKG system; wget ftp://ftp.openpkg.org/release/2.4/SRC/mysql-4.1.12-2.4.0.src.rpm /kolab/bin/openpkg rpm --rebuild mysql-4.1.12-2.4.0.src.rpm /kolab/bin/openpkg rpm -Uvh /kolab/RPM/PKG/mysql-4.1.12-2.4.0.ix86-debian3.1-kolab.rpm /kolab/etc/rc mysql start /kolab/bin/mysqladmin -u root password ’what_you_want’ tar xzf DBI-1.48.tar.gz cd DBI-1.48 perl Makefile.pm make make install tar xzf DBD-mysql-3.0002.tar.gz cd DBD-mysql-3.0002 perl Makefile.pm make make install tar xzf MHonArc-2.6.15.tar.gz cd MHonArc-2.6.15 perl Makefile.PL make make install tar xzf libintl-perl-1.14.tar.gz cd libintl-perl-1.14 perl Makefile.PL make make install tar xzf perl-ldap-0.33.tar.gz perl Makefile.PL make make install tar xzf Template-Toolkit-2.14.tar.gz cd Template-Toolkit-2.14 perl Makefile.PL (answer yes by all questions it should go) make make install tar xzf XML-LibXML-Common-0.13.tar.gz cd XML-LibXML-Common-0.13 perl Makefile.PL make make install tar xvf XML-LibXML-1.58.tar.gz cd XML-LibXML-1.58 3 Sympa installation howto perl Makefile.PL make make install tar xzf CGI.pm-3.11.tar.gz cd CGI.pm-3.11 perl Makefile.PL make make install finally: wget http://www.sympa.org/distribution/sympa-5.1.tar.gz Let’s now decompress the Sympa distribution archive this way: tar xzf sympa-5.1.tar.gz Now cd into ‘sympa’ and copy inside it the configure-sympa.opts file that we provide in < Appendix A You are now ready to properly configure and install Sympa: touch /kolab/etc/postfix/aliases ./configure-sympa.opts make make install configure-sympa.opts file provides the switches needed to configure Sympa with the correct paths according to OpenPKG default locations. 3. Sympa general configuration Once you are done with Sympa installation, you can set the general options for Sympa (/kolab/etc/sympa/sympa.conf). The variables that need to be changed to obtain a working environment are (a sample configuration file can be found in Appendix B): vim /kolab/etc/sympa/sympa.conf • line 45: domain kolab-ei.khamsa.c • line 48: listmaster [user@domain] • line 106: sendmail /kolab/sbin/sendmail • line 149: db_type mysql • line 152: db_name sympa • line 155: db_host localhost • line 158: db_user sympa • line 162: db_passwd [password] • line 192: css_url http://[URL]/sympa/css/ css_url isn’t present by default and must be set to the URL of CSS files. For more detailed information about graphical customization, see Appendix G. The remaining options are commented in sympa.conf. See Appendix J for notes about multi-domain configuration. 4 Sympa installation howto 4. MySQL setup Listed below there are the commands to be issued in order to set up the database needed by Sympa: mysqladmin -uroot -p create sympa mysql -uroot -p mysql> grant all on sympa.* to sympa@localhost identified by ’[password]; mysql> flush privileges; mysql> quit 5. Apache CGI setup Create a new file in /kolab/etc/apache called apache.sympa: (provided in Appendix C ) vim /kolab/etc/apache/apache.sympa Alias /wwsicons /kolab/share/sympa/icons ScriptAlias /wws /kolab/var/kolab/www/cgi-bin/wwsympa.fcgi AddHandler cgi-script .fcgi You must include this file in /kolab/etc/apache/apache.conf, inserting a line like this at the end: (this file is regenerated every time OpenPKG system gets restarted! You’d better be using a modified template as provided in Appendix I) vim /kolab/etc/kolab/templates/httpd.conf Include /kolab/etc/apache/apache.sympa at the end of the file. Then: kolabconf 6. Postfix Configuration To get Sympa working with postfix the following files need to be changed (template files are provided in Appendix D): • master.cf • main.cf • virtual_regexp • transport_regexp virtual_regexp and transport_regexp need to be created if they don’t exist. The two files are used by Postfix to parse the addresses and thus create the transport tables. transport_regexp includes the regexps 5 Sympa installation howto to tell if the mail is addressed to the list owner or to the list itself and to choose the right rule in master.cf . For every list, transport rules need to be created. The rules should look like t hese (change according to your hostname): 6.1. transport_regexp vim /kolab/etc/postfix/transport_regexp /^.*+owner\@YOUR\.DOMAIN\.TLD$/ sympabounce: /^.*\@YOUR\.DOMAIN\.TLD$/ sympa: 6.1.1. virtual_regexp Then you need to add a line to virtual_regexp for every list. This line is needed to find the owner’s name and to create the virtual address (again, you need to change it according to the hostname): vim /kolab/etc/postfix/virtual_regepx /^(.*)-owner\@YOUR\.DOMAIN\.TLD$/ [email protected]. 6.1.1.1. main.cf master.cf Then you have to change some lines in main.cf. Use the lines in main.cf.template to change the lines in main.cf with the same line numbers in /kolab/etc/kolab/templates. Then just restart Postfix. vim /kolab/etc/kolab/templates/main.cf 58 transport_maps = hash:/kolab/etc/postfix/transport, ldap:/kolab/etc/postfix/ldaptransport.cf, regexp:/kolab/etc/postfix/transport_regex 62 virtual_alias_maps= regexp:/kolab/etc/postfix/virtual_regexp 63 local_recipient_maps = $alias_maps 64 sympa_destination_recipient_limit = 1 65 sympabounce_destination_recipient_limit = 1 vim /kolab/etc/kolab/templates/master.cf add the following lines at the end of the file. master.cf.template: 112 sympa unix - n n - - pipe flags=R user=kolab-n argv=/kolab/lib/sympa queue ${recipient} sympabounce unix - n n - - pipe flags=R user=kolab-n argv=/kolab/lib/sympa bouncequeue ${user} 6 Sympa installation howto After that you must re-run kolabconf YOU NEED TO ACCEPT SMTP EXETERN CONNECTION --> YOU MUST CONFIGURE KOLAB FOR DO THIS FROM THE MANAGER WEB INTERFACE 7. Sympa authentication by means of LDAP Sympa authentication options are stored in auth.conf (see Appendix E), which can be found, according to Kolab path conventions, in /kolab/etc/sympa/ directory. The paragraphs needed will look like these ones: vim /kolab/etc/sympa/auth.conf ldap regexp .* host localhost:389 timeout 30 suffix dc=[@your@],dc=[@your@],dc=[@your@] get_dn_by_uid_filter (uid=[sender]) get_dn_by_email_filter (mail=[sender]) email_attribute mail scope sub user_table regexp .* information between @@ are varibles you need to change it with your hostname The ldap paragraph contains information related to LDAP access, while the user_table paragraph is needed for internal Sympa authentication. These lines provides a working configuration for Kolab Groupware. A fully commented auth.conf file is provided in Appendix E. More detailed information can be found at http://www.sympa.org/distribution/sympa-5.0.1/doc/html/node12.html#auth-conf (http://www.sympa.org/distribution/sympa-5.0.1/doc/html/node12.html#auth-conf). 8. Sympa mailing lists synchronization with LDAP distribution lists Let’s now log on the administration interface at http://[hostname]/wws/. Create and configure a the mailing lists: Sympa provides differents templates for speeding up this process. Then, edit /kolab/lib/sympa/expl/[listname]/config, adding these lines (NOTE: line spacing must remain the same!) at beginning of file: (an commented example is provided in Appendix F) vim /kolab/lib/sympa/expl/[listname]/config 7 Sympa installation howto ttl 240 user_data_source include2 include_ldap_2level_query host localhost:389 suffix1 cn=dl_name,dc=[your],dc=[your],dc=[your] timeout1 30 filter1 (objectClass=kolabGroupOfNames) attrs1 member select1 all scope1 sub suffix2 [attrs1] timeout2 30 filter2 (objectClass=kolabInetOrgPerson) attrs2 mail scope2 sub select2 all These parameters provide a working environment for LDAP synchronization, defining a two-level query.