MailServer - scalix

From Q
Revision as of 23:41, 8 November 2007 by Zulasch (talk | contribs)
Jump to navigation Jump to search

Performance probs:

swa.platform.enabled=false

in /var/opt/scalix/??/webmail/swa.properties


INSTALL SKRIPT

  1. !/bin/bash
  1. (C) 2006-2007 Christoph Lukas <christoph.lukas@gmx.net>
  2. 05-23-2007 modified to setup the mobile client by Peter Ulrich
  3. 06-11-2007 adapted for 11.1.0 Till Wimmer <scalix@tonarchiv.ch>
  4. private message via scalix forums: http://www.scalix.com/forums/privmsg.php?mode=post&u=4501

echo -n "What should the name of your primary mailnode be? "; read mnode echo -n "Please enter the admin password for the Scalix admin user (sxadmin)? "; read admpwd echo -n "Please enter a password for the ldap query user? "; read ldappwd echo -n "Please enter a password for the db user? "; read dbpwd echo -n "Please enter the external ip address of your Scalix box? "; read ip

tomcatport=80 scalix11downloadurl="http://downloads.scalix.com/.community/11.1/scalix-11.1.0-GA-debian-intel.tgz" scalix11targz="scalix-11.1.0-GA-debian-intel.tgz" scalix11dir="scalix-debian-11.1.0-GA/software/scalix_server" ldomain=$(hostname -d) host=$(hostname) fqdn=$(hostname -f) short=${host:0:1}${host: -1:1}

  1. Update and install required packages

aptitude update aptitude upgrade aptitude install apache2 libapache2-mod-jk gawk krb5-config krb5-doc krb5-user libkadm55 libkrb53 \

      libglib2.0-0 libstdc++2.10-glibc2.2 libxml2 sgml-base xml-core postgresql libsasl2-modules \
      libsasl2-gssapi-mit sendmail elinks w3m sun-java5-jre libssl0.9.7 libstdc++5 wget
  1. Remove sendmail startup links
  2. This disables outgoing mail
  3. /etc/init.d/sendmail stop
  4. update-rc.d -f sendmail remove
  1. Download Scalix 11

cd /tmp/ wget -N $scalix11downloadurl

  1. Extract and install packages

tar xvfz $scalix11targz cd $scalix11dir dpkg -i ../../third_party/libical/i386/libical*.deb dpkg -i scalix-server_*.deb dpkg -i scalix-postgres_*.deb scalix-tomcat-connector_*.deb scalix-tomcat_*.deb \

       scalix-mobile_*.deb scalix-platform_*.deb scalix-res_*.deb scalix-sac_*.deb \
       scalix-sis_*.deb scalix-swa_*.deb

cd

  1. Setup mailnode

export PATH=/opt/scalix/bin:$PATH ommakeom sxconfig --set -t general.usrl_cn_rule='G S' sxconfig --set -t general.usrl_authid_rule='l@' sxconfig --set -t orniasys.name_part_1='"C" ' -t orniasys.domain_part_1="$ldomain" omaddmn -m $mnode omrc -n omadmidp -a -s 66000 -n 100 omaddu -n sxadmin/$mnode --class limited -c admin -p "$admpwd" sxadmin omconfenu -n "sxadmin/$mnode" omlimit -u "sxadmin/$mnode" -o -i 0 -m 0 omaddu -n sxqueryadmin/$mnode --class limited -c admin -p $ldappwd sxqueryadmin@$fqdn omaddpdl -l ScalixUserAdmins/$mnode omaddpdl -l ScalixUserAttributesAdmins/$mnode omaddpdl -l ScalixGroupAdmins/$mnode omaddpdl -l ScalixAdmins/$mnode omon -s all

  1. Setup DB

cd /opt/scalix-postgres/bin ./sxpsql-setpwd $dbpwd ./sxpsql-whitelist 127.0.0.1 $ip

  1. Configure Scalix

base=/var/opt/scalix/${short} files="$base/webmail/swa.properties \

      $base/caa/scalix.res/config/ubermanager.properties \
      $base/res/config/res.properties \
      $base/platform/platform.properties \
      $base/mobile/mobile.properties \
      $base/sis/sis.properties"

for file in $files; do sed -e "s;%LOCALDOMAIN%;$ldomain;g" \

   -e "s;%LOCALHOST%;$fqdn;g" \
   -e "s;%PLATFORMURL%;$fqdn;g" \
   -e "s;__SECURED_MODE__;false;g" \
   -e "s;ubermanager/__FQHN_HOST__@__KERBEROS_REALM__;;g" \
   -e "s;__KERBEROS_REALM__;;g" \
   -e "s;__FQHN_FOR_KDC_HOST__;;g" \
   -e "s;__FQHN_QUERY_SERVER_NAME__;$fqdn;g" \
   -e "s;__UBERMGR_USE_EXTERNAL_AUTH__;false;g" \
   -e "s;__UBERMGR_ALLOW_EXTERNAL_AUTH__;false;g" \
   -e "s;__UBERMGR_MAXLIST_SIZE__;100;g" \
   -e "s;__UBERMGR_MAIL_DOMAINS_LIST__;$ldomain;g" \
   -e "s;__UBERMGR_EXTERNAL_DOMAIN_AUTH_LIST__;;g" \
   -e "s;__CONFIGURED__;true;g" \
   -e "s;__FQHN_FOR_UBERMANAGER__;$fqdn;g" \
   -e "s;__TOMCAT_PORT__;$tomcatport;g" \
   -e "s;localhost;$fqdn;g" \
   -e "s;%SIS-LANGUAGE%;German;g" \
   -e "s;%INDEX-WHITELIST%;$fqdn;g" \
   -e "s;%SEARCH-WHITELIST%;$fqdn;g" \
   -e "s;%IMAPHOST%;$fqdn;g" \
   -e "s;%SMTPHOST%;$fqdn;g" \
   -e "s;%LDAPPORT%;389;g" \
   -e "s;%DBHOST%;$fqdn:5733;g" \
   -e "s;%DBPASSWD%;$dbpwd;g" \
   $file > $file.neu

mv $file.neu $file done

  1. Write Ldappassword to psdata

cd ${base}/caa/scalix.res/config echo "$ldappwd" > psdata chown root:root psdata chmod 400 psdata cd

  1. Write worker config:

cat << EOF > /etc/opt/scalix-tomcat/connector/jk/workers.conf JkWorkerProperty worker.list=$mnode JkWorkerProperty worker.$mnode.host=$ip JkWorkerProperty worker.$mnode.port=8009 EOF

  1. patch connector conf

patch -s /etc/apache2/conf.d/scalix-tomcat-connector.conf << EOF --- scalix-tomcat-connector.conf 2007-06-11 11:23:46.000000000 +0200 +++ /etc/apache2/conf.d/scalix-tomcat-connector.conf 2007-06-11 11:27:14.000000000 +0200 @@ -35,7 +35,8 @@

# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"

-Include /etc/opt/scalix-tomcat/connector/jk/instance-*.conf +#Include /etc/opt/scalix-tomcat/connector/jk/instance-*.conf +Include /etc/opt/scalix-tomcat/connector/jk/app-*.conf

Include /etc/opt/scalix-tomcat/connector/jk/workers.conf

</IfModule>

EOF

  1. Restart Tomcat

/etc/init.d/scalix-tomcat restart

  1. Setup Apache

ln -s /opt/scalix/global/httpd/scalix-web-client.conf /etc/apache2/conf.d cat << EOF > /etc/apache2/conf.d/scalix-access.conf <Location />

       Allow from all

</Location> EOF /etc/init.d/apache2 restart

cat << EOT

  1. You should now be able to access scalix at:
  2. http://$fqdn/sac
  3. http://$fqdn/webmail

EOT