1. Deployment

1.1. JAVA_HOME environment variable not found

When you receive this error while installing:

* Checking permissions...done.

>> Error: JAVA_HOME not found in your environment (user root).
>> Please, set the JAVA_HOME variable in your environment to match the
>> location of the Java Virtual Machine you want to use.

>> If you are using sudo, run with -E option.

You need to set properly JAVA_HOME environment variable.

By default Java installation directory can be anywhere, so you need to look for it. Use command:

find / -name java

You should get results like this (with Zimbra installation):

/opt/zimbra/java
/opt/zimbra/j2sdk-20140721/bin/java
/opt/zimbra/j2sdk-20140721/jre/bin/java
/etc/pki/java
/etc/pki/ca-trust/extracted/java

Try the first result and invoke Java with version parameter, add /bin/java at the end of found path:

/opt/zimbra/java/bin/java -version

If you will see version of your Java then this is the correct path. If not try another one.

When you have valid path set $JAVA_HOME variable:

export JAVA_HOME="/opt/zimbra/java"

To check if variable is correctly set, invoke once again java with version parameter, but now using $JAVA_HOME variable (don’t forget to add /bin/java at the end):

$JAVA_HOME/bin/java -version

And the result:

openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build 1.8.0-internal-build_2014_07_29_16_56-b00)
OpenJDK 64-Bit Server VM (build 25.40-b01, mixed mode)

Note

JAVA_HOME variable will be set only for current session, so when you will logout it will be lost. To preserve variable edit /etc/environment file and add export JAVA_HOME=”/opt/zimbra/java” line at the end of the file.

1.2. Skip Automatic Milter Install

1.2.1. Zimbra

When install script have problems with updating Zimbra configuration, please follow these steps.

Run an installation script with --skip-milter-install parameter:

msh-ds-milter.bin --install --skip-milter-install

This will prevent from updating Zimbra milter configuration.

Now you need to update Zimbra configuration manually. Replace [HOSTNAME] variable with your real host name. If you have installed Zimbra in not default directory change /opt/zimbra/... to your install path:

su zimbra -c '/opt/zimbra/bin/zmprov ms [HOSTNAME] zimbraMtaSmtpdMilters "inet:localhost:7076"'

To apply changes restart mail server:

su zimbra -c '/opt/zimbra/bin/zmmtactl restart'

1.2.2. Postfix

When there’re problems with updating Postfix configuration, please follow these steps.

Run an installation script with --skip-milter-install parameter:

msh-ds-milter.bin --install --skip-milter-install

This will prevent from updating Postfix milter configuration.

Now you need to update Postfix configuration manually:

/usr/sbin/postconf -e "inet:localhost:7076"
/usr/sbin/postconf -e "milter_default_action=accept"

To apply changes restart mail server:

/etc/init.d/postfix reload

1.2.3. Sendmail

When there’re problems with updating Sendmail configuration, please follow these steps.

Run an installation script with --skip-milter-install parameter:

msh-ds-milter.bin --install --skip-milter-install

This will prevent from updating Sendmail milter configuration.

Now you need to update Sendmail configuration manually, edit /etc/mail/sendmail.mc configuration file and add these lines:

INPUT_MAIL_FILTER(`MSH-Disclaimer-Signatures', `S=inet:7076@localhost')
define(`confINPUT_MAIL_FILTERS', `MSH-Disclaimer-Signatures')

Save changes and restart mail server:

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
/etc/init.d/sendmail restart