Announcement

Collapse
No announcement yet.

Problem after installing OX6

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem after installing OX6

    Hi,
    maybe I am absolutly studit, but I have followed Open-Xchange Server 6 on Ubuntu 8.04 guide and OXHE-Installation-and-Administration-v1.2.5 and whole installation process was without any problem.
    But when I log in as testuser, I got:
    09-17-2008 01:37 PM-->Error code: Invalid sieve credentials (MAIL_FILTER-0002,-1032224135-158)
    and
    09-17-2008 01:39 PM-->Error code: Missing parameter folder (MSG-0001,-1032224135-162)

    How can I create/configure sieve credentials and mail store?

    Thank you very much for any help and sorry for my bad english.

  • #2
    Which kind of IMAP server do you use?

    Daniel

    Comment


    • #3
      Cyrus 2.2
      I have migrated from 6.4.2 a initialize db...
      Thx

      Originally posted by Daniel Halbe View Post
      Which kind of IMAP server do you use?

      Daniel

      Comment


      • #4
        Hi,

        I have the same problem while trying to install openxchange deb from ubuntu following howto "Ubuntu Hardy quick guide" and code from the community Hardy installer for the postfix -cyrus mail server.

        More precisely when I try to send email, the error message is "wrong or missing data to access the server 127.0.0.1"

        Thanks for any help,


        Regards,
        Oliv

        In fact I will share the code I am using (extract from a module of my project http://cooperation-iws.gensys-net.eu)

        Code:
        /etc/init.d/cyrus2.2 stop
        /etc/init.d/saslauthd stop
        /etc/init.d/postfix stop
        /etc/init.d/munin-node stop
        
        
        
        apt-get autoremove --assume-yes --force-yes java-gcj-compat
        apt-get autoremove --assume-yes --force-yes gcj
        
        ln -s / /cow
        
        echo "
        deb [url]http://download.opensuse.org/repositories/server:/OX:/ox6-sp4-beta/xUbuntu_8.04/[/url] /
        " >> /etc/apt/sources.list
        aptitude update
        
        aptitude install -y mysql-server  open-xchange-admin-client \
        open-xchange-admin-doc open-xchange-admin-plugin-hosting-doc \
        open-xchange-admin-plugin-hosting open-xchange-admin-soap open-xchange-admin \
        open-xchange-authentication-database open-xchange-axis2 open-xchange-cache \
        open-xchange-charset open-xchange-common open-xchange-configjump-generic \
        open-xchange-configread open-xchange-control open-xchange-data-conversion-ical4j \
        open-xchange-global open-xchange-group-managerequest open-xchange-gui \
        open-xchange-i18n open-xchange-imap open-xchange-jcharset open-xchange-mailfilter \
        open-xchange-management open-xchange-monitoring \
        open-xchange-passwordchange-database open-xchange-passwordchange-servlet \
        open-xchange-push-udp open-xchange-resource-managerequest open-xchange-server \
        open-xchange-sessiond open-xchange-settings-extensions open-xchange-smtp \
        open-xchange-spamhandler-default open-xchange
        
        apt-get install --assume-yes --force-yes cvs sun-java5-jdk sun-java5-bin apache2 mysql-server mysql-client cyrus-imapd-2.2 cyrus-pop3d-2.2 gettext libapache2-mod-jk sasl2-bin libpam-mysql libnss-mysql-bg postfix-mysql ant ant-optional cyrus-admin-2.2 libgnujaf-java libcommons-cli-java libcommons-codec-java libcommons-httpclient-java libcommons-logging-java libslide-webdavclient-java libjdom1-java junit libmysql-java libservlet2.4-java mailutils libsasl2-modules munin munin-node
        
        mkdir -p /var/cache/munin/localdomain
        chown -R munin:munin /var/cache/munin
        
        
        cd $DL_DIR
        wget $URL_FREE/hyperion_config.tar.gz
        mkdir hyperion-install/
        tar -xzf hyperion_config.tar.gz -C $DL_DIR/hyperion-install/
        
        
        cp /etc/cyrus.conf /etc/cyrus.conf.old 2>/dev/null
        cp /etc/imapd.conf /etc/imapd.conf.old 2>/dev/null
        cp /etc/postfix/main.cf /etc/postfix/main.cf.old 2>/dev/null
        cp /etc/postfix/master.cf /etc/postfix/master.cf.old 2>/dev/null
        cp /etc/pam.d/imap /etc/pam.d/imap.old 2>/dev/null
        cp /etc/pam.d/pop /etc/pam.d/pop.old 2>/dev/null
        cp /etc/pam.d/sieve /etc/pam.d/sieve.old 2>/dev/null
        cp /etc/libnss-mysql.cfg /etc/libnss-mysql.cfg.old 2>/dev/null
        cp /etc/libnss-mysql-root.cfg /etc/libnss-mysql-root.cfg.old 2>/dev/null
        cp /etc/default/saslauthd /etc/default/saslauthd.old 2>/dev/null
        cp /etc/munin/munin.conf /etc/munin/munin.conf.old 2>/dev/null
        ln -s /etc/apache2/mods-available/expires.load /etc/apache2/mods-enabled/expires.load 2>/dev/null
        ln -s /etc/apache2/mods-available/deflate.load /etc/apache2/mods-enabled/deflate.load 2>/dev/null
        #cp $DL_DIR/hyperion-install/config/apache/default /etc/apache2/sites-available/default
        #cp $DL_DIR/hyperion-install/config/apache/ox.conf /etc/apache2/conf.d/ox.conf
        #cp $DL_DIR/hyperion-install/config/apache/workers.properties /etc/libapache2-mod-jk/workers.properties
        cp $DL_DIR/hyperion-install/config/cyrus/imapd.conf /etc/imapd.conf
        cp $DL_DIR/hyperion-install/config/cyrus/imap /etc/pam.d/imap
        cp $DL_DIR/hyperion-install/config/cyrus/imap /etc/pam.d/pop
        cp $DL_DIR/hyperion-install/config/cyrus/imap /etc/pam.d/sieve
        cp $DL_DIR/hyperion-install/config/mysql/libnss-mysql.cfg /etc/libnss-mysql.cfg
        cp $DL_DIR/hyperion-install/config/mysql/libnss-mysql-root.cfg /etc/libnss-mysql-root.cfg
        cp $DL_DIR/hyperion-install/config/postfix/*.cf /etc/postfix/
        awk '{gsub("hyperion.example.com", "'"$DOMAIN"'", $0); print > FILENAME}' /etc/apache2/sites-available/default
        awk '{gsub("oxadmin@example.com", "oxadmin@" "'"$DOMAIN"'", $0); print > FILENAME}' /etc/apache2/sites-available/default
        awk '{gsub("example.com",  "'"$DOMAIN"'", $0); print > FILENAME}' /etc/imapd.conf
        awk '{gsub("example.com", '$DOMAIN', $0); print > FILENAME}' /etc/postfix/main.cf
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_aliases.cf
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_resource_aliases.cf
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_user_aliases.cf
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_domains.cf
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_externaldomaincheck.cf
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_group_aliases.cf
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_senderrestrictions.cf
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/pam.d/imap
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/pam.d/pop
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/pam.d/sieve
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/libnss-mysql-root.cfg
        awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/libnss-mysql.cfg
        awk '{gsub("www", "cache", $0); print > FILENAME}' /etc/munin/munin.conf
        awk '{gsub("START=no", "START=yes", $0); print > FILENAME}' /etc/default/saslauthd 
        usermod -G mail postfix
        newaliases
        
        # Enabling IMAPS
        awk '{gsub("#imaps\t\tcmd=\"imapd", "imaps\t\tcmd=\"imapd", $0); print > FILENAME}' /etc/cyrus.conf
        
        # Enabling SIEVE
        awk '{gsub("\"timsieved\"", "\"/usr/lib/cyrus/bin/timsieved\"", $0); print > FILENAME}' /etc/cyrus.conf
        
        # Fixing Ubuntu 8.04 permissions on cyrus
        chown cyrus:mail /var/lib/cyrus/proc
        chown cyrus:mail /var/lib/cyrus/socket
        chown cyrus:mail /var/lib/cyrus/db
        chown -R cyrus:mail /var/spool/cyrus/
        chown -R cyrus:mail /var/spool/sieve/
        chown -R cyrus:mail /var/lib/cyrus/
        
        
        
        
        echo "Restarting services..."
        /etc/init.d/mysql restart
        /etc/init.d/cyrus2.2 restart
        /etc/init.d/saslauthd restart
        /etc/init.d/postfix restart
        /etc/init.d/munin-node restart
        apache2ctl restart
        
        
        echo "GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'localhost' IDENTIFIED BY '$OPENXCHANGE_MYSQL_PWD';" > /tmp/openXchange_pri.sql
        $BIN_MYSQL -u root < /tmp/openXchange_pri.sql mysql
        
        /opt/open-xchange/sbin/initconfigdb --configdb-pass=$OPENXCHANGE_MYSQL_PWD
        
        
        
        
        
        /opt/open-xchange/sbin/oxinstaller --servername=oxserver --configdb-pass=$OPENXCHANGE_MYSQL_PWD --master-pass=admin_master_password 
        
        /etc/init.d/open-xchange-groupware restart
        /etc/init.d/open-xchange-admin start
        
        
        a2enmod proxy
        a2enmod proxy_ajp
        a2enmod expires
        a2enmod deflate
        a2enmod headers
        
        echo "
        <Proxy *>
        Order deny,allow
        allow from all
        </Proxy>
        
        ProxyPass /axis2 ajp://127.0.0.1:8009/axis2 smax=0 ttl=60 retry=5
        ProxyPass /ajax ajp://127.0.0.1:8009/ajax smax=0 ttl=60 retry=5
        ProxyPass /servlet ajp://127.0.0.1:8009/servlet smax=0 ttl=60 retry=5
        ProxyPass /infostore ajp://127.0.0.1:8009/infostore smax=0 ttl=60 retry=5
        " > /etc/apache2/conf.d/proxy_ajp.conf
        
        sed -i "14G" /etc/apache2/sites-available/default
        sed -i "14G" /etc/apache2/sites-available/default
        #sed -i "15s/^/RedirectMatch \^\/\$ \/ox6/" /etc/apache2/sites-available/default
        sed -i "s/<\/VirtualHost>//" /etc/apache2/sites-available/default
        
        echo '
        ExpiresActive On
        	ExpiresByType image/gif "access plus 23 hours"
        	ExpiresByType image/png "access plus 23 hours"
        	ExpiresByType image/jpg "access plus 23 hours"
        	ExpiresByType image/jpeg "access plus 23 hours"
        	ExpiresByType text/javascript "access plus 23 hours"
        	ExpiresByType text/css "access plus 23 hours"
        	ExpiresByType text/html "access plus 23 hours"
        	ExpiresByType application/x-javascript "access plus 23 hours"
        	<Files ~ "\.(js|css|gif|jpe?g|png)$">
        		Header append Cache-Control "public"
        	</Files>
        
         	DeflateFilterNote ratio
        	AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
        	BrowserMatch ^Mozilla/4 gzip-only-text/html
        	BrowserMatch ^Mozilla/4\.0[678] no-gzip
        	BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
        	Header append Vary User-Agent env=!dont-vary
        </VirtualHost>
        ' >> /etc/apache2/sites-available/default
        
        /etc/init.d/apache2 restart
        /etc/init.d/postfix restart
        /etc/init.d/saslauthd start
        /etc/init.d/open-xchange-groupware restart
        
        /opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P admin_master_password
        
        mkdir /var/opt/filestore
        chown open-xchange:open-xchange /var/opt/filestore
        
        /opt/open-xchange/sbin/registerfilestore -A oxadminmaster -P admin_master_password \
        -t file:///var/opt/filestore
        
        /opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P admin_master_password \
        -n oxdatabase -p $OPENXCHANGE_MYSQL_PWD -m true
        
        
        
        /opt/open-xchange/sbin/createcontext -A oxadminmaster -P admin_master_password -c 1 \
        -u oxadmin -d "Context Admin" -g Admin -s User -p admin_password -L defaultcontext \
        -e oxadmin@$DOMAIN -q 1024 --access-combination-name=all 
        
        /opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P admin_password -u testuser \
        -d "Test User" -g Test -s User -p secret -e testuser@$DOMAIN --imaplogin testuser --imapserver 127.0.0.1 --smtpserver 127.0.0.1
        
        /etc/init.d/open-xchange-admin restart
        /etc/init.d/open-xchange-groupware restart
        where $url_free point to http://cooperation.gensys.free.fr/mi..._config.tar.gz
        Last edited by Guest; 09-20-2008, 02:28 PM. Reason: adding complement of information

        Comment


        • #5
          This is not a installation issue but related to the mailserver configuration.

          Error message 1 says: "I cannot find a SIEVE server"
          Error message 2 says: "I cannot find a IMAP server".

          Please make sure you've configured the IMAP account for that user correctly when creating the user.

          Greetings

          Comment


          • #6
            Hi,

            Thanks for the answer, it is indeed an authentication problem.

            I am posting further questions, thinking that this is not an openxchange problems (rather a mail server problems), so you could redirect me to mail servers topics on the web.
            But as I based my install on the deprecated community installer with the new deb packages, this might be a piece of interests.


            I investigate a bit following this direction and I am wondering if the crypt=1 is well appropriate in the /etc/pam.d/imap sql query. In fact when I look in the openxchange database the password field is encrypted but the passwordMech is filled with {SHA} value.

            Moreover when I tried to login to cyrus with:
            Code:
            cyradm -u oxadmin localhost
            I have an authentication error message.

            Well that's it for the moment. I am rather new in the world of mail servers so do not hesitate to tell me to look better on the web if my questions seem obvious .

            Thanks,

            Regards,
            Oliv

            Comment


            • #7
              Hi Oliv,

              the installer used CRYPT mechanism for password management, the .deb files assume SHA to be the default because it is far more secure. As the installer provides OX 6.4, the packages provide OX 6.6 so those two installation methods may not fit together. The cause why the installer uses CRYPT is, that some E-Mail subsystems do not work well with SHA so making the E-Mail
              authentication working against the database we had to use CRYPT.

              To work around this issue you could do the following:
              a) Use SHA everywhere - if your subsystems support it
              b) Use CRYPT and set this mech as default when creating the database (look at the manual at http://software.open-xchange.com/ox6docs/ or the command line tool --help)

              Greetings
              Last edited by Martin Heiland; 09-21-2008, 03:39 PM.

              Comment


              • #8
                Hi,

                Well, I find solution for CRYPT / SHA by modifying User.properties but I am still stuck with sieve credentials and a new error message telling me no server found when I tried to send an email.

                I gave up to play with new version and came back to installer which succeed in build all the applications (First time I use I had error with mysql database).

                But when loggued as testuser I receive no email. In fact I am trying to configure open-xchange with generic domain name localdomain, as I do not want to have a fixed IP address. I want to use openxchange with purely local servers (127.0.0.1) as I am trying to make a nomad intranet server.
                So I have no errors message but I receive no mail (even when I am autosending me email).

                Finally I also gave up to play with installer and tried to build livecd from the chrooted environment where is installed OX.

                I tried to build live CD from both deb package or installer install and I have same error : the login hangs at 10%.

                Anyway, I am not requesting answer to all my questions now, I let message just for testimonial.

                Regards,
                Oliv

                Comment


                • #9
                  manual

                  Is there any manual for configuration OX and cyrus IMAP server correctly?
                  Thanks a lot

                  Comment


                  • #10


                    9.1.22. mailfilter.properties
                    This file contains the configuration for the mailfilter plugin.
                    Variable Value
                    SIEVE_LOGIN_TYPE Specify which sieve server should be used. Two options are al-
                    lowed here:
                    user : use the setting stored for the user in the database
                    global : use the sieve server given in this config file for all users
                    SIEVE_CREDSRC Specify which sieve credentials should be use. Two options are
                    allowed here:
                    "session" : login name and password are used from the current
                    session
                    "imapLogin" : the login name is taken from the database
                    (imapLogin) of
                    user, the password is taken from the current session
                    SIEVE_SERVER Sieve server
                    SIEVE_PORT Sieve port
                    SCRIPT_NAME If you want the script to be generated with another script name
                    change it here. Note that the mail filter bundle will then leave
                    the old script with the old script name behind, and doesn't delete
                    it.

                    Comment


                    • #11
                      I also used the Hardy Heron quick install guide to get the Open Xchange 6.6 software installed. As we all have realized, this does NOT result in a fully working groupware server (as opposed to the community installation instructions or the corresponding installer script for 6.4).

                      Instead, we are required to install IMAP/SMTP/Sieve etc on our own, without other documentation that how it was done with 6.4, and without an admin gui...

                      Originally posted by oliv76 View Post
                      In fact I will share the code I am using (extract from a module of my project http://cooperation-iws.gensys-net.eu)

                      where $url_free point to http://cooperation.gensys.free.fr/mi..._config.tar.gz
                      So you have altered the 6.4 configuration files and instructions to 6.6? That is awesome and very much needed! When we got the different issues ironed out, hopefully this will end up in a installation script for the 6.6 series...

                      Originally posted by Martin Braun View Post
                      This is not a installation issue but related to the mailserver configuration.

                      Error message 1 says: "I cannot find a SIEVE server"
                      Error message 2 says: "I cannot find a IMAP server".
                      Actually, error message 2 says: "Even though I can login on the IMAP server with my user credentials, I cannot find a correctly configured mailbox". At least that's what I reckon since the IMAP server is available and the user logs in...

                      Originally posted by Martin Braun View Post
                      Please make sure you've configured the IMAP account for that user correctly when creating the user.
                      Are you suggesting any of the following?
                      A. We need to configure mail accounts manually before creating the OX user? (How is this done in that case?)
                      B. That the OX create_user method silently fails in configuring the IMAP mailbox? (Why are there no error messages or where are they?)

                      Originally posted by oliv76 View Post
                      Well, I find solution for CRYPT / SHA by modifying User.properties
                      Big thanks! After thorough investigation, I too realized that the different authentication methods expected different hash algoritms for the password authentication. Your comment led to the solution:

                      /opt/open-xchange/etc/admindaemon/User.properties :
                      Code:
                      # specify the default password mechanism to use
                      # possible values: CRYPT / SHA
                      DEFAULT_PASSWORD_MECHANISM=SHA
                      Changing this to CRYPT makes Cyrus authentication work with the 6.4-based Cyrus installation instructions. It may be possble to also change the crypt=1-setting of the pam conf files, but I chose the above route.

                      Originally posted by oliv76 View Post
                      ...when logged in as testuser I receive no email. In fact I am trying to configure open-xchange with generic domain name localdomain, as I do not want to have a fixed IP address. I want to use openxchange with purely local servers (127.0.0.1) as I am trying to make a nomad intranet server.
                      So I have no errors message but I receive no mail (even when I am autosending me email).
                      I see you don't even have "Error code: Missing parameter folder" ? As soon as I get past this message, I'll hopefully be able to help, since we are trying to accomplish the same thing...

                      Originally posted by quentin View Post
                      Is there any manual for configuration OX and cyrus IMAP server correctly?
                      Thanks a lot
                      The best one I have found is oliv76's contributed installation code above! Trying it out right now on a fresh install... Otherwise there seem to be no installation instructions for IMAP/SMTP etc for the 6.6 series in the Wiki.

                      EDIT: I just realized that we seem to be at least around 3-4 persons trying to install an OX 6.6 based groupware server at the same time, and going through the same struggles. If you are available through IM, feel welcome to PM me your IM details, and we can more quickly get this up and running... Looking forward to hear from you!
                      Last edited by Guest; 09-25-2008, 11:51 AM.

                      Comment


                      • #12
                        Originally posted by motin View Post
                        So you have altered the 6.4 configuration files and instructions to 6.6? That is awesome and very much needed! When we got the different issues ironed out, hopefully this will end up in a installation script for the 6.6 series...
                        With your permission, I will publish your script - along with any enhancements that we make - on the Wiki:


                        Are you Ok with this? If not I will of course remove it asap.

                        Best regards,
                        Fredrik

                        Comment


                        • #13
                          Hi,

                          if you plan to publish something, please start a new page at the wiki, we're trying to keep the installation guides as "clean" as possible to avoid distraction. It's fine to put a link to this guide at the installation manuals.

                          Greetings

                          Comment


                          • #14
                            Originally posted by Martin Braun View Post
                            Hi,

                            if you plan to publish something, please start a new page at the wiki, we're trying to keep the installation guides as "clean" as possible to avoid distraction. It's fine to put a link to this guide at the installation manuals.

                            Greetings
                            Yes, I just created the page above on the Wiki, in order to keep the installation guides as clean as possible. Was planning to link to the guide from the installation manuals though

                            Comment


                            • #15
                              I have now finished the script as to how far we have come in this matter and have installed an 8.04 Groupware server from scratch exactly following the current version of the script at http://www.open-xchange.com/wiki/ind....04#The_Script

                              After logging in as a test user, the following error messages are reported:

                              1. Before clicking anywhere: Invalid sieve credentials (MAIL_FILTER-0002,-669174025-50)
                              2. After clicking on the mail icon: Missing parameter folder (MSG-0001,-669174025-51)
                              3. After clicking back to the dashboard, then the mail icon again: No connection available to access mailbox (IMAP-2001,-669174025-57)

                              How do we fix these issues? Any ideas?

                              @oliv76: I found and fixed some bugs in your original script, and one was related to the awk command modifying the postfix configuration file - maybe this is why you cannot send mail?

                              If someone has a clean machine and can try the script at this point and confirm these problems it would be very helpful!

                              Here is a copy of the script at this time for reference:
                              Code:
                              # Change these variables to match your preferred setup, then run the rest of the commands (preferable one at a time...) as root (run "sudo -s" beforehand to enter a root terminal)
                              
                              export URL_FREE="http://cooperation.gensys.free.fr/mirroir/v0.5"
                              export DL_DIR=~/oxdl
                              export DOMAIN=changeme.com
                              export OPENXCHANGE_MYSQL_PWD=changeme
                              export OX_ADMIN_MASTER_PASSWORD=changeme
                              export OX_ADMIN_PASSWORD=changeme
                              
                              mkdir -p $DL_DIR
                              
                              # Basics
                              apt-get install --assume-yes --force-yes nano ssh wget
                              
                              # Java 1.5 - You will have to agree to the licensing terms to continue
                              apt-get install --assume-yes --force-yes sun-java5-bin sun-java5-jdk
                              
                              # Cyrus IMAP server
                              apt-get install --assume-yes --force-yes cyrus-imapd-2.2 cyrus-admin-2.2 sasl2-bin libsasl2-modules libpam-mysql libnss-mysql-bg
                              #apt-get install --assume-yes --force-yes cyrus-pop3d-2.2 
                              
                              # Postfix SMTP server: Answer "Internet Site", then your mail domain
                              apt-get install --assume-yes --force-yes postfix postfix-mysql 
                              
                              # IMAP test client imtest
                              apt-get install --assume-yes --force-yes cyrus-clients-2.2
                              
                              # Compilation, Java and Misc tools
                              #apt-get install --assume-yes --force-yes cvs gettext ant ant-optional 
                              #apt-get install --assume-yes --force-yes libgnujaf-java libcommons-cli-java #libcommons-codec-java libcommons-httpclient-java libcommons-logging-java #libslide-webdavclient-java libjdom1-java junit libmysql-java #libservlet2.4-java 
                              #apt-get install --assume-yes --force-yes mailutils
                              
                              # MySQL server and client - Choose a root password and remember it
                              apt-get install --assume-yes --force-yes mysql-server mysql-client 
                              
                              # Munin (optional)
                              # apt-get install --assume-yes --force-yes munin munin-node
                              
                              #mkdir -p /var/cache/munin/localdomain
                              #chown -R munin:munin /var/cache/munin
                              
                              /etc/init.d/cyrus2.2 stop
                              /etc/init.d/saslauthd stop
                              /etc/init.d/postfix stop
                              #/etc/init.d/munin-node stop
                              
                              # Should not be needed for clean install
                              #apt-get autoremove --assume-yes --force-yes java-gcj-compat
                              #apt-get autoremove --assume-yes --force-yes gcj
                              
                              echo "
                              deb http://download.opensuse.org/repositories/server:/OX:/ox6-sp4-beta/xUbuntu_8.04/ /
                              " > /etc/apt/sources.list.d/ox6_ubuntu8.04.list
                              apt-get update
                              
                              apt-get install --assume-yes --force-yes mysql-server  open-xchange-admin-client \
                              open-xchange-admin-doc open-xchange-admin-plugin-hosting-doc \
                              open-xchange-admin-plugin-hosting open-xchange-admin-soap open-xchange-admin \
                              open-xchange-authentication-database open-xchange-axis2 open-xchange-cache \
                              open-xchange-charset open-xchange-common open-xchange-configjump-generic \
                              open-xchange-configread open-xchange-control open-xchange-data-conversion-ical4j \
                              open-xchange-global open-xchange-group-managerequest open-xchange-gui \
                              open-xchange-i18n open-xchange-imap open-xchange-jcharset open-xchange-mailfilter \
                              open-xchange-management open-xchange-monitoring \
                              open-xchange-passwordchange-database open-xchange-passwordchange-servlet \
                              open-xchange-push-udp open-xchange-resource-managerequest open-xchange-server \
                              open-xchange-sessiond open-xchange-settings-extensions open-xchange-smtp \
                              open-xchange-spamhandler-default open-xchange
                              
                              # Apache mod-jk # Not sure if this is needed
                              # apt-get install --assume-yes --force-yes libapache2-mod-jk
                              # a2enmod jk
                              
                              cd $DL_DIR
                              wget $URL_FREE/hyperion_config.tar.gz
                              mkdir hyperion-install/
                              tar -xzf hyperion_config.tar.gz -C $DL_DIR/hyperion-install/
                              
                              # Backup configuration files
                              cp /etc/cyrus.conf /etc/cyrus.conf.old 2>/dev/null
                              cp /etc/imapd.conf /etc/imapd.conf.old 2>/dev/null
                              cp /etc/postfix/main.cf /etc/postfix/main.cf.old 2>/dev/null
                              cp /etc/postfix/master.cf /etc/postfix/master.cf.old 2>/dev/null
                              cp /etc/pam.d/imap /etc/pam.d/imap.old 2>/dev/null
                              cp /etc/pam.d/pop /etc/pam.d/pop.old 2>/dev/null
                              cp /etc/pam.d/sieve /etc/pam.d/sieve.old 2>/dev/null
                              cp /etc/libnss-mysql.cfg /etc/libnss-mysql.cfg.old 2>/dev/null
                              cp /etc/libnss-mysql-root.cfg /etc/libnss-mysql-root.cfg.old 2>/dev/null
                              cp /etc/default/saslauthd /etc/default/saslauthd.old 2>/dev/null
                              cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.old 2>/dev/null
                              cp /opt/open-xchange/etc/admindaemon/User.properties /opt/open-xchange/etc/admindaemon/User.properties.old 2>/dev/null
                              #cp /etc/munin/munin.conf /etc/munin/munin.conf.old 2>/dev/null
                              #cp $DL_DIR/hyperion-install/config/apache/default /etc/apache2/sites-available/default
                              #cp $DL_DIR/hyperion-install/config/apache/ox.conf /etc/apache2/conf.d/ox.conf
                              #cp $DL_DIR/hyperion-install/config/apache/workers.properties /etc/libapache2-mod-jk/workers.properties
                              
                              # Copy configuration templates in place
                              cp $DL_DIR/hyperion-install/config/cyrus/imapd.conf /etc/imapd.conf
                              cp $DL_DIR/hyperion-install/config/cyrus/imap /etc/pam.d/imap
                              cp $DL_DIR/hyperion-install/config/cyrus/imap /etc/pam.d/pop
                              cp $DL_DIR/hyperion-install/config/cyrus/imap /etc/pam.d/sieve
                              cp $DL_DIR/hyperion-install/config/mysql/libnss-mysql.cfg /etc/libnss-mysql.cfg
                              cp $DL_DIR/hyperion-install/config/mysql/libnss-mysql-root.cfg /etc/libnss-mysql-root.cfg
                              cp $DL_DIR/hyperion-install/config/postfix/*.cf /etc/postfix/
                              
                              # Replace example configuration entities with our settings
                              awk '{gsub("hyperion.example.com", "'"$DOMAIN"'", $0); print > FILENAME}' /etc/apache2/sites-available/default
                              echo "ServerName `hostname`.$DOMAIN" >> /etc/apache2/httpd.conf
                              awk '{gsub("oxadmin@example.com", "oxadmin@" "'"$DOMAIN"'", $0); print > FILENAME}' /etc/apache2/sites-available/default
                              awk '{gsub("example.com",  "'"$DOMAIN"'", $0); print > FILENAME}' /etc/imapd.conf
                              awk '{gsub("example.com", "'"$DOMAIN"'", $0); print > FILENAME}' /etc/postfix/main.cf
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_aliases.cf
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_resource_aliases.cf
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_user_aliases.cf
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_domains.cf
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_externaldomaincheck.cf
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_group_aliases.cf
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/postfix/ox_senderrestrictions.cf
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/pam.d/imap
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/pam.d/pop
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/pam.d/sieve
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/libnss-mysql-root.cfg
                              awk '{gsub("secret", "'"$OPENXCHANGE_MYSQL_PWD"'", $0); print > FILENAME}' /etc/libnss-mysql.cfg
                              awk '{gsub("DEFAULT_PASSWORD_MECHANISM=SHA", "DEFAULT_PASSWORD_MECHANISM=CRYPT", $0); print > FILENAME}' /opt/open-xchange/etc/admindaemon/User.properties
                              #awk '{gsub("www", "cache", $0); print > FILENAME}' /etc/munin/munin.conf
                              awk '{gsub("START=no", "START=yes", $0); print > FILENAME}' /etc/default/saslauthd
                              usermod -G mail postfix
                              newaliases
                              
                              # Enabling IMAPD
                              awk '{gsub("#imaps\t\tcmd=\"imapd", "imaps\t\tcmd=\"imapd", $0); print > FILENAME}' /etc/cyrus.conf
                              
                              # Enabling SIEVE
                              awk '{gsub("\"timsieved\"", "\"/usr/lib/cyrus/bin/timsieved\"", $0); print > FILENAME}' /etc/cyrus.conf
                              
                              # Fixing Ubuntu 8.04 permissions on cyrus
                              chown -R cyrus:mail /var/spool/cyrus/
                              chown -R cyrus:mail /var/spool/sieve/
                              chown -R cyrus:mail /var/lib/cyrus/
                              
                              echo "Restarting services..."
                              /etc/init.d/mysql restart
                              /etc/init.d/cyrus2.2 restart
                              /etc/init.d/saslauthd restart
                              /etc/init.d/postfix restart
                              #/etc/init.d/munin-node restart
                              /etc/init.d/apache2 restart
                              
                              echo "GRANT ALL PRIVILEGES ON *.* TO 'openexchange'@'localhost' IDENTIFIED BY '$OPENXCHANGE_MYSQL_PWD';" > /tmp/openXchange_pri.sql
                              mysql -u root < /tmp/openXchange_pri.sql mysql -p #Remember your MySQL root password?
                              
                              /opt/open-xchange/sbin/initconfigdb --configdb-pass=$OPENXCHANGE_MYSQL_PWD
                              
                              /opt/open-xchange/sbin/oxinstaller --servername=oxserver --configdb-pass=$OPENXCHANGE_MYSQL_PWD --master-pass=$OX_ADMIN_MASTER_PASSWORD
                              
                              /etc/init.d/open-xchange-groupware restart
                              /etc/init.d/open-xchange-admin start
                              
                              a2enmod proxy
                              a2enmod proxy_ajp
                              a2enmod expires
                              a2enmod deflate
                              a2enmod headers
                              
                              echo "
                              <Proxy *>
                              Order deny,allow
                              allow from all
                              </Proxy>
                              
                              ProxyPass /axis2 ajp://127.0.0.1:8009/axis2 smax=0 ttl=60 retry=5
                              ProxyPass /ajax ajp://127.0.0.1:8009/ajax smax=0 ttl=60 retry=5
                              ProxyPass /servlet ajp://127.0.0.1:8009/servlet smax=0 ttl=60 retry=5
                              ProxyPass /infostore ajp://127.0.0.1:8009/infostore smax=0 ttl=60 retry=5
                              " > /etc/apache2/conf.d/proxy_ajp.conf
                              
                              sed -i "14G" /etc/apache2/sites-available/default
                              sed -i "14G" /etc/apache2/sites-available/default
                              #sed -i "15s/^/RedirectMatch \^\/\$ \/ox6/" /etc/apache2/sites-available/default
                              sed -i "s/<\/VirtualHost>//" /etc/apache2/sites-available/default
                              
                              echo 'ExpiresActive On
                              ExpiresByType image/gif "access plus 23 hours"
                              ExpiresByType image/png "access plus 23 hours"
                              ExpiresByType image/jpg "access plus 23 hours"
                              ExpiresByType image/jpeg "access plus 23 hours"
                              ExpiresByType text/javascript "access plus 23 hours"
                              ExpiresByType text/css "access plus 23 hours"
                              ExpiresByType text/html "access plus 23 hours"
                              ExpiresByType application/x-javascript "access plus 23 hours"
                              <Files ~ "\.(js|css|gif|jpe?g|png)$">
                              Header append Cache-Control "public"
                              </Files>
                              DeflateFilterNote ratio
                              AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
                              BrowserMatch ^Mozilla/4 gzip-only-text/html
                              BrowserMatch ^Mozilla/4\.0[678] no-gzip
                              BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
                              Header append Vary User-Agent env=!dont-vary
                              </VirtualHost>
                              ' >> /etc/apache2/sites-available/default
                              
                              /etc/init.d/apache2 restart
                              /etc/init.d/postfix restart
                              /etc/init.d/saslauthd start
                              /etc/init.d/open-xchange-groupware restart
                              
                              /opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P $OX_ADMIN_MASTER_PASSWORD
                              
                              mkdir /var/opt/filestore
                              chown open-xchange:open-xchange /var/opt/filestore
                              
                              /opt/open-xchange/sbin/registerfilestore -A oxadminmaster -P $OX_ADMIN_MASTER_PASSWORD \
                              -t file:///var/opt/filestore
                              
                              /opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P $OX_ADMIN_MASTER_PASSWORD \
                              -n oxdatabase -p $OPENXCHANGE_MYSQL_PWD -m true
                              
                              /opt/open-xchange/sbin/createcontext -A oxadminmaster -P $OX_ADMIN_MASTER_PASSWORD -c 1 \
                              -u oxadmin -d "Context Admin" -g Admin -s User -p $OX_ADMIN_PASSWORD -L defaultcontext \
                              -e oxadmin@$DOMAIN -q 1024 --access-combination-name=all 
                              
                              /opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P $OX_ADMIN_PASSWORD -u testuser \
                              -d "Test User" -g Test -s User -p secret -e testuser@$DOMAIN --imaplogin testuser --imapserver 127.0.0.1 --smtpserver 127.0.0.1
                              
                              /etc/init.d/open-xchange-admin restart
                              /etc/init.d/open-xchange-groupware restart
                              
                              echo "Finished! Visit http://`hostname`.$DOMAIN/ox6/ and login as testuser/secret to test your installation"

                              Comment

                              Working...
                              X