Ubuntu Zimbra

Zimbra Bricollage

Damit es nicht vergessen geht. Falsch gemachtes Zimbra Updgrade zusammen mit LTS Upgrade.

Siehe auch

Zimbra Pakete deinstallieren:
dpkg --get-selections | grep zimbra | awk '{ print $1 }' | xargs apt-get -y remove

Sparse Files:

Fix LDAP Sparse File:

How to upgrade with Ubuntu dist-upgrade:
How to upgrade Zimbra/ZCS 8.8 GA from Ubuntu 14.04 LTS to 16.04 LTS
KVM Snapshots
Ubuntu Zimbra

Upgrading Zimbra and Ubuntu to 8.6 and Trusty

I’ve started with Zimbra 8.0.7 and Ubuntu Precise. The goal was to have both OS and ZCS at the newest stable version. Here was my way to do it:

  • Upgrading ZCS to 8.0.9 (latest 8.0) for Ubuntu12
  • Installing HWE Kernel Packages for Precise
  • Upgrading ZCS to 8.6 using Ubuntu12 Packages
  • Dist-upgrading Ubuntu to Trusty

So far so good. After the dist-upgrade to trusty, Zimbra will not start anymore. This was somehow predicted. But running the Zimbra Installer for Ubuntu14 just bailed out, giving an Perl library error.

The trick was, to use the with the following option:

./ –skip-upgrade-check

Additionally, also skip the database integrity check (for this time). This did the trick for me.


Automatically Deleting Sent Mails

The fancy ZCS backend GUI has built-in features for Trash and Spam folders, to automatically delete mails after a certain time. To have this feature also for the Sent folder, use this command line to enhance the Class of Service:

zmprov mc <cosname> zimbraPrefSentLifetime 60d


Exporting Zimbra Mailboxes

When people leave the enterprise, their mailboxes should get backed up before the mail account is being deleted. Reliable Penguin has got a handy one-liner to get a ZIP archive of a particular mail box:

/opt/zimbra/bin/zmmailbox -z -m getRestURL '//?fmt=zip&query=is:anywhere' >

To restore it (if needed), do:

/opt/zimbra/bin/zmmailbox -z -m postRestURL '//?fmt=zip&resolve=reset'


Moving Mail Folders between Accounts in Zimbra

Zimbra ZCS does not allow you to move folders out of a single account. Even if you have a linked folder in your subtree and admin rights to this folder – it really doesn’t work. Either you get a ‘red’ icon on dragging or you get a mail.CANNOT_COPY exception. A bug on that had been filed and most likely a developer wrote, that every action on dragging folders between accounts should be disabled in GUI.

Workaround No1 is to have the affected accounts set-up in an IMAP email client like Thunderbird, Apple Mail or whatever you prefer. This might work if you need to drag some few mails in one folder. But when it comes – like it was my task – to some hundred subfolders in a complex structure and about 1.5GB mails, every, really every mail client get’s screwed up.

The real working solution is to use ‘imapsync (which Zimbra is presenting as _the_ migration tool to get emails into Zimbra ZCS). It synchronises two IMAP accounts which may be on different servers and is highly configurable. You can configure it to only syncing one directory, with or without subdirectores recursivly (–folder or –folderrec). After using imapsync you’ll get what you need: copyed mails. After you assured that everything is ok on the target side, you may delete the original folder structure.

One work on IMAP email clients: Most of the clients are not really talkative when they are getting to an error. Worst of all was Evolution, which primarly was moving the folders (and having it in a virtual machine on my Mac ended in a not working control key to have the folders copyed). It moved the folders accordingly – but left the mails unmoved. Since the original folders had been moved, the mails had vanished (and I was lucky to have a nice backup of our server).

Thunderbird just stopped in the middle of its work and seemed to have its work done fine. Additionally, afterwards some folders had not been visible (and could not have made visible even through subscriptions). They had just been unavailable. And also every single folder needs its single subscription. On a few hundred folders a real PITA.

Apple Mail was half way nice. It also stopped it’s work after short time, giving an error message which was: “” (empty string between two double-apostrophs). And last but not least KMail did not manage to synchronise the IMAP folder. It ended on hundreds of error messages, saying “too many files open /home/xxx/.kmail/….”. And Window Live Mail (I even tried that one!) is not capable to move mails between different folders.