https://wiki.zimbra.com/api.php?action=feedcontributions&user=Marlow&feedformat=atomZimbra :: Tech Center - User contributions [en]2024-03-29T08:23:02ZUser contributionsMediaWiki 1.39.0https://wiki.zimbra.com/index.php?title=Installing_Zimbra_on_VServer&diff=3852Installing Zimbra on VServer2006-12-04T04:01:15Z<p>Marlow: change of localhost to ethX address not required. localhost is correctly mapped by vserver, matter of fact to the vservers ip.</p>
<hr />
<div>= Installation on VServer =<br />
<br />
These instructions are specifically for Debian VServers, but should be able to be applied to just about any system<br />
<br />
WARNING - Upgrading Zimbra will overwrite all of these files - you must patch them after installing and each upgrade.<br />
<br />
== Debian and VServers ==<br />
<br />
== Gotchas ==<br />
<br />
=== Prerequisites ===<br />
<br />
A base Debian vserver doesn't have a "file" utility installed by default. This is needed by amavis. <br />
The installer will fail, if getopt isn't installed, for this you need "libgetopt-mixed-perl".<br />
Apache and Tomcat will fail, as the base vserver doesn't have "libexpat1" installed.<br />
Install it by typing:<br />
<br />
<pre><br />
apt-get install file libexpat1 libgetopt-mixed-perl<br />
</pre><br />
<br />
Matter of fact, all packages required for installing Zimbra are:<br />
<br />
<pre><br />
apt-get install libgetopt-mixed-perl file libc6-i686 sudo libidn11 curl fetchmail libgmp3 \<br />
libxml2 libstdc++6 openssl libexpat1<br />
</pre><br />
<br />
=== /etc/hosts ===<br />
<br />
Make sure you have a localhost entry and also an entry with your primary IP. For example:<br />
<br />
<pre><br />
127.0.0.1 localhost.localdomain localhost<br />
1.2.3.4 mail.somehost.zimbra mail<br />
</pre><br />
<br />
=== localhost ===<br />
<br />
<strike>The Zimbra logger process doesn't seem to startup. "zmcontrol status" on my system shows:<br />
<br />
<pre><br />
vserver:~# /opt/zimbra/bin/zmcontrol status<br />
Host vserver.somedomain<br />
antispam Stopped<br />
antivirus Stopped<br />
ldap Running<br />
logger Stopped<br />
mailbox Stopped<br />
mta Stopped<br />
snmp Stopped<br />
spell Running<br />
vserver:~#<br />
</pre><br />
<br />
<br />
The logger uses MySQL. I'm guessing there is some problem with privileges and/or connecting to localhost in the "mysql" database. Just a hunch though.<br />
</strike><br />
<br />
I installed Zimbra on a new VServer and the logger seemd to startup properly. "zmcontrol status" shows it running after several stops/starts. However, I'm still not getting any log data. All statistics windows say "Data not available yet.". Oh well.<br />
<br />
<br />
=== Postfix ===<br />
<br />
In postfix/conf/master.cf<br />
<br />
<pre><br />
1.2.3.4:10025 inet n - n - - smtpd<br />
-o mynetworks=127.0.0.1/8,1.2.3.4<br />
</pre><br />
<br />
Where 1.2.3.4 is your real IP number (not 127.0.0.1). Do not forget to change the mynetworks line as well, or your AV will not be able to connect back to postfix on 10025 for final delivery.<br />
<br />
In postfix/conf/main.cf<br />
<br />
<pre><br />
content_filter = smtp-amavis:[1.2.3.4]:10024<br />
</pre><br />
<br />
Recently you also have to change zmmta.conf in /opt/zimbra/conf<br />
<br />
<pre><br />
POSTCONF content_filter smtp-amavis:[203.18.242.10]:10024<br />
</pre><br />
<br />
or your changes will keep getting overwritten.<br />
<br />
=== Security limits (SuSE OSS 10.0 vserver) ===<br />
<br />
Edit /etc/security/limits.conf and comment the last two lines - otherwise the su command won't work and the installation will fail.<br />
<br />
<pre><br />
# End of file<br />
#zimbra soft nofile 10000<br />
#zimbra hard nofile 10000<br />
</pre><br />
<br />
Rerun /opt/zimbra/libexec/zmsetup.pl to complete the setup.<br />
<br />
=== Amavis ===<br />
<br />
Edit /opt/zimbra/amavisd/sbin/amavisd (main Perl script) and explicitly add the IP address of the Zimbra VServer to the "inet_acl" line. I.e:<br />
<br />
<pre><br />
@inet_acl = qw( 127.0.0.1 123.123.123.123 [::1] ); # allow SMTP access only from localhost<br />
</pre><br />
<br />
Postfix should then be able to talk to Amavis...<br />
<br />
You may also need to change BIND address and the two services back to postfix (10025 port). Basically look for 127.0.0.1.<br />
''(?? This line is overly vague, refine please --mathx)''<br />
<br />
Additional changes likely required in /opt/zimbra/amavisd/sbin/amavisd (perl script):<br />
<br />
change <pre>$inet_socket_bind = '127.0.0.1'; # limit socket bind to loopback interface</pre><br />
<br />
to <pre>$inet_socket_bind = '10.11.12.5'; # no loopback in vserver, use rfc1918 internal ip bound to your vserver</pre><br />
<br />
also few lines down:<br />
<br />
<pre>$notify_method = 'smtp:[127.0.0.1]:10025'; # change these to also match your internal<br />
$forward_method = 'smtp:[127.0.0.1]:10025'; # rfc 1918 ip addr (can use inet ip, but not recommended)</pre><br />
<br />
A bunch of filters in '''/opt/zimbra/conf/amavisd.conf''' also need updating from 127.0.0.1:(port) to whatever IP you are using (though many in the default file are commented out, I think I found 3 in the default zimbra amavisd install that needed changing.)<br />
<br />
Additionally the local MX for '''/opt/zimbra/conf/dspam.conf''' needs changing as well.<br />
<br />
=== Vserver /tmp size ===<br />
<br />
My install of Zimbra wouldn't start clamd with my default debian 16m of /tmp ramdisk space in my vserver. I had to edit /etc/vservers/(name)/fstab and increase it to 128m (though smaller may work, I didnt test), and restart the vserver. 128m lets it start anyway, not sure if I'll run out during operations. ''--mathx''</div>Marlowhttps://wiki.zimbra.com/index.php?title=Installing_Zimbra_on_VServer&diff=3851Installing Zimbra on VServer2006-12-04T03:56:49Z<p>Marlow: hosts format needs to be [ip] [fqdn] [hostname], or else zimbra will complain</p>
<hr />
<div>= Installation on VServer =<br />
<br />
These instructions are specifically for Debian VServers, but should be able to be applied to just about any system<br />
<br />
WARNING - Upgrading Zimbra will overwrite all of these files - you must patch them after installing and each upgrade.<br />
<br />
== Debian and VServers ==<br />
<br />
== Gotchas ==<br />
<br />
=== Prerequisites ===<br />
<br />
A base Debian vserver doesn't have a "file" utility installed by default. This is needed by amavis. <br />
The installer will fail, if getopt isn't installed, for this you need "libgetopt-mixed-perl".<br />
Apache and Tomcat will fail, as the base vserver doesn't have "libexpat1" installed.<br />
Install it by typing:<br />
<br />
<pre><br />
apt-get install file libexpat1 libgetopt-mixed-perl<br />
</pre><br />
<br />
Matter of fact, all packages required for installing Zimbra are:<br />
<br />
<pre><br />
apt-get install libgetopt-mixed-perl file libc6-i686 sudo libidn11 curl fetchmail libgmp3 \<br />
libxml2 libstdc++6 openssl libexpat1<br />
</pre><br />
<br />
=== /etc/hosts ===<br />
<br />
Make sure you have a localhost entry and also an entry with your primary IP. For example:<br />
<br />
<pre><br />
127.0.0.1 localhost.localdomain localhost<br />
1.2.3.4 mail.somehost.zimbra mail<br />
</pre><br />
<br />
I have also changed localhost to point at my RFC1918 internal address (bound to eth1, not lo0) in /etc/hosts, but I am not sure if this is required to make it work. --mathx<br />
<br />
=== localhost ===<br />
<br />
<strike>The Zimbra logger process doesn't seem to startup. "zmcontrol status" on my system shows:<br />
<br />
<pre><br />
vserver:~# /opt/zimbra/bin/zmcontrol status<br />
Host vserver.somedomain<br />
antispam Stopped<br />
antivirus Stopped<br />
ldap Running<br />
logger Stopped<br />
mailbox Stopped<br />
mta Stopped<br />
snmp Stopped<br />
spell Running<br />
vserver:~#<br />
</pre><br />
<br />
<br />
The logger uses MySQL. I'm guessing there is some problem with privileges and/or connecting to localhost in the "mysql" database. Just a hunch though.<br />
</strike><br />
<br />
I installed Zimbra on a new VServer and the logger seemd to startup properly. "zmcontrol status" shows it running after several stops/starts. However, I'm still not getting any log data. All statistics windows say "Data not available yet.". Oh well.<br />
<br />
<br />
=== Postfix ===<br />
<br />
In postfix/conf/master.cf<br />
<br />
<pre><br />
1.2.3.4:10025 inet n - n - - smtpd<br />
-o mynetworks=127.0.0.1/8,1.2.3.4<br />
</pre><br />
<br />
Where 1.2.3.4 is your real IP number (not 127.0.0.1). Do not forget to change the mynetworks line as well, or your AV will not be able to connect back to postfix on 10025 for final delivery.<br />
<br />
In postfix/conf/main.cf<br />
<br />
<pre><br />
content_filter = smtp-amavis:[1.2.3.4]:10024<br />
</pre><br />
<br />
Recently you also have to change zmmta.conf in /opt/zimbra/conf<br />
<br />
<pre><br />
POSTCONF content_filter smtp-amavis:[203.18.242.10]:10024<br />
</pre><br />
<br />
or your changes will keep getting overwritten.<br />
<br />
=== Security limits (SuSE OSS 10.0 vserver) ===<br />
<br />
Edit /etc/security/limits.conf and comment the last two lines - otherwise the su command won't work and the installation will fail.<br />
<br />
<pre><br />
# End of file<br />
#zimbra soft nofile 10000<br />
#zimbra hard nofile 10000<br />
</pre><br />
<br />
Rerun /opt/zimbra/libexec/zmsetup.pl to complete the setup.<br />
<br />
=== Amavis ===<br />
<br />
Edit /opt/zimbra/amavisd/sbin/amavisd (main Perl script) and explicitly add the IP address of the Zimbra VServer to the "inet_acl" line. I.e:<br />
<br />
<pre><br />
@inet_acl = qw( 127.0.0.1 123.123.123.123 [::1] ); # allow SMTP access only from localhost<br />
</pre><br />
<br />
Postfix should then be able to talk to Amavis...<br />
<br />
You may also need to change BIND address and the two services back to postfix (10025 port). Basically look for 127.0.0.1.<br />
''(?? This line is overly vague, refine please --mathx)''<br />
<br />
Additional changes likely required in /opt/zimbra/amavisd/sbin/amavisd (perl script):<br />
<br />
change <pre>$inet_socket_bind = '127.0.0.1'; # limit socket bind to loopback interface</pre><br />
<br />
to <pre>$inet_socket_bind = '10.11.12.5'; # no loopback in vserver, use rfc1918 internal ip bound to your vserver</pre><br />
<br />
also few lines down:<br />
<br />
<pre>$notify_method = 'smtp:[127.0.0.1]:10025'; # change these to also match your internal<br />
$forward_method = 'smtp:[127.0.0.1]:10025'; # rfc 1918 ip addr (can use inet ip, but not recommended)</pre><br />
<br />
A bunch of filters in '''/opt/zimbra/conf/amavisd.conf''' also need updating from 127.0.0.1:(port) to whatever IP you are using (though many in the default file are commented out, I think I found 3 in the default zimbra amavisd install that needed changing.)<br />
<br />
Additionally the local MX for '''/opt/zimbra/conf/dspam.conf''' needs changing as well.<br />
<br />
=== Vserver /tmp size ===<br />
<br />
My install of Zimbra wouldn't start clamd with my default debian 16m of /tmp ramdisk space in my vserver. I had to edit /etc/vservers/(name)/fstab and increase it to 128m (though smaller may work, I didnt test), and restart the vserver. 128m lets it start anyway, not sure if I'll run out during operations. ''--mathx''</div>Marlowhttps://wiki.zimbra.com/index.php?title=Installing_Zimbra_on_VServer&diff=3850Installing Zimbra on VServer2006-12-04T03:15:49Z<p>Marlow: Prerequisites</p>
<hr />
<div>= Installation on VServer =<br />
<br />
These instructions are specifically for Debian VServers, but should be able to be applied to just about any system<br />
<br />
WARNING - Upgrading Zimbra will overwrite all of these files - you must patch them after installing and each upgrade.<br />
<br />
== Debian and VServers ==<br />
<br />
== Gotchas ==<br />
<br />
=== Prerequisites ===<br />
<br />
A base Debian vserver doesn't have a "file" utility installed by default. This is needed by amavis. <br />
The installer will fail, if getopt isn't installed, for this you need "libgetopt-mixed-perl".<br />
Apache and Tomcat will fail, as the base vserver doesn't have "libexpat1" installed.<br />
Install it by typing:<br />
<br />
<pre><br />
apt-get install file libexpat1 libgetopt-mixed-perl<br />
</pre><br />
<br />
Matter of fact, all packages required for installing Zimbra are:<br />
<br />
<pre><br />
apt-get install libgetopt-mixed-perl file libc6-i686 sudo libidn11 curl fetchmail libgmp3 \<br />
libxml2 libstdc++6 openssl libexpat1<br />
</pre><br />
<br />
=== /etc/hosts ===<br />
<br />
Make sure you have a localhost entry and also an entry with your primary IP. For example:<br />
<br />
<pre><br />
127.0.0.1 localhost<br />
123.123.123.123 mail.somehost.zimbra<br />
</pre><br />
<br />
I have also changed localhost to point at my RFC1918 internal address (bound to eth1, not lo0) in /etc/hosts, but I am not sure if this is required to make it work. --mathx<br />
<br />
=== localhost ===<br />
<br />
<strike>The Zimbra logger process doesn't seem to startup. "zmcontrol status" on my system shows:<br />
<br />
<pre><br />
vserver:~# /opt/zimbra/bin/zmcontrol status<br />
Host vserver.somedomain<br />
antispam Stopped<br />
antivirus Stopped<br />
ldap Running<br />
logger Stopped<br />
mailbox Stopped<br />
mta Stopped<br />
snmp Stopped<br />
spell Running<br />
vserver:~#<br />
</pre><br />
<br />
<br />
The logger uses MySQL. I'm guessing there is some problem with privileges and/or connecting to localhost in the "mysql" database. Just a hunch though.<br />
</strike><br />
<br />
I installed Zimbra on a new VServer and the logger seemd to startup properly. "zmcontrol status" shows it running after several stops/starts. However, I'm still not getting any log data. All statistics windows say "Data not available yet.". Oh well.<br />
<br />
<br />
=== Postfix ===<br />
<br />
In postfix/conf/master.cf<br />
<br />
<pre><br />
1.2.3.4:10025 inet n - n - - smtpd<br />
-o mynetworks=127.0.0.1/8,1.2.3.4<br />
</pre><br />
<br />
Where 1.2.3.4 is your real IP number (not 127.0.0.1). Do not forget to change the mynetworks line as well, or your AV will not be able to connect back to postfix on 10025 for final delivery.<br />
<br />
In postfix/conf/main.cf<br />
<br />
<pre><br />
content_filter = smtp-amavis:[1.2.3.4]:10024<br />
</pre><br />
<br />
Recently you also have to change zmmta.conf in /opt/zimbra/conf<br />
<br />
<pre><br />
POSTCONF content_filter smtp-amavis:[203.18.242.10]:10024<br />
</pre><br />
<br />
or your changes will keep getting overwritten.<br />
<br />
=== Security limits (SuSE OSS 10.0 vserver) ===<br />
<br />
Edit /etc/security/limits.conf and comment the last two lines - otherwise the su command won't work and the installation will fail.<br />
<br />
<pre><br />
# End of file<br />
#zimbra soft nofile 10000<br />
#zimbra hard nofile 10000<br />
</pre><br />
<br />
Rerun /opt/zimbra/libexec/zmsetup.pl to complete the setup.<br />
<br />
=== Amavis ===<br />
<br />
Edit /opt/zimbra/amavisd/sbin/amavisd (main Perl script) and explicitly add the IP address of the Zimbra VServer to the "inet_acl" line. I.e:<br />
<br />
<pre><br />
@inet_acl = qw( 127.0.0.1 123.123.123.123 [::1] ); # allow SMTP access only from localhost<br />
</pre><br />
<br />
Postfix should then be able to talk to Amavis...<br />
<br />
You may also need to change BIND address and the two services back to postfix (10025 port). Basically look for 127.0.0.1.<br />
''(?? This line is overly vague, refine please --mathx)''<br />
<br />
Additional changes likely required in /opt/zimbra/amavisd/sbin/amavisd (perl script):<br />
<br />
change <pre>$inet_socket_bind = '127.0.0.1'; # limit socket bind to loopback interface</pre><br />
<br />
to <pre>$inet_socket_bind = '10.11.12.5'; # no loopback in vserver, use rfc1918 internal ip bound to your vserver</pre><br />
<br />
also few lines down:<br />
<br />
<pre>$notify_method = 'smtp:[127.0.0.1]:10025'; # change these to also match your internal<br />
$forward_method = 'smtp:[127.0.0.1]:10025'; # rfc 1918 ip addr (can use inet ip, but not recommended)</pre><br />
<br />
A bunch of filters in '''/opt/zimbra/conf/amavisd.conf''' also need updating from 127.0.0.1:(port) to whatever IP you are using (though many in the default file are commented out, I think I found 3 in the default zimbra amavisd install that needed changing.)<br />
<br />
Additionally the local MX for '''/opt/zimbra/conf/dspam.conf''' needs changing as well.<br />
<br />
=== Vserver /tmp size ===<br />
<br />
My install of Zimbra wouldn't start clamd with my default debian 16m of /tmp ramdisk space in my vserver. I had to edit /etc/vservers/(name)/fstab and increase it to 128m (though smaller may work, I didnt test), and restart the vserver. 128m lets it start anyway, not sure if I'll run out during operations. ''--mathx''</div>Marlowhttps://wiki.zimbra.com/index.php?title=Installing_Zimbra_on_VServer&diff=3849Installing Zimbra on VServer2006-12-04T02:49:14Z<p>Marlow: a few more packages are needed on a base Debian vserver.</p>
<hr />
<div>= Installation on VServer =<br />
<br />
These instructions are specifically for Debian VServers, but should be able to be applied to just about any system<br />
<br />
WARNING - Upgrading Zimbra will overwrite all of these files - you must patch them after installing and each upgrade.<br />
<br />
== Debian and VServers ==<br />
<br />
== Gotchas ==<br />
<br />
=== Unix file(1) utility ===<br />
<br />
A base Debian vserver doesn't have a "file" utility installed by default. This is needed by amavis. <br />
The installer will fail, if getopt isn't installed, for this you need "libgetopt-mixed-perl".<br />
Apache and Tomcat will fail, as the base vserver doesn't have "libexpat1" installed.<br />
Install it by typing:<br />
<br />
<pre><br />
apt-get install file libexpat1 libgetopt-mixed-perl<br />
</pre><br />
<br />
=== /etc/hosts ===<br />
<br />
Make sure you have a localhost entry and also an entry with your primary IP. For example:<br />
<br />
<pre><br />
127.0.0.1 localhost<br />
123.123.123.123 mail.somehost.zimbra<br />
</pre><br />
<br />
I have also changed localhost to point at my RFC1918 internal address (bound to eth1, not lo0) in /etc/hosts, but I am not sure if this is required to make it work. --mathx<br />
<br />
=== localhost ===<br />
<br />
<strike>The Zimbra logger process doesn't seem to startup. "zmcontrol status" on my system shows:<br />
<br />
<pre><br />
vserver:~# /opt/zimbra/bin/zmcontrol status<br />
Host vserver.somedomain<br />
antispam Stopped<br />
antivirus Stopped<br />
ldap Running<br />
logger Stopped<br />
mailbox Stopped<br />
mta Stopped<br />
snmp Stopped<br />
spell Running<br />
vserver:~#<br />
</pre><br />
<br />
<br />
The logger uses MySQL. I'm guessing there is some problem with privileges and/or connecting to localhost in the "mysql" database. Just a hunch though.<br />
</strike><br />
<br />
I installed Zimbra on a new VServer and the logger seemd to startup properly. "zmcontrol status" shows it running after several stops/starts. However, I'm still not getting any log data. All statistics windows say "Data not available yet.". Oh well.<br />
<br />
<br />
=== Postfix ===<br />
<br />
In postfix/conf/master.cf<br />
<br />
<pre><br />
1.2.3.4:10025 inet n - n - - smtpd<br />
-o mynetworks=127.0.0.1/8,1.2.3.4<br />
</pre><br />
<br />
Where 1.2.3.4 is your real IP number (not 127.0.0.1). Do not forget to change the mynetworks line as well, or your AV will not be able to connect back to postfix on 10025 for final delivery.<br />
<br />
In postfix/conf/main.cf<br />
<br />
<pre><br />
content_filter = smtp-amavis:[1.2.3.4]:10024<br />
</pre><br />
<br />
Recently you also have to change zmmta.conf in /opt/zimbra/conf<br />
<br />
<pre><br />
POSTCONF content_filter smtp-amavis:[203.18.242.10]:10024<br />
</pre><br />
<br />
or your changes will keep getting overwritten.<br />
<br />
=== Security limits (SuSE OSS 10.0 vserver) ===<br />
<br />
Edit /etc/security/limits.conf and comment the last two lines - otherwise the su command won't work and the installation will fail.<br />
<br />
<pre><br />
# End of file<br />
#zimbra soft nofile 10000<br />
#zimbra hard nofile 10000<br />
</pre><br />
<br />
Rerun /opt/zimbra/libexec/zmsetup.pl to complete the setup.<br />
<br />
=== Amavis ===<br />
<br />
Edit /opt/zimbra/amavisd/sbin/amavisd (main Perl script) and explicitly add the IP address of the Zimbra VServer to the "inet_acl" line. I.e:<br />
<br />
<pre><br />
@inet_acl = qw( 127.0.0.1 123.123.123.123 [::1] ); # allow SMTP access only from localhost<br />
</pre><br />
<br />
Postfix should then be able to talk to Amavis...<br />
<br />
You may also need to change BIND address and the two services back to postfix (10025 port). Basically look for 127.0.0.1.<br />
''(?? This line is overly vague, refine please --mathx)''<br />
<br />
Additional changes likely required in /opt/zimbra/amavisd/sbin/amavisd (perl script):<br />
<br />
change <pre>$inet_socket_bind = '127.0.0.1'; # limit socket bind to loopback interface</pre><br />
<br />
to <pre>$inet_socket_bind = '10.11.12.5'; # no loopback in vserver, use rfc1918 internal ip bound to your vserver</pre><br />
<br />
also few lines down:<br />
<br />
<pre>$notify_method = 'smtp:[127.0.0.1]:10025'; # change these to also match your internal<br />
$forward_method = 'smtp:[127.0.0.1]:10025'; # rfc 1918 ip addr (can use inet ip, but not recommended)</pre><br />
<br />
A bunch of filters in '''/opt/zimbra/conf/amavisd.conf''' also need updating from 127.0.0.1:(port) to whatever IP you are using (though many in the default file are commented out, I think I found 3 in the default zimbra amavisd install that needed changing.)<br />
<br />
Additionally the local MX for '''/opt/zimbra/conf/dspam.conf''' needs changing as well.<br />
<br />
=== Vserver /tmp size ===<br />
<br />
My install of Zimbra wouldn't start clamd with my default debian 16m of /tmp ramdisk space in my vserver. I had to edit /etc/vservers/(name)/fstab and increase it to 128m (though smaller may work, I didnt test), and restart the vserver. 128m lets it start anyway, not sure if I'll run out during operations. ''--mathx''</div>Marlow