<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Support Blog &#187; Zimbra</title>
	<atom:link href="http://www.aionsolution.com/blog/category/zimbra/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aionsolution.com/blog</link>
	<description>[IT Problem Resolved]</description>
	<lastBuildDate>Mon, 12 Dec 2011 10:34:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Resetting LDAP and MySQL Passwords</title>
		<link>http://www.aionsolution.com/blog/zimbra/resetting-ldap-and-mysql-passwords/</link>
		<comments>http://www.aionsolution.com/blog/zimbra/resetting-ldap-and-mysql-passwords/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 00:32:45 +0000</pubDate>
		<dc:creator>aionman</dc:creator>
				<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.aionsolution.com/blog/?p=325</guid>
		<description><![CDATA[Various Zimbra services use passwords stored in localconfig when connecting to ldap and mysql. If these passwords Updating LDAP Passwords It is necessary to run the password update commands as the zimbra user. # su - zimbra In ZCS 5.0.x Command Usage: /opt/zimbra/bin/zmldappasswd [-h] [-r] [-p] [-l] newpassword -h: display this help message -a: change [...]]]></description>
			<content:encoded><![CDATA[<p>Various Zimbra services use passwords stored in <a title="Zmlocalconfig" href="http://wiki.zimbra.com/wiki/Zmlocalconfig">localconfig</a> when connecting to ldap and mysql. If these passwords</p>
<h2>Updating LDAP Passwords</h2>
<p>It is necessary to run the password update commands as the zimbra user.</p>
<pre># su - zimbra
</pre>
<p><a id="In_ZCS_5.0.x" name="In_ZCS_5.0.x"></a></p>
<h3>In ZCS 5.0.x</h3>
<pre> Command Usage: /opt/zimbra/bin/zmldappasswd [-h] [-r] [-p] [-l] newpassword
	-h: display this help message
	-a: change ldap_amavis_password
	-l: change ldap_replication_password
	-n: change ldap_nginx_password
	-p: change ldap_postfix_password
	-r: change ldap_root_passwd
	Only one of a, l, n, p, or r may be specified
	Without options zimbra_ldap_password is changed
</pre>
<p>Make sure that slapd is running. Note that the actual process id (pid) will vary.</p>
<pre>$ ldap status
slapd running pid: 32266
</pre>
<p>Update the ldap root password.</p>
<pre>$ zmldappasswd -r <strong>newrootpass</strong>
</pre>
<p>Update the zimbra ldap password.</p>
<pre>$ zmldappasswd <strong>newpass</strong>
</pre>
<p>If necessary, update the password for other ldap users (amavis, replication, nginx, postfix).</p>
<p><a id="In_ZCS_4.5.x" name="In_ZCS_4.5.x"></a></p>
<h3>In ZCS 4.5.x</h3>
<p>Stop zimbra services.</p>
<pre># su - zimbra
$ zmcontrol stop
</pre>
<p>Verify that all Zimbra services are stopped.</p>
<pre>$ ps auxww | grep zimbra
</pre>
<p>Now we can reset the passwords. Note: In versions of ZCS up to 4.5.x the <em>zimbra ldap password</em> must be the same as the <em>ldap root password</em>.</p>
<p>Update the ldap root password.</p>
<pre>$ zmldappasswd --root <strong>newpass</strong>
</pre>
<p>Update the zimbra ldap password.</p>
<pre>$ zmldappasswd <strong>newpass</strong>
</pre>
<p><a id="Updating_Mailbox_MySQL_Database_Passwords" name="Updating_Mailbox_MySQL_Database_Passwords"></a></p>
<h2>Updating Mailbox MySQL Database Passwords</h2>
<p>It is necessary to run the password update commands as the zimbra user.</p>
<pre># su - zimbra
</pre>
<p>Make sure the mailbox mysql database is running. Note that the actual process id (pid) will vary.</p>
<pre> $ mysql.server status
 mysql is running with pid 23830
</pre>
<p>If that fails to find a running mysql, verify that the mailbox mysqld does not appear in the process list, and then start it.</p>
<pre>$ ps a | grep mysqld.*my.cnf
$ mysql.server start
</pre>
<p>Update the mysql root password.</p>
<pre>$ zmmypasswd --root newrootpass
</pre>
<p>Update the zimbra mysql password.</p>
<pre>$ zmmypasswd newpass
</pre>
<p><a id="Updating_Logger_MySQL_Database_Passwords" name="Updating_Logger_MySQL_Database_Passwords"></a></p>
<h2>Updating Logger MySQL Database Passwords</h2>
<p>It is necessary to run the password update commands as the zimbra user.</p>
<pre># su - zimbra
</pre>
<p>Make sure the logger mysql database is running. Note that the actual process id (pid) will vary.</p>
<pre> $ logmysql.server status
 mysql is running with pid 23830
</pre>
<p>If that fails to find a running mysql, verify that the mailbox mysqld does not appear in the process list, and then start it.</p>
<pre>$ ps a | grep mysqld.*my.logger.cnf
$ logmysql.server start
</pre>
<p>Update the logger mysql root password.</p>
<pre>$ zmmylogpasswd --root newrootpass
</pre>
<p>Update the logger zimbra mysql password.</p>
<pre>$ zmmylogpasswd newpass
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.aionsolution.com/blog/zimbra/resetting-ldap-and-mysql-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving ZCS to Another Server</title>
		<link>http://www.aionsolution.com/blog/zimbra/moving-zcs-to-another-server-2/</link>
		<comments>http://www.aionsolution.com/blog/zimbra/moving-zcs-to-another-server-2/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 05:11:42 +0000</pubDate>
		<dc:creator>aionman</dc:creator>
				<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.aionsolution.com/blog/?p=313</guid>
		<description><![CDATA[http://blog.zimbra.com/blog/archives/2007/10/moving-zcs-to-another-server.html Moving ZCS to Another Server Posted in PowerTips &#8211; Admins by Mike Morse on October 9th, 2007 In this Zimbra Administrator’s PowerTip, we’ll discuss how to move your instance of Zimbra to another machine. It applies to all version of Zimbra. Administrator’s PowerTip #4: October 09, 2007 Zimbra Forums – Zimbra wiki – Zimbra [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.zimbra.com/blog/archives/2007/10/moving-zcs-to-another-server.html">http://blog.zimbra.com/blog/archives/2007/10/moving-zcs-to-another-server.html</a></p>
<table id="content" style="background-color: #ffffff; font-family: Verdana,'Bitstream Vera Sans',arial,'Lucida Grande','Luxi Sans',helvetica,sans-serif; font-size: 12px; margin-top: 0px; padding-top: 20px; vertical-align: top; width: 80%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td id="column-main" style="line-height: 1.4em; margin-left: 210px; margin-right: 210px; margin-top: 0px; padding: 0px 20px 30px; vertical-align: top;" width="100%" valign="top">
<h2 id="post-187" style="color: #3b6173; font-size: 18px; margin: 1em 0px 0.5em; padding: 0px; font-family: Arial,'Lucinda Grande','Luxi Sans',Verdana,'Bitstream Vera Sans',Helvetica,sans-serif;"><a style="color: #990000;" rel="bookmark" href="http://blog.zimbra.com/blog/archives/2007/10/moving-zcs-to-another-server.html">Moving ZCS to Another Server</a></h2>
<div class="meta"><small>Posted in<span class="Apple-converted-space"> </span><a style="color: #990000;" title="View all posts in PowerTips - Admins" rel="category tag" href="http://blog.zimbra.com/blog/archives/category/powertips-admins">PowerTips &#8211; Admins</a><span class="Apple-converted-space"> </span>by Mike Morse on October 9th, 2007</small></div>
<div class="main">
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">In this Zimbra Administrator’s PowerTip, we’ll discuss how to move your instance of Zimbra to another machine. It applies to all version of Zimbra.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;"><span id="more-187"> </span></p>
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" /><img src="http://files.zimbra.com/blog/wp-content/uploads/2008/06/zimbra_powertip.gif" border="0" alt="" align="center" /><br />
Administrator’s PowerTip<br />
#4: October 09, 2007<br />
<a style="color: #990000;" href="http://www.zimbra.com/forums">Zimbra Forums</a><span class="Apple-converted-space"> </span>–<span class="Apple-converted-space"> </span><a style="color: #990000;" href="http://wiki.zimbra.com/">Zimbra wiki</a><span class="Apple-converted-space"> </span>–<span class="Apple-converted-space"> </span><a style="color: #990000;" href="http://www.zimbra.com/blog">Zimbra<br />
Blog</a></p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;"><span class="style1"> </span></p>
<p><span style="font-size: medium;">Introduction</span><br />
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" />Either you, or someone you know has been there. Almost out of Disk space, RAM is topped out, and the CPU is constantly running above 80%. It’s time to upgrade the hardware. But how easy and safe is it to move the Zimbra server instance? Well, it’s easier than you might think.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">In this Zimbra Administrator’s PowerTip, we’ll discuss how to migrate your Zimbra server to another Machine or OS. The one big caveat is that both instances of Zimbra MUST be running the same version. So if your old server is running 4.5.5, then you’ll need to install 4.5.5 on your new server. This wouldn’t be the time to upgrade your ZCS version.</p>
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 1 : Backing Up</span></span></div>
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" />
<div class="side-box side-box-left style1">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="display: inline; font-weight: normal; margin: 0px; padding: 0px; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">As zimbra: zmcontrol stop</li>
<li style="margin-bottom: 0.25em;">As root: ps aux | grep zimbra (make sure everything’s stopped)</li>
<li style="margin-bottom: 0.25em;">Mount external disc to location of your choice. ex: /mnt/migration</li>
<li style="margin-bottom: 0.25em;">As root: rsync -avH /opt/zimbra /mnt/migration (this may take a while)</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Zimbra Network Edition contains a backup feature, and although it’s useful, we won’t be using it in this tip.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">We have an external Hard Disc mounted to /mnt/migration. When rsync’ed, this is now your live copy (although it’s not live), and you should always have a backup of your live data. So, you might want to rsync again to another location to be safe.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Once you’ve rsync’ed all your data, umount the external drive, and put it somewhere safe.</p>
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 2 : Meet Your New Server</span></span><br />
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" />
<div class="side-box side-box-right">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="display: inline; font-weight: normal; margin: 0px; padding: 0px; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">Install Newer (supported) Operating System</li>
<li style="margin-bottom: 0.25em;">Turn off older ZCS Server</li>
<li style="margin-bottom: 0.25em;">Set up newer ZCS Server’s Network/Hostname is it was on the older server</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">The only thing that really matters on your new server, is whether or not meets Zimbra’s server Hardware and the Operating System requirements.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">It’s also very important that you have resolved any dependency issues. The ZCS installer for your newer OS should check for these.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Setup the newer server with the old server’s networking attributes. Make sure your older server is offline.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">If changing the hostname, please see this wiki article:<span class="Apple-converted-space"> </span><a style="color: #990000;" href="http://wiki.zimbra.com/index.php?title=ZmSetServerName">Set zmhostname</a></p>
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 3 : Create a &#8220;dummy&#8221; Install Then Remove It</span></span><br />
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" />
<div class="side-box side-box-left">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="display: inline; font-weight: normal; margin: 0px; padding: 0px; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">Download the version of ZCS (ie 4.5.5 or 4.0) for the new OS you have</li>
<li style="margin-bottom: 0.25em;">As Root: Run the installer with the -s option: ./install.sh -s</li>
<li style="margin-bottom: 0.25em;">As Root: Remove the dummy install: rm -rf /opt/zimbra</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">The goal of this step is to get the rpm/dpkg databases correct. When you download ZCS, make sure it’s for your newer OS, and the SAME version of ZCS that’s rsync’ed.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Run the installer with the -s option. This tells the installer to only install the software, and not to configure the installation.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Once the installer has completed, delete it by rm -rf /opt/zimbra. This wipes any dummy data you have in that location.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 4 : Mount Your Backup HD, rsync, and Install</span></span><br />
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" />
<div class="side-box side-box-right">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="display: inline; font-weight: normal; margin: 0px; padding: 0px; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">Mount external Hard drive</li>
<li style="margin-bottom: 0.25em;">As Root: rsync your backup to the new location: rsync -avH /mnt/migration/zimbra /opt/</li>
<li style="margin-bottom: 0.25em;">Unmount external Hard drive and keep it safe</li>
<li style="margin-bottom: 0.25em;">As Root: run zmfixperms located in /opt/zimbra/libexec</li>
<li style="margin-bottom: 0.25em;">As Root: rerun the installer without the -s option</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Connect and mount your external hard drive. Then, rsync the backed up data to its new location (rsync -avH /mnt/migration/zimbra /opt).</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Connect and mount your external hard drive. Then, rsync the backed up data to its new location (rsync -avH /mnt/migration/zimbra /opt).<br />
Unmount your backed up copy, and keep it in a safe place.<br />
Now that our data is all in place, we need to fix some permissions. Go into the /opt/zimbra/libexec directory and run zmfixperms. This helps insure that all the files are owned correctly.<br />
Once that has completed, re run the installer that you downloaded. It will detect ZCS already installed, and ask if you want to upgrade. Select Yes.</p>
</td>
</tr>
</tbody>
</table>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"></p>
<table id="content" style="background-color: #ffffff; font-family: Verdana,'Bitstream Vera Sans',arial,'Lucida Grande','Luxi Sans',helvetica,sans-serif; font-size: 12px; margin-top: 0px; padding-top: 20px; vertical-align: top; width: 80%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td id="column-main" style="line-height: 1.4em; margin-left: 210px; margin-right: 210px; margin-top: 0px; padding: 0px 20px 30px; vertical-align: top;" width="100%" valign="top">
<h2 id="post-187" style="color: #3b6173; font-size: 18px; margin: 1em 0px 0.5em; padding: 0px; font-family: Arial,'Lucinda Grande','Luxi Sans',Verdana,'Bitstream Vera Sans',Helvetica,sans-serif;"><a style="color: #990000;" rel="bookmark" href="http://blog.zimbra.com/blog/archives/2007/10/moving-zcs-to-another-server.html">Moving ZCS to Another Server</a></h2>
<div class="meta"><small>Posted in<span class="Apple-converted-space"> </span><a style="color: #990000;" title="View all posts in PowerTips - Admins" rel="category tag" href="http://blog.zimbra.com/blog/archives/category/powertips-admins">PowerTips &#8211; Admins</a><span class="Apple-converted-space"> </span>by Mike Morse on October 9th, 2007</small></div>
<div class="main">
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">In this Zimbra Administrator’s PowerTip, we’ll discuss how to move your instance of Zimbra to another machine. It applies to all version of Zimbra.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;"><span id="more-187"> </span></p>
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" /><img src="http://files.zimbra.com/blog/wp-content/uploads/2008/06/zimbra_powertip.gif" border="0" alt="" align="center" /><br />
Administrator’s PowerTip<br />
#4: October 09, 2007<br />
<a style="color: #990000;" href="http://www.zimbra.com/forums">Zimbra Forums</a><span class="Apple-converted-space"> </span>–<span class="Apple-converted-space"> </span><a style="color: #990000;" href="http://wiki.zimbra.com/">Zimbra wiki</a><span class="Apple-converted-space"> </span>–<span class="Apple-converted-space"> </span><a style="color: #990000;" href="http://www.zimbra.com/blog">Zimbra<br />
Blog</a></p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;"><span class="style1"> </span></p>
<p><span style="font-size: medium;">Introduction</span><br />
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" />Either you, or someone you know has been there. Almost out of Disk space, RAM is topped out, and the CPU is constantly running above 80%. It’s time to upgrade the hardware. But how easy and safe is it to move the Zimbra server instance? Well, it’s easier than you might think.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">In this Zimbra Administrator’s PowerTip, we’ll discuss how to migrate your Zimbra server to another Machine or OS. The one big caveat is that both instances of Zimbra MUST be running the same version. So if your old server is running 4.5.5, then you’ll need to install 4.5.5 on your new server. This wouldn’t be the time to upgrade your ZCS version.</p>
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 1 : Backing Up</span></span></div>
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" />
<div class="side-box side-box-left style1">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="display: inline; font-weight: normal; margin: 0px; padding: 0px; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">As zimbra: zmcontrol stop</li>
<li style="margin-bottom: 0.25em;">As root: ps aux | grep zimbra (make sure everything’s stopped)</li>
<li style="margin-bottom: 0.25em;">Mount external disc to location of your choice. ex: /mnt/migration</li>
<li style="margin-bottom: 0.25em;">As root: rsync -avH /opt/zimbra /mnt/migration (this may take a while)</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Zimbra Network Edition contains a backup feature, and although it’s useful, we won’t be using it in this tip.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">We have an external Hard Disc mounted to /mnt/migration. When rsync’ed, this is now your live copy (although it’s not live), and you should always have a backup of your live data. So, you might want to rsync again to another location to be safe.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Once you’ve rsync’ed all your data, umount the external drive, and put it somewhere safe.</p>
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 2 : Meet Your New Server</span></span><br />
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" />
<div class="side-box side-box-right">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="display: inline; font-weight: normal; margin: 0px; padding: 0px; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">Install Newer (supported) Operating System</li>
<li style="margin-bottom: 0.25em;">Turn off older ZCS Server</li>
<li style="margin-bottom: 0.25em;">Set up newer ZCS Server’s Network/Hostname is it was on the older server</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">The only thing that really matters on your new server, is whether or not meets Zimbra’s server Hardware and the Operating System requirements.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">It’s also very important that you have resolved any dependency issues. The ZCS installer for your newer OS should check for these.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Setup the newer server with the old server’s networking attributes. Make sure your older server is offline.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">If changing the hostname, please see this wiki article:<span class="Apple-converted-space"> </span><a style="color: #990000;" href="http://wiki.zimbra.com/index.php?title=ZmSetServerName">Set zmhostname</a></p>
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 3 : Create a &#8220;dummy&#8221; Install Then Remove It</span></span><br />
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" />
<div class="side-box side-box-left">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="display: inline; font-weight: normal; margin: 0px; padding: 0px; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">Download the version of ZCS (ie 4.5.5 or 4.0) for the new OS you have</li>
<li style="margin-bottom: 0.25em;">As Root: Run the installer with the -s option: ./install.sh -s</li>
<li style="margin-bottom: 0.25em;">As Root: Remove the dummy install: rm -rf /opt/zimbra</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">The goal of this step is to get the rpm/dpkg databases correct. When you download ZCS, make sure it’s for your newer OS, and the SAME version of ZCS that’s rsync’ed.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Run the installer with the -s option. This tells the installer to only install the software, and not to configure the installation.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Once the installer has completed, delete it by rm -rf /opt/zimbra. This wipes any dummy data you have in that location.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 4 : Mount Your Backup HD, rsync, and Install</span></span><br />
<hr style="clear: both; display: block; border-style: solid none none; border-top: 1px solid #cccccc; color: #cccccc; height: 1px; margin-top: 10px; padding: 0px 0px 10px;" />
<div class="side-box side-box-right">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="display: inline; font-weight: normal; margin: 0px; padding: 0px; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">Mount external Hard drive</li>
<li style="margin-bottom: 0.25em;">As Root: rsync your backup to the new location: rsync -avH /mnt/migration/zimbra /opt/</li>
<li style="margin-bottom: 0.25em;">Unmount external Hard drive and keep it safe</li>
<li style="margin-bottom: 0.25em;">As Root: run zmfixperms located in /opt/zimbra/libexec</li>
<li style="margin-bottom: 0.25em;">As Root: rerun the installer without the -s option</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Connect and mount your external hard drive. Then, rsync the backed up data to its new location (rsync -avH /mnt/migration/zimbra /opt).</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Connect and mount your external hard drive. Then, rsync the backed up data to its new location (rsync -avH /mnt/migration/zimbra /opt).<br />
Unmount your backed up copy, and keep it in a safe place.<br />
Now that our data is all in place, we need to fix some permissions. Go into the /opt/zimbra/libexec directory and run zmfixperms. This helps insure that all the files are owned correctly.<br />
Once that has completed, re run the installer that you downloaded. It will detect ZCS already installed, and ask if you want to upgrade. Select Yes.</p>
</td>
</tr>
</tbody>
</table>
<p></span><br class="Apple-interchange-newline" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.aionsolution.com/blog/zimbra/moving-zcs-to-another-server-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving ZCS to Another Server</title>
		<link>http://www.aionsolution.com/blog/zimbra/moving-zcs-to-another-server/</link>
		<comments>http://www.aionsolution.com/blog/zimbra/moving-zcs-to-another-server/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 14:36:14 +0000</pubDate>
		<dc:creator>aionman</dc:creator>
				<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.aionsolution.com/blog/?p=249</guid>
		<description><![CDATA[Moving ZCS to Another Server Posted in PowerTips &#8211; Admins by John Holder on the October 9th, 2007 In this Zimbra Administrator’s PowerTip, we’ll discuss how to move your instance of Zimbra to another machine. It applies to all version of Zimbra. Administrator’s PowerTip #4: October 09, 2007 Zimbra Forums – Zimbra wiki – Zimbra [...]]]></description>
			<content:encoded><![CDATA[<p><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: Verdana,'Bitstream Vera Sans',arial,'Lucida Grande','Luxi Sans',helvetica,sans-serif; font-size: 12px; line-height: 16px;"></p>
<div class="main"><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: Verdana,'Bitstream Vera Sans',arial,'Lucida Grande','Luxi Sans',helvetica,sans-serif; font-size: 12px; line-height: 16px;"></p>
<h2 id="post-187" style="margin: 1em 0px 0.5em; padding: 0px; color: #3b6173; font-size: 18px; font-family: Arial,'Lucinda Grande','Luxi Sans',Verdana,'Bitstream Vera Sans',Helvetica,sans-serif; text-align: left;"><a style="color: #990000;" rel="bookmark" href="http://www.zimbrablog.com/blog/archives/2007/10/moving-zcs-to-another-server.html">Moving ZCS to Another Server</a></h2>
<div class="meta" style="text-align: left;"><small>Posted in<span class="Apple-converted-space"> </span><a style="color: #990000;" title="View all posts in PowerTips - Admins" rel="category tag" href="http://www.zimbrablog.com/blog/archives/category/powertips-admins">PowerTips &#8211; Admins</a><span class="Apple-converted-space"> </span>by John Holder on the October 9th, 2007</small></div>
<div class="main" style="text-align: left;">
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px; text-align: left;">In this Zimbra Administrator’s PowerTip, we’ll discuss how to move your instance of Zimbra to another machine. It applies to all version of Zimbra.</p>
</div>
<p></span></span><img src="http://files.zimbra.com/blog/wp-content/uploads/2008/06/zimbra_powertip.gif" border="0" alt="" align="center" /><br />
Administrator’s PowerTip<br />
#4: October 09, 2007<br />
<a style="color: #990000;" href="http://www.zimbra.com/forums">Zimbra Forums</a><span class="Apple-converted-space"> </span>–<span class="Apple-converted-space"> </span><a style="color: #990000;" href="http://wiki.zimbra.com/">Zimbra wiki</a><span class="Apple-converted-space"> </span>–<span class="Apple-converted-space"> </span><a style="color: #990000;" href="http://www.zimbra.com/blog">Zimbra<br />
Blog</a></p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">
<p><span style="font-size: medium;">Introduction</span><br />
<hr style="border-style: solid none none; border-top: 1px solid #cccccc; padding: 0px 0px 10px; clear: both; display: block; color: #cccccc; height: 1px; margin-top: 10px;" />Either you, or someone you know has been there. Almost out of Disk space, RAM is topped out, and the CPU is constantly running above 80%. It’s time to upgrade the hardware. But how easy and safe is it to move the Zimbra server instance? Well, it’s easier than you might think.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">In this Zimbra Administrator’s PowerTip, we’ll discuss how to migrate your Zimbra server to another Machine or OS. The one big caveat is that both instances of Zimbra MUST be running the same version. So if your old server is running 4.5.5, then you’ll need to install 4.5.5 on your new server. This wouldn’t be the time to upgrade your ZCS version.</p>
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 1 : Backing Up</span></span></div>
<hr style="border-style: solid none none; border-top: 1px solid #cccccc; padding: 0px 0px 10px; clear: both; display: block; color: #cccccc; height: 1px; margin-top: 10px;" />
<div class="side-box side-box-left style1">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="margin: 0px; padding: 0px; display: inline; font-weight: normal; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">As zimbra: zmcontrol stop</li>
<li style="margin-bottom: 0.25em;">As root: ps aux | grep zimbra (make sure everything’s stopped)</li>
<li style="margin-bottom: 0.25em;">Mount external disc to location of your choice. ex: /mnt/migration</li>
<li style="margin-bottom: 0.25em;">As root: rsync -avH /opt/zimbra /mnt/migration (this may take a while)</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Zimbra Network Edition contains a backup feature, and although it’s useful, we won’t be using it in this tip.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">We have an external Hard Disc mounted to /mnt/migration. When rsync’ed, this is now your live copy (although it’s not live), and you should always have a backup of your live data. So, you might want to rsync again to another location to be safe.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Once you’ve rsync’ed all your data, umount the external drive, and put it somewhere safe.</p>
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 2 : Meet Your New Server</span></span><br />
<hr style="border-style: solid none none; border-top: 1px solid #cccccc; padding: 0px 0px 10px; clear: both; display: block; color: #cccccc; height: 1px; margin-top: 10px;" />
<div class="side-box side-box-right">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="margin: 0px; padding: 0px; display: inline; font-weight: normal; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">Install Newer (supported) Operating System</li>
<li style="margin-bottom: 0.25em;">Turn off older ZCS Server</li>
<li style="margin-bottom: 0.25em;">Set up newer ZCS Server’s Network/Hostname is it was on the older server</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">The only thing that really matters on your new server, is whether or not meets Zimbra’s server Hardware and the Operating System requirements.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">It’s also very important that you have resolved any dependency issues. The ZCS installer for your newer OS should check for these.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Setup the newer server with the old server’s networking attributes. Make sure your older server is offline.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">If changing the hostname, please see this wiki article:<span class="Apple-converted-space"> </span><a style="color: #990000;" href="http://wiki.zimbra.com/index.php?title=ZmSetServerName">Set zmhostname</a></p>
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 3 : Create a &#8220;dummy&#8221; Install Then Remove It</span></span><br />
<hr style="border-style: solid none none; border-top: 1px solid #cccccc; padding: 0px 0px 10px; clear: both; display: block; color: #cccccc; height: 1px; margin-top: 10px;" />
<div class="side-box side-box-left">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="margin: 0px; padding: 0px; display: inline; font-weight: normal; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">Download the version of ZCS (ie 4.5.5 or 4.0) for the new OS you have</li>
<li style="margin-bottom: 0.25em;">As Root: Run the installer with the -s option: ./install.sh -s</li>
<li style="margin-bottom: 0.25em;">As Root: Remove the dummy install: rm -rf /opt/zimbra</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">The goal of this step is to get the rpm/dpkg databases correct. When you download ZCS, make sure it’s for your newer OS, and the SAME version of ZCS that’s rsync’ed.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Run the installer with the -s option. This tells the installer to only install the software, and not to configure the installation.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Once the installer has completed, delete it by rm -rf /opt/zimbra. This wipes any dummy data you have in that location.</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">
<p><span class="style1"><span style="color: #000330; font-size: medium;">Part 4 : Mount Your Backup HD, rsync, and Install</span></span><br />
<hr style="border-style: solid none none; border-top: 1px solid #cccccc; padding: 0px 0px 10px; clear: both; display: block; color: #cccccc; height: 1px; margin-top: 10px;" />
<div class="side-box side-box-right">
<div class="side-box-title">
<h4 class="side-box-title-contents" style="margin: 0px; padding: 0px; display: inline; font-weight: normal; text-decoration: underline;">Step by Step:</h4>
</div>
<ol class="side-box-contents" style="margin-bottom: 1em; margin-top: 0px;">
<li style="margin-bottom: 0.25em;">Mount external Hard drive</li>
<li style="margin-bottom: 0.25em;">As Root: rsync your backup to the new location: rsync -avH /mnt/migration/zimbra /opt/</li>
<li style="margin-bottom: 0.25em;">Unmount external Hard drive and keep it safe</li>
<li style="margin-bottom: 0.25em;">As Root: run zmfixperms located in /opt/zimbra/libexec</li>
<li style="margin-bottom: 0.25em;">As Root: rerun the installer without the -s option</li>
</ol>
</div>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Connect and mount your external hard drive. Then, rsync the backed up data to its new location (rsync -avH /mnt/migration/zimbra /opt).</p>
<p style="margin: 0px 0px 1em; padding: 0px; font-family: Verdana,Geneva,sans-serif; font-size: 13px;">Connect and mount your external hard drive. Then, rsync the backed up data to its new location (rsync -avH /mnt/migration/zimbra /opt).<br />
Unmount your backed up copy, and keep it in a safe place.<br />
Now that our data is all in place, we need to fix some permissions. Go into the /opt/zimbra/libexec directory and run zmfixperms. This helps insure that all the files are owned correctly.<br />
Once that has completed, re run the installer that you downloaded. It will detect ZCS already installed, and ask if you want to upgrade. Select Yes.</p>
<p></span></span>Another useful guide</p>
<p>Network Edition: Moving from 32-bit to 64-bit Server</p>
<p><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"><a href="http://wiki.zimbra.com/index.php?title=Network_Edition:_Moving_from_32-bit_to_64-bit_Server">http://wiki.zimbra.com/index.php?title=Network_Edition:_Moving_from_32-bit_to_64-bit_Server</a></p>
<p></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aionsolution.com/blog/zimbra/moving-zcs-to-another-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking and Repairing the tables in the Zimbra logger database</title>
		<link>http://www.aionsolution.com/blog/zimbra/checking-and-repairing-the-tables-in-the-zimbra-logger-database/</link>
		<comments>http://www.aionsolution.com/blog/zimbra/checking-and-repairing-the-tables-in-the-zimbra-logger-database/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 08:23:22 +0000</pubDate>
		<dc:creator>aionman</dc:creator>
				<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.aionsolution.com/blog/?p=231</guid>
		<description><![CDATA[Here is an example, using the &#8220;raw_logs&#8221; table: $ logmysql zimbra_logger mysql&#62; check table raw_logs; +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+ &#124; Table                  &#124; Op    &#124; Msg_type &#124; Msg_text &#124; +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+ &#124; zimbra_logger.raw_logs &#124; check &#124; status   &#124; OK       &#124; +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+ 1 row in set (1.06 sec) If a table does not show OK status, try repairing: mysql&#62; repair table [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an example, using the &#8220;raw_logs&#8221; table:</p>
<p>$ logmysql zimbra_logger</p>
<p>mysql&gt; check table raw_logs;<br />
<span style="font-family: courier new,courier;">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+<br />
| Table                  | Op    | Msg_type | Msg_text |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+<br />
| zimbra_logger.raw_logs | check | status   | OK       | </span><br />
<span style="font-family: courier new,courier;">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+</span><br />
1 row in set (1.06 sec)<br />
If a table does not show OK status, try repairing:</p>
<p>mysql&gt; repair table raw_logs;<br />
<span style="font-family: courier new,courier;">+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+<br />
| Table                  | Op     | Msg_type | Msg_text |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+<br />
| zimbra_logger.raw_logs | repair | status   | OK       |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+</span><br />
1 row in set (2.32 sec)</p>
<p><span style="font-size: medium;">How to shrink logger database </span><br />
For first time is good to clean db manually if the database is very big. The commands bellow will delete all data in three tables (mta, amavis, raw_logs). If you need this data don&#8217;t execute them!</p>
<p>$zmlogswatchctl stop (don&#8217;t execute &#8220;zmloggerctl stop&#8221; this also stops logger mysqld)<br />
$logmysql -D zimbra_logger<br />
mysql&gt; delete from amavis;<br />
mysql&gt; optimize table amavis;<br />
mysql&gt; delete from mta;<br />
mysql&gt; optimize table mta;<br />
mysql&gt; delete from raw_logs;<br />
mysql&gt; optimize table raw_logs;<br />
mysql&gt; quit<br />
$zmlogswatchctl start</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aionsolution.com/blog/zimbra/checking-and-repairing-the-tables-in-the-zimbra-logger-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zimbra Auto bcc</title>
		<link>http://www.aionsolution.com/blog/zimbra/zimbra-auto-bcc/</link>
		<comments>http://www.aionsolution.com/blog/zimbra/zimbra-auto-bcc/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 06:04:40 +0000</pubDate>
		<dc:creator>aionman</dc:creator>
				<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.aionsolution.com/blog/?p=228</guid>
		<description><![CDATA[Per user bcc for Zimbra in /opt/zimbra/postfix/conf, create a file called sender_bcc and added the user you wanted to copy/send to employee@domain.com boss@domain.com in /opt/zimbra/postfix/conf/main.conf, add sender_bcc_maps = hash:/opt/zimbra/postfix/conf/sender_bcc then run as zimbra user postmap /opt/zimbra/postfix/conf/sender_bcc restart postfix - postfix reload]]></description>
			<content:encoded><![CDATA[<p>Per user bcc for Zimbra</p>
<p>in /opt/zimbra/postfix/conf, create a file called sender_bcc<br />
and added the user you wanted to copy/send to<br />
employee@domain.com boss@domain.com</p>
<p>in /opt/zimbra/postfix/conf/main.conf, add sender_bcc_maps = hash:/opt/zimbra/postfix/conf/sender_bcc</p>
<p>then run as zimbra user<br />
postmap /opt/zimbra/postfix/conf/sender_bcc</p>
<p>restart postfix -<br />
postfix reload</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aionsolution.com/blog/zimbra/zimbra-auto-bcc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zimbra / Ubuntu Backup and Restore</title>
		<link>http://www.aionsolution.com/blog/ubuntu/zimbra-ubuntu-backup-and-restore/</link>
		<comments>http://www.aionsolution.com/blog/ubuntu/zimbra-ubuntu-backup-and-restore/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 03:25:30 +0000</pubDate>
		<dc:creator>aionman</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.aionsolution.com/blog/?p=176</guid>
		<description><![CDATA[Ubuntu Backup and Restore 1: Backing-up To do this, become root with Code: sudo su and go to the root of your filesystem (we use this in our example, but you can go anywhere you want your backup to end up, including remote or removable drives.) Code: cd / Now, below is the full command [...]]]></description>
			<content:encoded><![CDATA[<p><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span></p>
<h2 style="border-bottom: 1px solid #aaaaaa; margin: 0px 0px 0.6em; color: black; background-image: none; font-weight: normal; padding-top: 0.5em; padding-bottom: 0.17em; font-size: 19px;">Ubuntu Backup and Restore</h2>
<hr style="color: #ffffff; background-color: #ffffff;" size="1" /><!-- / icon and title --><!-- message --></p>
<div id="post_message_175981" class="vbclean_msgtext">
<p><strong>1: Backing-up</strong></p>
<p>To do this, become root with</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;" dir="ltr">sudo su</pre>
</div>
<p>and go to the root of your filesystem (we use this in our example, but you can go anywhere you want your backup to end up, including remote or removable drives.)</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;" dir="ltr">cd /</pre>
</div>
<p>Now, below is the full command I would use to make a backup of my system:</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;" dir="ltr">tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /</pre>
</div>
<p>Since I always keep an update copy of my mail server, I’ll exclude that from the backup as well</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border-style: inset; border-width: 1px; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;" dir="ltr">tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exlucde=/backup --exclude=/opt/zimbra /</pre>
</div>
<p>Now, lets explain this a little bit.<br />
The ‘tar’ part is, obviously, the program we’re going to use.</p>
<p>‘cvpfz’ are the options we give to tar, like ‘create archive’ (obviously),<br />
‘preserve permissions’(to keep the same permissions on everything the same), and ‘gzip’ to keep the size down.</p>
<p>Next, the name the archive is going to get. backup.tgz in our example.</p>
<p>Next comes the root of the directory we want to backup. Since we want to backup everything; /</p>
<p>Now come the directories we want to exclude. We don’t want to backup everything since some dirs aren’t very useful to include. Also make sure you don’t include the file itself, or else you’ll get weird results.<br />
You might also not want to include the /mnt folder if you have other partitions mounted there or you’ll end up backing those up too. Also make sure you don’t have anything mounted in /media (i.e. don’t have any cd’s or removable media mounted). Either that or exclude /media.</p>
<p>EDIT : kvidell suggests below we also exclude the /dev directory. I have other evidence that says it is very unwise to do so though.</p>
<p>Well, if the command agrees with you, hit enter (or return, whatever) and sit back&amp;relax. This might take a while.</p>
<p>Afterwards you’ll have a file called backup.tgz in the root of your filessytem, which is probably pretty large. Now you can burn it to DVD or move it to another machine, whatever you like!</p>
<p>EDIT2:<br />
At the end of the process you might get a message along the lines of ‘tar: Error exit delayed from previous errors’ or something, but in most cases you can just ignore that.</p>
<p>Alternatively, you can use Bzip2 to compress your backup. This means higher compression but lower speed. If compression is important to you, just substitute<br />
the ‘z’ in the command with ‘j’, and give the backup the right extension.<br />
That would make the command look like this:</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;" dir="ltr">tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys /</pre>
</div>
<p><strong>2: Restoring</strong></p>
<p>Warning: Please, for goodness sake, be careful here. If you don’t understand what you are doing here you might end up overwriting stuff that is important to you, so please take care!</p>
<p>Well, we’ll just continue with our example from the previous chapter; the file backup.tgz in the root of the partition.</p>
<p>Once again, make sure you are root and that you and the backup file are in the root of the filesystem.</p>
<p>One of the beautiful things of Linux is that This’ll work even on a running system; no need to screw around with boot-cd’s or anything. Of course, if you’ve rendered your system unbootable you might have no choice but to use a live-cd, but the results are the same. You can even remove every single file of a Linux system while it is running with one command. I’m not giving you that command though! <img class="inlineimg" title="Wink" src="http://ubuntuforums.org/images/smilies/icon_wink.gif" border="0" alt="" /></p>
<p>Well, back on-topic.<br />
This is the command that I would use:</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;" dir="ltr"> tar xvpfz backup.tgz -C /</pre>
</div>
<p>Or if you used bz2;</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;" dir="ltr"> tar xvpfj backup.tar.bz2 -C /</pre>
</div>
<p>WARNING: this will overwrite every single file on your partition with the one in the archive!</p>
<p>Just hit enter/return/your brother/whatever and watch the fireworks. Again, this might take a while. When it is done, you have a fully restored Ubuntu system! Just make sure that, before you do anything else, you re-create the directories you excluded:</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 98px; text-align: left;" dir="ltr">mkdir proc
mkdir lost+found
mkdir mnt
mkdir sys
etc...</pre>
</div>
<p>And when you reboot, everything should be the way it was when you made the backup!</p>
<p><strong>2.1: GRUB restore</strong><br />
Now, if you want to move your system to a new harddisk or if you did something nasty to your GRUB (like, say, install Windows), You’ll also need to reinstall GRUB.<br />
There are several very good howto’s on how to do that here on this forum, so i’m not going to reinvent the wheel. Instead, take a look here:</p>
<p><a href="http://www.ubuntuforums.org/showthread.php?t=24113&amp;highlight=grub+restore" target="_blank">http://www.ubuntuforums.org/showthre…t=grub+restore</a></p>
<p>There are a couple of methods proposed. I personally recommend the second one, posted by remmelt, since that has always worked for me.</p></div>
<div class="smallfont"><strong>Re: HOWTO: Restore GRUB (if your MBR is messed up)</strong></div>
<hr style="color: #ffffff; background-color: #ffffff;" size="1" /><!-- / icon and title --><!-- message -->Isn’t it easier to do this:</p>
<p>1. Pop in the Live CD, boot from it until you reach the desktop.<br />
2. Open a terminal window or switch to a tty.<br />
3. Type &#8220;<span class="highlight">grub</span>&#8221;<br />
4. Type &#8220;root (hd0,6)&#8221;, or whatever your harddisk + boot partition numbers are (my /boot is at /dev/sda7, which translates to hd0,6 for <span class="highlight">grub</span>).<br />
5. Type &#8220;setup (hd0)&#8221;, ot whatever your harddisk nr is.<br />
6. Quit <span class="highlight">grub</span> by typing &#8220;quit&#8221;.<br />
7. Reboot.</p>
<p>I may be missing your point though, if so, please forgive me <img class="inlineimg" title="Smile" src="http://ubuntuforums.org/images/smilies/icon_smile.gif" border="0" alt="" /></p>
<div class="smallfont" style="margin-bottom: 2px;">Quote:</div>
<div>Originally Posted by <strong>vnbuddy2002</strong></div>
<div style="font-style: italic;"><span class="highlight">Restore</span> <span class="highlight">GRUB</span> quite simple in Ubuntu, instead going through all the &#8220;gain root access&#8221; and play with shell commands, you can use the Ubuntu installation CD to <span class="highlight">restore</span> it without going through all kinds of hassles.Here are the steps:</p>
<p>1. Boot your computer up with Ubunto CD<br />
2. Go through all the process until you reech &#8220;[!!!] Disk Partition&#8221;<br />
3. Select Manual Partition<br />
4. Mount your appropriate linux partions</p>
<p>/<br />
/boot<br />
swap<br />
…..</p>
<p>5. DO NOT FORMAT THEM.<br />
6. Finish the manual partition<br />
7. Say &#8220;Yes&#8221; when it asks you to save the changes<br />
8. It will give you errors saying that &#8220;the system couldn’t install …..&#8221; after that<br />
9. Ignore them, keep select &#8220;continue&#8221; until you get back to the Ubuntu installation menu<br />
10. Jump to &#8220;Install <span class="highlight">Grub</span> ….&#8221;<br />
11. Once it is finished, just restart your computer</p>
<p>Good luck!.</p></div>
<h2 style="border-bottom: 1px solid #aaaaaa; margin: 0px 0px 0.6em; color: black; background-image: none; font-weight: normal; padding-top: 0.5em; padding-bottom: 0.17em; font-size: 19px;"></h2>
<h2 style="border-bottom: 1px solid #aaaaaa; margin: 0px 0px 0.6em; color: black; background-image: none; font-weight: normal; padding-top: 0.5em; padding-bottom: 0.17em; font-size: 19px;"><span class="mw-headline">Zimbra Emergency Repairs</span></h2>
<p><a style="text-decoration: none; color: #002bb8; background-image: none;" name="Preparing_to_Back_Up"></a></p>
<h3 style="margin: 0px 0px 0.3em; color: black; background-image: none; font-weight: bold; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-style: none; font-size: 17px;"><span class="mw-headline">Preparing to Back Up</span></h3>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><em>Before we begin, make sure that you are logged in as a user that can perform the tasks outlined here.</em></p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">It is always good practice to backup your copy of Zimbra in the event of unforeseen circumstances.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">To prevent changes to any Zimbra databases during the backup processes you may wish to use:</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;su zimbra</pre>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;zmcontrol stop</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">to terminate Zimbra.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">If you get some kind of error, you may want to make sure that Zimbra has completly stopped by running:</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;ps auxww | grep zimbra</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">and kill any left over processes such as the log.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Alternatively as root you could run the following command to kill all Zimbra user owned processes instantly (use wisely):</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;ps auxww | awk '{print $1" "$2}' | grep zimbra | kill -9 `awk '{print $2}'`</pre>
<p><a style="text-decoration: none; color: #002bb8; background-image: none;" name="Backing_Up"></a></p>
<h3 style="margin: 0px 0px 0.3em; color: black; background-image: none; font-weight: bold; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-style: none; font-size: 17px;"><span class="mw-headline">Backing Up</span></h3>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><em>Make sure that the copy location has enough space to support your backup copy (i.e. the /tmp folder probably isn&#8217;t the best location).</em></p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Since all of the components Zimbra needs are stored in the Zimbra folder itself, you can simply copy the folder to a safe location.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">It may be possible to create a cron job to do these tasks automatically.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Copy Command: cp -Rp /opt/zimbra [location path]</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Depending on your hardware and the amount of data contained in your Zimbra installation, this process can take a while.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><strong>Note</strong>: It is a very good idea to tag your installation with the version/build of zimbra that will be backed up (ie 3.0.0_GA_156) and the date of backup. You&#8217;ll need this later.</p>
<p><a style="text-decoration: none; color: #002bb8; background-image: none;" name="Restoring"></a></p>
<h3 style="margin: 0px 0px 0.3em; color: black; background-image: none; font-weight: bold; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-style: none; font-size: 17px;"><span class="mw-headline">Restoring</span></h3>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><em>Before restoring, you should make sure that all of the processes accociated with the damaged/failed Zimbra installation are terminated. Failure to terminate all of the processes could have dire consquences. See &#8220;Preparing to Backup&#8221; for additional info.</em></p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">====Rename your &#8220;broken&#8221; Zimbra installation.&#8217;</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">You may be able to scavenge data, if needed. If you simply do not want the old data, you can skip this part.</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;mv /opt/zimbra [new location i.e. /tmp/zimbra-old]</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><em>You may want to move it completly out of the /opt folder just to be safe.</em></p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Copy your backup Zimbra installation to the /opt folder and name it &#8220;zimbra&#8221;.</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;cp -rp [location of backup] /opt</pre>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;mv /opt/[backup name] /opt/zimbra</pre>
<p><a style="text-decoration: none; color: #002bb8; background-image: none;" name="Restore_to_Existing.2FBackup_Zimbra_Server"></a></p>
<h4 style="margin: 0px 0px 0.3em; color: black; background-image: none; font-weight: bold; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-style: none; font-size: 15px;"><span class="mw-headline">Restore to Existing/Backup Zimbra Server</span></h4>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">In the event of a failure, you can either restore your /opt/zimbra folder to a server that is not currently running Zimbra and download a dummy copy of Zimbra and run an upgrade in order to clean everything up and make it run correctly again (see next section), or you may restore the backup to an existing Zimbra server. This will only work if the existing server is running the EXACT SAME VERSION of Zimbra as the backup you want to restore. Also, this has been tested and seems to work well with CE 4.5.8, but did not work with 4.5.7. This may be, for example, a backup email server that you want to always keep current with last night&#8217;s backup, so it can replace the production server on short notice in the event of a disaster.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Simply set up your backup server identical to your production server (preferably the same OS, but necessarily the exact same version of Zimbra). Any modifications you made or packages you added for your production server with regards to extra anti-spam protection, etc., should also be added to this server. Shut down Zimbra on the backup server. Copy /opt/zimbra from your backup to the backup server.</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">chown -R zimbra:zimbra /opt/zimbra
/opt/zimbra/libexec/zmfixperms</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Start Zimbra. Everything should work. The advantage to this method is that you can retain all your customizations (anti-spam modifications, for example) that would otherwise have been lost in the &#8220;upgrade&#8221; method. Also, this allows you to use a script to keep a backup server current without having to reinstall Zimbra after each time the backup server is made current, or before putting the backup server into production in the event of a failure.</p>
<p><a style="text-decoration: none; color: #002bb8; background-image: none;" name="Downloading_a_Dummy_Copy_of_Zimbra"></a></p>
<h4 style="margin: 0px 0px 0.3em; color: black; background-image: none; font-weight: bold; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-style: none; font-size: 15px;"><span class="mw-headline">Downloading a Dummy Copy of Zimbra</span></h4>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Now, we need to know what build/version of zimbra you were running. If you followed the backup instructions above, then the backup folder should be tagged with the version/build you have backed up.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">You need to download the full install of the Zimbra version you were running. You may find all Zimbra releases at:<span class="Apple-converted-space"> </span><a class="external text" style="text-decoration: none; color: #3366bb; background-image: url(http://wiki.zimbra.com/skins/monobook/external.png); background-repeat: no-repeat; padding-right: 13px; background-position: 100% 50%;" title="http://sourceforge.net/project/showfiles.php?group_id=153217" rel="nofollow" href="http://sourceforge.net/project/showfiles.php?group_id=153217">Sourceforge.</a></p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">If you don&#8217;t know your version number, you can find it by:</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><strong>Method 1</strong><span class="Apple-converted-space"> </span>- view install_history file.</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">cat /opt/zimbra/.install_history</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><strong>Method 2</strong><span class="Apple-converted-space"> </span>- dont think this will work unless you did a bunch of chroots.</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">zmcontrol -v</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Both of the above listed methods were from this<span class="Apple-converted-space"> </span><a class="external text" style="text-decoration: none; color: #3366bb; background-image: url(http://wiki.zimbra.com/skins/monobook/external.png); background-repeat: no-repeat; padding-right: 13px; background-position: 100% 50%;" title="http://www.zimbra.com/forums/showthread.php?t=8662" rel="nofollow" href="http://www.zimbra.com/forums/showthread.php?t=8662">forum post</a></p>
<p><a style="text-decoration: none; color: #002bb8; background-image: none;" name="Installing_the_Dummy_Copy_of_Zimbra"></a></p>
<h4 style="margin: 0px 0px 0.3em; color: black; background-image: none; font-weight: bold; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-style: none; font-size: 15px;"><span class="mw-headline">Installing the Dummy Copy of Zimbra</span></h4>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Once you have downloaded the tar file, you will need to uncompress it by:</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;tar -xvzf [name of file].tgz</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">This will create a folder in the directory named &#8220;zcs&#8221;, cd to it and run the install script:</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;cd zcs</pre>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;./install.sh</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><strong>WARNING</strong>: Do not run the script with the -u option. You will remove all of your backup data &amp; you must run the script as root, NOT ZIMBRA.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">The script will remove the existing packages, and install them again.<span class="Apple-converted-space"> </span><strong>The script will attempt to stop Zimbra Services and &#8220;UPGRADE FAILED &#8211; exiting&#8221;. This is okay, simply rerun the script, and it will install normally.</strong></p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">If you experence error 389, -1, connection refused errors, please search the Forums. These errors are covered extensivly.</p>
<p><a style="text-decoration: none; color: #002bb8; background-image: none;" name="Resetting_Permissions"></a></p>
<h4 style="margin: 0px 0px 0.3em; color: black; background-image: none; font-weight: bold; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-style: none; font-size: 15px;"><span class="mw-headline">Resetting Permissions</span></h4>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">If you are up and running now, you may have one more hurdle to overcome: permissions.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">You may need to reset the permissions on the message store by running the following:</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">&gt;/opt/zimbra/libexec/zmfixperms</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">This is potentially a dangerous suggestion, but if you have trouble getting tomcat to start even after you run zmfixperms, try running (worked for ZCS 4.5.7 CE)</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">chown -R zimbra:zimbra /opt/zimbra</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Of course, you must run</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">/opt/zimbra/libexec/zmfixperms</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">again after that. It appears that zmfixperms is supposed to chown zimbra:zimbra on something, but it misses it. This way, you chown EVERYTHING zimbra:zimbra, and zmfixperms puts back things that need to be owned as root, postfix, etc.</p>
<p><a style="text-decoration: none; color: #002bb8; background-image: none;" name="Disaster_Recovery"></a></p>
<h4 style="margin: 0px 0px 0.3em; color: black; background-image: none; font-weight: bold; padding-top: 0.5em; padding-bottom: 0.17em; border-bottom-style: none; font-size: 15px;"><span class="mw-headline">Disaster Recovery</span></h4>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">In the unfortunate event of losing your complete server or installation, the following will get you up and running.</p>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;"><strong>This has been tested successfully on v5.0.5</strong></p>
<ul style="margin: 0.3em 0px 0px 1.5em; padding: 0px; line-height: 1.5em; list-style-type: square; list-style-image: url(http://wiki.zimbra.com/skins/monobook/bullet.gif);">
<li style="margin-bottom: 0.1em;">The machine you are recovering to<span class="Apple-converted-space"> </span><strong>must</strong><span class="Apple-converted-space"> </span>have the same hostname as the original machine.</li>
</ul>
<ul style="margin: 0.3em 0px 0px 1.5em; padding: 0px; line-height: 1.5em; list-style-type: square; list-style-image: url(http://wiki.zimbra.com/skins/monobook/bullet.gif);">
<li style="margin-bottom: 0.1em;">Once you have your OS and all pre-requisites installed. Download and install Zimbra as normal.</li>
</ul>
<ul style="margin: 0.3em 0px 0px 1.5em; padding: 0px; line-height: 1.5em; list-style-type: square; list-style-image: url(http://wiki.zimbra.com/skins/monobook/bullet.gif);">
<li style="margin-bottom: 0.1em;">Once Zimbra is installed, stop all Zimbra services and move/rename the /opt/zimbra folder:</li>
</ul>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">sudo -u zimbra /opt/zimbra/bin/zmcontrol shutdown
mv /opt/zimbra /tmp/zimbra-old</pre>
<ul style="margin: 0.3em 0px 0px 1.5em; padding: 0px; line-height: 1.5em; list-style-type: square; list-style-image: url(http://wiki.zimbra.com/skins/monobook/bullet.gif);">
<li style="margin-bottom: 0.1em;">Uncompress the most recent backup file to the /opt/zimbra folder</li>
</ul>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">mkdir /opt/zimbra
tar zxvf [backup file] -C /opt/zimbra</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">or if you prefer&#8230;</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">tar zxvf [backup file] -C /tmp/zimbra-backup
cp -Rp /tmp/zimbra-backup /opt/zimbra</pre>
<ul style="margin: 0.3em 0px 0px 1.5em; padding: 0px; line-height: 1.5em; list-style-type: square; list-style-image: url(http://wiki.zimbra.com/skins/monobook/bullet.gif);">
<li style="margin-bottom: 0.1em;">Fix the Zimbra permissions</li>
</ul>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">chown -R zimbra:zimbra /opt/zimbra
/opt/zimbra/libexec/zmfixperms</pre>
<ul style="margin: 0.3em 0px 0px 1.5em; padding: 0px; line-height: 1.5em; list-style-type: square; list-style-image: url(http://wiki.zimbra.com/skins/monobook/bullet.gif);">
<li style="margin-bottom: 0.1em;">Restart all Zimbra services</li>
</ul>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">sudo -u zimbra /opt/zimbra/bin/zmcontrol startup
zmcontrol startup</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">You should now be able to access Zimbra as normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aionsolution.com/blog/ubuntu/zimbra-ubuntu-backup-and-restore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zimbra Account mailbox database structure</title>
		<link>http://www.aionsolution.com/blog/zimbra/zimbra-account-mailbox-database-structure/</link>
		<comments>http://www.aionsolution.com/blog/zimbra/zimbra-account-mailbox-database-structure/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 01:59:39 +0000</pubDate>
		<dc:creator>aionman</dc:creator>
				<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.aionsolution.com/blog/?p=173</guid>
		<description><![CDATA[Account mailbox database structure Each zimbra account is associated with a mailbox group, which is based on the mailbox id number. (The mailboxId is specific to the store, the zimbraId on the other hand is system wide). You can determine the mailbox id for an account (this example account is named &#8220;b@test.test&#8221;) like this: $ [...]]]></description>
			<content:encoded><![CDATA[<p><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="font-family: -webkit-sans-serif; font-size: 13px; line-height: 19px;"></p>
<h1 class="firstHeading" style="border-bottom: 1px solid #aaaaaa; margin: 0px 0px 0.1em; color: black; background-image: none; font-weight: normal; padding-top: 0.5em; padding-bottom: 0.17em; font-size: 24px;">Account mailbox database structure</h1>
<div id="bodyContent">
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">
Each zimbra account is associated with a mailbox group, which is based on the mailbox id number. (The mailboxId is specific to the store, the zimbraId on the other hand is system wide). You can determine the mailbox id for an account (this example account is named &#8220;b@test.test&#8221;) like this:</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">$ zmprov getMailboxInfo b@test.test
mailboxId: 5247
quotaUsed: 1951021</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Mailbox users are members of mailbox groups on a rotation up to a maximum of 100 mailbox groups; you can determine the mailbox group by modulo division of the mailbox id by 100 (the remainder of dividing the mailbox id by 100, i.e only the last two digits). Note that if the result is zero, the mailbox group is 100, not 0.</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">$ expr 5247 % 100
47</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Take a look at the mail_item table in the mailbox group database, particularly the date, size, sender, and subject columns.</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">$ mysql mboxgroup47
mysql&gt; describe mail_item;
+--------------+---------------------+------+-----+---------+-------+
| Field        | Type                | Null | Key | Default | Extra |
+--------------+---------------------+------+-----+---------+-------+
| mailbox_id   | int(10) unsigned    | NO   | PRI |         |       |
| id           | int(10) unsigned    | NO   | PRI |         |       |
| type         | tinyint(4)          | NO   |     |         |       |
| parent_id    | int(10) unsigned    | YES  |     | NULL    |       |
| folder_id    | int(10) unsigned    | YES  |     | NULL    |       |
| index_id     | int(10) unsigned    | YES  |     | NULL    |       |
| imap_id      | int(10) unsigned    | YES  |     | NULL    |       |
| date         | int(10) unsigned    | NO   |     |         |       |
| size         | int(10) unsigned    | NO   |     |         |       |
| volume_id    | tinyint(3) unsigned | YES  | MUL | NULL    |       |
| blob_digest  | varchar(28)         | YES  |     | NULL    |       |
| unread       | int(10) unsigned    | YES  |     | NULL    |       |
| flags        | int(11)             | NO   |     | 0       |       |
| tags         | bigint(20)          | NO   |     | 0       |       |
| sender       | varchar(128)        | YES  |     | NULL    |       |
| subject      | text                | YES  |     | NULL    |       |
| name         | varchar(128)        | YES  |     | NULL    |       |
| metadata     | text                | YES  |     | NULL    |       |
| mod_metadata | int(10) unsigned    | NO   |     |         |       |
| change_date  | int(10) unsigned    | YES  |     | NULL    |       |
| mod_content  | int(10) unsigned    | NO   |     |         |       |
+--------------+---------------------+------+-----+---------+-------+</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Let&#8217;s examine a single mail item.</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">mysql&gt; select * from mail_item where id&gt;26000 and mailbox_id=5247 limit 1 \G
*************************** 1. row ***************************
  mailbox_id: 5247
          id: 26001
        type: 5
   parent_id: NULL
   folder_id: 2
    index_id: 26001
     imap_id: 26001
        date: 1182380903
        size: 95842
   volume_id: 1
 blob_digest: rbrw+fj0tvyvTPt2haxssued7,A=
      unread: 1
       flags: 2
        tags: 0
      sender: sender@domain.com
     subject: Message subject
        name: NULL
    metadata: d1:f147:This message...1:p8:Re: SF: 1:s21:sender@domain.com1:vi10ee
mod_metadata: 30102
 change_date: 1182380905
 mod_content: 30102
1 row in set (0.00 sec)</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">With the volume_id, mailbox_id, id, and mod_content fields, you can determine the location of the message &#8220;blob&#8221; file. Volume 1 is the default message store:</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">mysql&gt; select * from zimbra.volume;
+----+------+----------+-------------------+-----------+-----------------+--------------+--------------------+----------------+-----------------------+
| id | type | name     | path              | file_bits | file_group_bits | mailbox_bits | mailbox_group_bits | compress_blobs | compression_threshold |
+----+------+----------+-------------------+-----------+-----------------+--------------+--------------------+----------------+-----------------------+
|  1 |    1 | message1 | /opt/zimbra/store |        12 |               8 |           12 |                  8 |              0 |                  4096 |
|  2 |   10 | index1   | /opt/zimbra/index |        12 |               8 |           12 |                  8 |              0 |                  4096 |
+----+------+----------+-------------------+-----------+-----------------+--------------+--------------------+----------------+-----------------------+</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">On the filesystem, the user directories and the message directories within each user directory are split so that there are a maximum of 4096 (that is, 2<sup>12</sup>) files in each directory. To determine the appropriate directory &#8220;hash&#8221; numbers, bitshift the mailbox_id and the mail item id to the right by 12 bits (i.e. divide by 2<sup>12</sup>, rounding down). It is significant to note that if the id is less than 4096, the hash number will be 0.</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">$ perl -e 'print 5247 &gt;&gt; 12 ; print "\n"'
1
$ perl -e 'print 26001 &gt;&gt; 12 ; print "\n"'
6</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">The mod_content field is used to keep track of message blob file revisions. If a blob file is ever updated (for example, if a calendar appointment is modified), the filename and this field are updated. So, if the user with mailbox_id 5427 has a message on volume 1 with id 26001 and mod_content 30102, we&#8217;ll see it like this:</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">$ ls -l /opt/zimbra/store/1/5247/msg/6/26001-30102.msg
-rw-r-----  1 zimbra zimbra 95842 Jun 20 16:08 /opt/zimbra/store/1/5247/msg/6/26001-30102.msg</pre>
<p style="margin: 0.4em 0px 0.5em; line-height: 1.5em;">Assuming only the default message store is in use, the filename for an item may be derived with a query.</p>
<pre style="border: 1px dashed #2f6fab; padding: 1em; color: black; background-color: #f9f9f9; line-height: 1.1em;">mysql&gt; select id,
    concat('/opt/zimbra/store/', (mailbox_id &gt;&gt; 12), '/', mailbox_id, '/msg/',
    (id &gt;&gt; 12), '/', id, '-', mod_metadata, '.msg') as file
    from mail_item where mailbox_id="723" limit 1;
+-----+-------------------------------------------+
| id  | file                                      |
+-----+-------------------------------------------+
| 261 | /opt/zimbra/store/0/723/msg/0/261-103.msg |
+-----+-------------------------------------------+</pre>
</div>
<p></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aionsolution.com/blog/zimbra/zimbra-account-mailbox-database-structure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zimbra slow response on SMTP</title>
		<link>http://www.aionsolution.com/blog/ubuntu/zimbra-reponse-slow-on-smtp/</link>
		<comments>http://www.aionsolution.com/blog/ubuntu/zimbra-reponse-slow-on-smtp/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 01:26:37 +0000</pubDate>
		<dc:creator>aionman</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.aionsolution.com/blog/?p=147</guid>
		<description><![CDATA[Zimbra reponse with 5-10s before SMTP banner 220 mail.example.com ESMTP Postix Need to do a trace at the server tcpdump -s 1500  -w /tmp/server_trace.pcap Looking at a wireshark trace, i see the server sending out &#8220;MDNS&#8221; packets which was installed along with ubuntu-desktop. sudo update-rc.d -f avahi-daemon remove /etc/init.d/avahi-daemon stop]]></description>
			<content:encoded><![CDATA[<p>Zimbra reponse with 5-10s before SMTP banner<br />
220 mail.example.com ESMTP Postix</p>
<p>Need to do a trace at the server<br />
tcpdump -s 1500  -w /tmp/server_trace.pcap</p>
<p>Looking at a wireshark trace, i see the server sending out &#8220;MDNS&#8221; packets which was installed along with ubuntu-desktop.</p>
<p>sudo update-rc.d -f avahi-daemon remove<br />
/etc/init.d/avahi-daemon stop</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aionsolution.com/blog/ubuntu/zimbra-reponse-slow-on-smtp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Zimbra on Ubuntu</title>
		<link>http://www.aionsolution.com/blog/ubuntu/install-zimbra-on-ubuntu/</link>
		<comments>http://www.aionsolution.com/blog/ubuntu/install-zimbra-on-ubuntu/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 05:25:25 +0000</pubDate>
		<dc:creator>aionman</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Zimbra]]></category>

		<guid isPermaLink="false">http://www.aionsolution.com/blog/?p=145</guid>
		<description><![CDATA[Ubuntu 8.04 LTS Server (Hardy Heron) Install Guide The following guide is for installing ZCS on Ubuntu Server 8.04 LTS, and is a revision of my previous Ubuntu Server 6.06 installation guide here. Please verify which version you are using and follow the appropriate guide, as there are material differences between the two. I have tested [...]]]></description>
			<content:encoded><![CDATA[<h1 class="firstHeading">Ubuntu 8.04 LTS Server (Hardy Heron) Install Guide</h1>
<div id="bodyContent">
<p>The following guide is for installing ZCS on Ubuntu Server 8.04 LTS, and is a revision of my previous Ubuntu Server 6.06 installation guide <a class="external text" title="http://wiki.zimbra.com/index.php?title=Ubuntu_6.06_Server_%28Dapper_Drake%29_Beginner%27s_Install_Guide" rel="nofollow" href="http://wiki.zimbra.com/index.php?title=Ubuntu_6.06_Server_%28Dapper_Drake%29_Beginner%27s_Install_Guide">here</a>. Please verify which version you are using and follow the appropriate guide, as there are material differences between the two. I have tested this guide with the 32-bit version of Ubuntu only; others will need to verify if any tweaks are necessary for a 64-bit installation.</p>
<p>This installation is for a split-DNS setup, where the server resides on a DMZ and so needs to resolve to its own internal (DMZ subnet) IP address rather than the public IP address that is published to the world. This is a setting where a firewall/router supplies the translation from the public IP to the DMZ IP (DNAT&#8211;Destination Network Address Translation) so that translation is not known to the server itself. This configuration is desirable for security, but it makes bits of the Zimbra configuration more complex than they might otherwise be.</p>
<p>For simplicity&#8217;s sake I&#8217;m referring to Zimbra&#8217;s DMZ address as the &#8220;private ip address&#8221; from here on. By that I mean that the Zimbra box has only one IP address, it&#8217;s on the DMZ, and can be seen by my LAN but not the public. When I say &#8220;public IP address&#8221; I&#8217;m not talking about another address on the Zimbra box, but rather the address that gets DNATed to my box and which is resolved in the world.</p>
<table id="toc" class="toc" border="0" summary="Contents">
<tbody>
<tr>
<td>
<div id="toctitle">
<h2>Contents</h2>
<p><span class="toctoggle">[<a id="togglelink" class="internal" href="javascript:toggleToc()">hide</a>]</span></div>
<ul>
<li class="toclevel-1"><a href="http://wiki.zimbra.com/index.php?title=Ubuntu_8.04_LTS_Server_(Hardy_Heron)_Install_Guide#Installing_Ubuntu_8.04_LTS"><span class="tocnumber">1</span> <span class="toctext">Installing Ubuntu 8.04 LTS</span></a></li>
<li class="toclevel-1"><a href="http://wiki.zimbra.com/index.php?title=Ubuntu_8.04_LTS_Server_(Hardy_Heron)_Install_Guide#DNS"><span class="tocnumber">2</span> <span class="toctext">DNS</span></a></li>
<li class="toclevel-1"><a href="http://wiki.zimbra.com/index.php?title=Ubuntu_8.04_LTS_Server_(Hardy_Heron)_Install_Guide#Hosts_Table"><span class="tocnumber">3</span> <span class="toctext">Hosts Table</span></a></li>
<li class="toclevel-1"><a href="http://wiki.zimbra.com/index.php?title=Ubuntu_8.04_LTS_Server_(Hardy_Heron)_Install_Guide#Installing_ZCS"><span class="tocnumber">4</span> <span class="toctext">Installing ZCS</span></a></li>
<li class="toclevel-1"><a href="http://wiki.zimbra.com/index.php?title=Ubuntu_8.04_LTS_Server_(Hardy_Heron)_Install_Guide#Directory_Permissions_on_.2Ftmp"><span class="tocnumber">5</span> <span class="toctext">Directory Permissions on /tmp</span></a></li>
<li class="toclevel-1"><a href="http://wiki.zimbra.com/index.php?title=Ubuntu_8.04_LTS_Server_(Hardy_Heron)_Install_Guide#Sending_Mail_from_Terminal_.28optional.29"><span class="tocnumber">6</span> <span class="toctext">Sending Mail from Terminal (optional)</span></a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<p><a name="Installing_Ubuntu_8.04_LTS"></a></p>
<h1><span class="mw-headline">Installing Ubuntu 8.04 LTS</span></h1>
<p>Obtain your installation binary from Ubuntu at <a class="external free" title="http://www.ubuntu.com/getubuntu/download" rel="nofollow" href="http://www.ubuntu.com/getubuntu/download">http://www.ubuntu.com/getubuntu/download</a>. Be sure you download the LTS (Longterm Support) Server Edition, NOT the Desktop Edition. Burn the iso file to a CD and boot it in your server. There is an excellent, highly-detailed installation guide for this version at <a class="external free" title="http://www.howtoforge.com/perfect-server-ubuntu8.04-lts" rel="nofollow" href="http://www.howtoforge.com/perfect-server-ubuntu8.04-lts">http://www.howtoforge.com/perfect-server-ubuntu8.04-lts</a>. I highly recommend this guide, particularly if you are new to Linux or Ubuntu specifically. The following points need to be kept in mind as you install:</p>
<p>1) The installation (and the guide) want to configure your LAN via DHCP. Cancel it before it gets that far, and manually configure it with a static IP address, netmask, and gateway. Don&#8217;t put in a public DNS for your nameserver configuration; instead put in the same IP address that you just gave the machine for its own static IP (this won&#8217;t let you resolve names on the internet until we do some more configuration below, but it saves headaches later).</p>
<p>2) When the installation asks for a hostname, give it only a one-word hostname (e.g. &#8220;mail&#8221; or &#8220;myserver&#8221;) NOT the fully-qualified domain name (mail.mydomain.com). In the next screen where it asks for the domain name, give the &#8220;mydomain.com&#8221; part without the hostname.</p>
<p>3) Hard disk configuration is easy if you are using a single drive, but for a server, that&#8217;s not the most secure way to do things. Ideally you should have either a RAID-1 or a RAID 1+0 configuration for your disks to provide redundancy. Most ideally that would be hardware-RAID, but configuring it in Ubuntu is a challenge. Software RAID (native to Linux) on the other hand, is easy IF you set it up AT THE TIME YOU ARE PARTITIONING YOUR DISKS. See this howto <a class="external free" title="http://www.howtoforge.com/how-to-install-ubuntu8.04-with-software-raid1" rel="nofollow" href="http://www.howtoforge.com/how-to-install-ubuntu8.04-with-software-raid1">http://www.howtoforge.com/how-to-install-ubuntu8.04-with-software-raid1</a> for setup instructions if you want to use software RAID. As to partitioning your drives, you can find a variety of opinions. I just make a small partition for swap (1.5-2x RAM) and the rest for the whole system. Others will recommend separate partitions for mailstore, system, etc. Use your own judgement here.</p>
<p>4) Once the base system has been installed, the installer will ask you for a username, and then a password for that user. This needs to be a non-root user, and unlike previous Ubuntu versions, the user &#8220;admin&#8221; is no longer accepted. Whatever you choose, that username and password will be what you use to log in at the command line later, and the same password will be the password for sudo commands. Be sure you remember what you put in here!</p>
<p>5) At the &#8220;Software Selection&#8221; screen, select the DNS Server and OpenSSH Server options for installation, but nothing else. This will allow remote administration (SSH), and will install bind9 which you will need for split DNS.</p>
<p>6) Run the following command to make sure you have all the necessary packages: sudo apt-get install bind9 dnsutils file libgmp3c2 libexpat1 libstdc++5 libltdl3 libperl5.8 perl curl libpcre3 libc6</p>
<p>With these items, your installation will complete and the system will reboot.</p>
<p class="MsoNormal"><span lang="EN-US">This guide shows how to install the </span><span lang="EN-US"><a href="http://www.zimbra.com/" target="_blank"><span>Zimbra Collaboration Suite (ZCS)</span></a></span><span lang="EN-US"> on Ubuntu 6.10 (Edgy Eft) and 6.06 (Dapper Drake) server systems. Zimbra is a full-featured, open source collaboration suite &#8211; email, group calendaring, contacts, and web document management and authoring. It has a feature-rich AJAX web interface and is compatible with clients such as Microsoft Outlook, Apple Mail, and Novell Evolution so that mail, contacts, and calendar items can be synchronised from these to the ZCS server. It can also be synchronized to many mobile devices. ZCS makes use of many existing open source projects such as Postfix, MySQL, and OpenLDAP.</span></p>
<p class="MsoNormal"><span lang="EN-US">I do not issue any guarantee that this will work for you!</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<div>
<p class="MsoNormal"><strong>1.1 Enable The root Account</strong></p>
</div>
<p class="MsoNormal"><span lang="EN-US">To enable the root account, run</span></p>
<div>
<p class="MsoNormal"><em><span lang="EN-US">sudo passwd root</span></em></p>
</div>
<p class="MsoNormal"><span lang="EN-US">and specify a password for root.</span></p>
<p class="MsoNormal"><span lang="EN-US">Afterwards, become root by running</span></p>
<div>
<p class="MsoNormal"><em><span lang="EN-US">su</span></em></p>
</div>
<p class="MsoNormal"><span lang="EN-US">All following commands in this tutorial are executed as root (unless something else is written)!</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<div>
<p class="MsoNormal"><strong><span lang="EN-US"><span>1.2 Install The SSH Daemon</span></span></strong></p>
</div>
<p class="MsoNormal"><span lang="EN-US">Just run</span></p>
<div>
<p class="MsoNormal"><em><span lang="EN-US">apt-get install ssh openssh-server</span></em></p>
</div>
<p class="MsoNormal"><span lang="EN-US">to install the SSH daemon.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<div>
<p class="MsoNormal"><strong><span lang="EN-US"><span>1.3 Apply A Static IP Address And Hostname</span></span></strong></p>
</div>
<p class="MsoNormal"><span lang="EN-US">Edit </span><em><span lang="EN-US">/etc/network/interfaces </span></em><span lang="EN-US">and adjust it to your needs (in this example setup I will use the IP address </span><em><span lang="EN-US">192.168.0.110</span></em><span lang="EN-US">):</span></p>
<div>
<p class="MsoNormal"><em><span lang="EN-US">vi /etc/network/interfaces</span></em></p>
</div>
<div>
<table class="MsoNormalTable" style="width: 90%;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top">
<div>
<p class="MsoNormal"><span lang="EN-US"><span># This file describes the network interfaces available on your system</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span># and how to activate them. For more information, see interfaces(5).</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span> </span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span># The loopback network interface</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>auto lo</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>iface lo inet loopback</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span> </span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span># The primary network interface</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>auto eth0</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>iface eth0 inet static</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span><span> </span>address 192.168.0.110</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span><span> </span>netmask 255.255.255.0</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span><span> </span>network 192.168.0.0</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span><span> </span>broadcast 192.168.0.255</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span><span> </span>gateway 192.168.0.1</span></span></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span lang="EN-US">Then restart your network:</span></p>
<div>
<p class="MsoNormal"><em><span lang="EN-US">/etc/init.d/networking restart</span></em></p>
</div>
<p class="MsoNormal"><span lang="EN-US">Then edit </span><em><span lang="EN-US">/etc/hosts</span></em><span lang="EN-US">. Make it look like this:</span></p>
<div>
<p class="MsoNormal"><em><span lang="EN-US">vi /etc/hosts</span></em></p>
</div>
<div>
<table class="MsoNormalTable" style="width: 90%;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top">
<div>
<p class="MsoNormal"><span lang="EN-US"><span>127.0.0.1<span> </span>localhost.localdomain<span> </span>localhost</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>192.168.0.110<span> </span>mail.example.com<span> </span>mail</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span> </span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span># The following lines are desirable for IPv6 capable hosts</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>::1<span> </span>ip6-localhost ip6-loopback</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>fe00::0 ip6-localnet</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>ff00::0 ip6-mcastprefix</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>ff02::1 ip6-allnodes</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>ff02::2 ip6-allrouters</span></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>ff02::3 ip6-allhosts</span></span></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span lang="EN-US">Now run</span></p>
<div>
<p class="MsoNormal"><em><span lang="EN-US">echo mail.example.com &gt; /etc/hostname</span></em></p>
</div>
<p class="MsoNormal"><span lang="EN-US">and reboot the system:</span></p>
<div>
<p class="MsoNormal"><em><span lang="EN-US">shutdown -r now</span></em></p>
</div>
<p class="MsoNormal"><span lang="EN-US">Afterwards, run</span></p>
<div>
<p class="MsoNormal"><em><span lang="EN-US">hostname<br />
hostname -f</span></em></p>
</div>
<p class="MsoNormal"><span lang="EN-US">Both should show </span><em><span lang="EN-US">mail.example.com</span></em><span lang="EN-US">.</span></p>
<p class="MsoNormal"><span lang="EN-US">From now on you can use an SSH client such as </span><span lang="EN-US"><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank"><span>PuTTY</span></a></span><span lang="EN-US"> and connect from your workstation to your Ubuntu server and follow the remaining steps from this tutorial.</span></p>
<p><a name="DNS"></a></p>
<h1><span class="mw-headline">DNS</span></h1>
<p>Proper DNS configuration is PARAMOUNT! If you don&#8217;t have your DNS working properly, don&#8217;t even bother trying to install Zimbra, because trying to fix DNS after the fact may result in an install that can do everything except send mail&#8211;even from a Zimbra user to himself! So I&#8217;ll say it again:</p>
<p><strong>If you can&#8217;t resolve your mailserver&#8217;s own private IP address (NOT the public IP) using nslookup, fix it BEFORE you install Zimbra!</strong></p>
<p>If your installation above was successful, when you sign on at the command line you&#8217;ll be able to ping public IP addresses if you know them, but you may not be able to resolve any names to ping them.</p>
<p>Now you have to configure the following files, which are in the directory /etc/bind (for brevity I&#8217;ve deleted the generic comment lines included by the distro). Note that the query-source address and forwarders lines are already there, they just need to be uncommented, and in the case of the forwarders, the ip addresses of your ISP&#8217;s DNS servers need to be added. Note also that the syntax needs to be EXACTLY as shown below&#8211;leave out one semicolon or bracket and the whole thing blows up:</p>
<p>/etc/bind/named.conf.options</p>
<pre>options {
        directory "/var/cache/bind";

        query-source address * port 53;

        forwarders {
                xxx.xxx.xxx.xxx; xxx.xxx.xxx.xxx;
        };

        auth-nxdomain no;    # conform to RFC1035

};</pre>
<p>the ip addresses on this file are public ip addresses of the DNS you use in the outside world. The line &#8220;query-source address * port 53&#8243; is to allow your machine to hit the DNS if oddball DNS ports are blocked. You can leave it commented if you don&#8217;t need it.</p>
<p>Check /etc/resolv.conf and make sure it looks like this:</p>
<pre>nameserver xxx.xxx.xxx.xxx</pre>
<p>The IP address here should be the Zimbra box&#8217;s private ip address.</p>
<p>Once you&#8217;ve fixed these two files and restarted bind</p>
<pre>/etc/init.d/bind9 restart</pre>
<p>you should be able to resolve names in the outside world. Try something like &#8220;ping google.com&#8221; and if you get an answer, you&#8217;re on the way.</p>
<p>Now it&#8217;s time to get the internal zone working. Append the following lines to /etc/bind/named.conf.local</p>
<pre>        zone "mydomain.com"  {
                type master;
                file "/etc/bind/db.mydomain.com";
        };</pre>
<p>Note that you need to type the full pathname to your db.* file. Also, be sure you don&#8217;t miss a semicolon &#8220;;&#8221; in any of these lines that have them because a missing semicolon breaks the file.</p>
<p>Now create your file /etc/bind/db.mydomain.com</p>
<pre>;
; BIND data file for mydomain.com
;
$TTL    604800
@       IN      SOA     mail.mydomain.com. admin.mydomain.com. (
                         070725         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      mail
        IN      MX      10 mail
        IN      A       xxx.xxx.xxx.xxx
mail    IN      A       xxx.xxx.xxx.xxx</pre>
<p>The ip address here is again your Zimbra internal ip address; the string &#8220;admin.mydomain.com&#8221; is replaced with the email address you are using for administration, only with a &#8220;.&#8221; instead of the &#8220;@&#8221; in the address. Be careful to increment the serial number one higher every time you modify this file or the changes won&#8217;t stick. Many users use the date they edit the file for the serial number, but as long as you start low and only get higher it really doesn&#8217;t matter.</p>
<p>Now you may need to reboot the machine (restarting bind9 alone doesn&#8217;t always work) and try to resolve your mail server.</p>
<pre>nslookup mydomain.com</pre>
<p>If it returns your public IP address, your internal DNS is not working. If things are configured correctly it&#8217;ll return the internal address.</p>
<p><a name="Hosts_Table"></a></p>
<h1><span class="mw-headline">Hosts Table</span></h1>
<p>Before you get to the install you also need to modify your /etc/hosts file:</p>
<pre>127.0.0.1       localhost.localdomain   localhost
10.3.2.244      mail.tractor-equip.net  mail</pre>
<p>ONLY IF this is working, it&#8217;s now time to update your packages:</p>
<pre>sudo bash (this will ask for your password, enter your administrator's pw, then you'll be at a root prompt)
apt-get upgrade
apt-get update</pre>
<p>Now you&#8217;re ready to install Zimbra.</p>
<p><a name="Installing_ZCS"></a></p>
<h1><span class="mw-headline">Installing ZCS</span></h1>
<p>Several discussion groups have listed the dependencies not installed by the standard Linux install, but the easy thing to do is try to run the install and let Zimbra give you a list of what&#8217;s missing. Download the appropriate package for your Ubuntu installation (32 or 64 bit Ubuntu 8.04 LTS), copy it into your choice directory (I prefer /temp because /tmp is volatile and clears out every reboot), change to that directory, and type</p>
<pre>tar -xzf zc*</pre>
<p>and it&#8217;ll create a whole directory /temp/zcs with lots of files inside it. Then:</p>
<pre>cd /temp/zcs
./install.sh</pre>
<p>It&#8217;s not going to work the first time, but it&#8217;ll give you a list of missing dependencies. Write down all the package names it says are missing. Your list may be slightly different than mine, but whatever it is, load them. Just separate each package name with a space like this:</p>
<pre>apt-get install libpcre3 libgmp3c2 libstdc++5</pre>
<p>Now re-run your Zimbra install and accept all the defaults except:</p>
<p>When it asks you for your domain, it&#8217;s going to have your fully-qualified domain name (hostname.mydomain.com) rather than just the domain, and probably complain about not having an MX record. Change the hostname to just mydomain.com and it&#8217;ll find the names through nslookup, and it&#8217;ll be happy. The rest of the install should proceed without errors, except that toward the end it&#8217;s going to ask you to &#8220;Adress unconfigured items&#8221; but, if you&#8217;re doing this from the console and not from an SSH connection with a buffer, the actual item that&#8217;s unconfigured is off the screen and invisible. It&#8217;s the admin password, which is in menu item 3.</p>
<p>Finally, when the install is done and it has given you the last &#8220;press Enter to finish&#8221; you are almost done. I recommend at this point that you convert your webmail to use https rather than http. This is a security question, but it is also discretionary. If you choose to do this, then at the command prompt, type:</p>
<pre>su - zimbra
zmtlsctl https</pre>
<p>Now reboot the system, and when it comes back up,give it a couple minutes to start the rest of the Zimbra processes. If your installation is successful, you can go to https://xxx.xxx.xxx.xxx:7071 (your internal ip address again) to get the administrative console, or</p>
<p>https://xxx.xxx.xxx.xxx to log in as a user.</p>
<p>Congratulations&#8211;one shiny new Zimbra installation on Ubuntu!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.aionsolution.com/blog/ubuntu/install-zimbra-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

