Solved : Can’t Attach Document Files in Zimbra HTML Mode

Posted by

Some of our clients told us about the problem of attaching document files from Zimbra webmail in HTML mode. They can upload pdf or image files like jpg and png. But not with document files like docx, doc, etc. The problem appears after updating Zimbra to the latest version (8.8.15).

I tried on my Zimbra to ensure the problem. The results are the same on my Zimbra dev. Which is installed above Docker. I can’t attach certain types of document files in HTML mode. But it works if use Advanced mode 🙂 . I rarely use HTML mode when using Zimbra webmail 🙂

When trying upload certain types of document files in HTML mode, i get an error “A client error occurred. Please try again.”. And in the mailbox.log, I get an error like this

Caused by: java.lang.IllegalArgumentException: MIME type may not be null
	at org.apache.http.util.Args.notBlank(
	at org.apache.http.entity.ContentType.create(
	at org.apache.http.entity.ContentType.create(
	at com.zimbra.client.ZMailbox.uploadAttachments(

I tried several methods to make HTML mode normal again. Like replace webapps on Zimbra 8.8.15 with webapps on Zimbra 8.8.12. But, the problem still exist 😀 . Until I try below method and it works 😀

Attention: Please do with your own risk. I am not a programmer. I don’t know if what I’m doing is right or not. I have tried it in my environment and everything is normal. This solution can be a temporary solution. Until Zimbra released the right way to solve the problem 😀

Please backup httpcore first as root user

mkdir /srv/jetty_base-common-lib
cp /opt/zimbra/jetty_base/common/lib/httpcore-4.4.11.jar /srv/jetty_base-common-lib/
rm /opt/zimbra/jetty_base/common/lib/httpcore-4.4.11.jar

Download httpcore-4.4.5 from my Github. This httpcore I got from Zimbra 8.8.12

cd /opt/zimbra/jetty_base/common/lib/
wget -c

Then, restart Zimbra Mailbox

su - zimbra -c 'zmmailboxdctl restart'

Please try to upload the document file using HTML mode. The problem should have been resolved.

Good luck 🙂


  1. Hi, i have a similar problem: in a message i try to attach a file .p7m in webui, ajax version, but is not possible, when i click ok the file disappears. In the log file there is no error. I use 8.8.15 GA FOSS edition Patch P6 in Ubuntu 18.04


    1. Hello Stefano,
      I try on my Zimbra Dev and file .p7m can attach normally. Please make sure the extension did not block from Zimbra Admin | Global Settings | Extensions

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.