Difference between revisions of "Disable Indexing for Specific File Types"

 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Introduction =
+
{{Archive}}{{Article Infobox|{{admin}}|||{{ZCS 4.5}}}}= Introduction =
It may be necessary to disable attachment indexing for specific mimetypes if conversion is unable to process the attachments due to size or other error.  When disabled, conversion will be bypassed for only specified mimetypes.  Attachment indexing can be disabled for all types if desired.  Zimbra Collaboration Suite for Mac OS X currently does not support attachment indexing.
+
It may be necessary to disable attachment indexing for specific mimetypes if conversion is unable to process the attachments due to size or other error.  When disabled, conversion will be bypassed for only specified mimetypes.  Attachment indexing can be disabled for all types if desired.  Zimbra Collaboration Suite for Mac OS X currently does not support attachment indexing.  Attachment indexing is only supported on ZCS Network Edition.
  
 
= Errors =
 
= Errors =
Line 26: Line 26:
 
*[http://bugzilla.zimbra.com/show_bug.cgi?id=16454 16454 Convertd failing on attachments - messages sent to deferred queue]
 
*[http://bugzilla.zimbra.com/show_bug.cgi?id=16454 16454 Convertd failing on attachments - messages sent to deferred queue]
 
*[http://bugzilla.zimbra.com/show_bug.cgi?id=17611 17611 refine attachment handing for non-document types and large file sizes]
 
*[http://bugzilla.zimbra.com/show_bug.cgi?id=17611 17611 refine attachment handing for non-document types and large file sizes]
 +
*[http://bugzilla.zimbra.com/show_bug.cgi?id=24120 24120 convertd failures should not stop mail delivery]
  
 
= Disabling Attachment Indexing =
 
= Disabling Attachment Indexing =
Line 34: Line 35:
 
=== Command Line ===
 
=== Command Line ===
 
COS
 
COS
  $ zmprov mc default zimbraAttachmentsIndexingEnabled FALSE
+
  $ zmprov modifyCOS default zimbraAttachmentsIndexingEnabled FALSE
  
 
Account
 
Account
  $ zmprov ma user@zmb.moc zimbraAttachmentsIndexingEnabled FALSE
+
  $ zmprov modifyAccount user@zmb.moc zimbraAttachmentsIndexingEnabled FALSE
  
 
== Specific Mimetypes ==
 
== Specific Mimetypes ==
 
Disabling indexing for certain mimetypes requires direct modification to the Zimbra directory.  The goal is to map the desired file extension and mimetype to UnknownTypeHandler as opposed to DefaultHandler.  To configure, create an LDIF file, then use ldapadd to apply the changes to LDAP.  The following example disables indexing on Visio and AutoCad attachments.   
 
Disabling indexing for certain mimetypes requires direct modification to the Zimbra directory.  The goal is to map the desired file extension and mimetype to UnknownTypeHandler as opposed to DefaultHandler.  To configure, create an LDIF file, then use ldapadd to apply the changes to LDAP.  The following example disables indexing on Visio and AutoCad attachments.   
  
 +
=== Verify What Is Currently Disabled ===
 +
Run an ''ldapsearch'' query to see which attachment types are currently disabled. A disabled MIME type will have zimbraMimeHandlerClass set to "UnknownTypeHandler" in its Zimbra directory entry.
 +
<pre>
 +
su - zimbra
 +
source ~/bin/zmshutil; zmsetvars
 +
ldapsearch -x -H $ldap_master_url -D $zimbra_ldap_userdn -w $zimbra_ldap_password -b "cn=config,cn=zimbra" (zimbraMimeHandlerClass=UnknownTypeHandler)"
 +
</pre>
 
=== Create LDIF ===
 
=== Create LDIF ===
 
''/tmp/mimedisable.ldif''
 
''/tmp/mimedisable.ldif''
Line 47: Line 55:
 
  dn: cn=application/acad,cn=mime,cn=config,cn=zimbra
 
  dn: cn=application/acad,cn=mime,cn=config,cn=zimbra
 
  zimbraMimeType: application/acad
 
  zimbraMimeType: application/acad
 +
cn: application/acad
 
  objectClass: zimbraMimeEntry
 
  objectClass: zimbraMimeEntry
 
  zimbraMimeIndexingEnabled: TRUE
 
  zimbraMimeIndexingEnabled: TRUE
Line 55: Line 64:
 
  dn: cn=application/vnd.visio,cn=mime,cn=config,cn=zimbra
 
  dn: cn=application/vnd.visio,cn=mime,cn=config,cn=zimbra
 
  zimbraMimeType: application/vnd.visio
 
  zimbraMimeType: application/vnd.visio
 +
cn: application/vnd.visio
 
  objectClass: zimbraMimeEntry
 
  objectClass: zimbraMimeEntry
 
  zimbraMimeIndexingEnabled: TRUE
 
  zimbraMimeIndexingEnabled: TRUE
Line 61: Line 71:
 
   
 
   
 
  # some clients will send binaries as application/octet-stream type
 
  # some clients will send binaries as application/octet-stream type
  dn: cn=application/octet-stream,cn=mime,cn=config,cn=zimbra  
+
  dn: cn=application/octet-stream,cn=mime,cn=config,cn=zimbra
  cn: application/octet-stream
+
  cn: application/octet-stream
  objectclass: zimbraMimeEntry  
+
  objectclass: zimbraMimeEntry
  zimbraMimeIndexingEnabled: TRUE  
+
  zimbraMimeIndexingEnabled: TRUE
  zimbraMimeType: application/octet-stream  
+
  zimbraMimeType: application/octet-stream
 
  zimbraMimeFileExtension: vsd
 
  zimbraMimeFileExtension: vsd
  zimbraMimeFileExtension: dwg  
+
  zimbraMimeFileExtension: dwg
  zimbraMimeHandlerClass: UnknownTypeHandler  
+
  zimbraMimeHandlerClass: UnknownTypeHandler
 
  description: Disabled application/octet-stream extensions
 
  description: Disabled application/octet-stream extensions
 +
 +
=== Determine the ldap password ===
 +
$ zmlocalconfig -s zimbra_ldap_password
  
 
=== Apply LDIF ===
 
=== Apply LDIF ===
 
  $ ldapadd -x -h `zmhostname` -D uid=zimbra,cn=admins,cn=zimbra -W -f /tmp/mimedisable.ldif
 
  $ ldapadd -x -h `zmhostname` -D uid=zimbra,cn=admins,cn=zimbra -W -f /tmp/mimedisable.ldif
A service restart is not required after applying the changes.
+
You will be prompted for the ldap password. A service restart is not required after applying the changes.
 +
 
 +
=== Restart tomcat ===
 +
$ tomcat restart
  
 
=== Verify ===
 
=== Verify ===
 
Verify bypassed attachment types are deliverable.
 
Verify bypassed attachment types are deliverable.
 +
 +
= Revert Attachment Indexing =
 +
To remove custom handling of a specified mimetype, use the ldapdelete command with an LDIF file.
 +
 +
===  Create LDIF ===
 +
This file contains one DN entry per line
 +
 +
''/tmp/mimeremove.ldif''
 +
cn=application/acad,cn=mime,cn=config,cn=zimbra
 +
 +
=== Delete Entry ===
 +
$ ldapdelete -x -h `zmhostname` -D uid=zimbra,cn=admins,cn=zimbra -W -f /tmp/mimeremove.ldif
 +
 +
 +
Or just specify the dn as part of the ldapdelete command:
 +
$ ldapdelete -x -h `zmhostname` -D uid=zimbra,cn=admins,cn=zimbra -W cn=application/acad,cn=mime,cn=config,cn=zimbra
  
 
----
 
----
 
<br> Keywords: ''conversion, attachment, indexing, kvoop, verity, mime''
 
<br> Keywords: ''conversion, attachment, indexing, kvoop, verity, mime''
  
{{Article Footer|Zimbra Collaboration Suite 4.5.10|12/2/2007}}
+
{{Article Footer|Zimbra Collaboration Suite 4.5.10 Network Edition|12/2/2007}}
  
[[Category: Troubleshooting]]
+
[[Category: Troubleshooting MTA]]
[[Category: Mailbox]]
+
[[Category: Troubleshooting Mailbox]]
 
[[Category: Pending Certification]]
 
[[Category: Pending Certification]]
 +
[[Category: ZCS 4.5]]

Latest revision as of 17:12, 24 March 2015

Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 4.5 Article ZCS 4.5

Introduction

It may be necessary to disable attachment indexing for specific mimetypes if conversion is unable to process the attachments due to size or other error. When disabled, conversion will be bypassed for only specified mimetypes. Attachment indexing can be disabled for all types if desired. Zimbra Collaboration Suite for Mac OS X currently does not support attachment indexing. Attachment indexing is only supported on ZCS Network Edition.

Errors

If conversion (convertd) is unable to process certain attachments, messages containing those attachments will queue in the MTA deferred queue. Here are some relevant errors.

MTA

/var/log/zimbra.log

Nov 27 01:26:12 ubu03 postfix/lmtp[32013]: D3058C9F40: to=<admin@zmb.moc>, 
  relay=ubu03.zmb.moc[192.168.5.63], delay=34, status=deferred (host ubu03.zmb.moc[192.168.5.63] 
  said: 451 4.0.0 Temporary message delivery failure try again (in reply to end of DATA command))

Mailbox

/opt/zimbra/log/mailbox.log

2007-11-27 01:26:12,533 WARN  [LmtpServer-1] [] ParsedMessage - Message had parse errors in 1 parts 
  (Message-Id: <44BB8AB2-8BDE-4AE1-96DC-6A7A2C029924@zmb.moc>, Subject: attachment)
2007-11-27 01:26:12,586 WARN  [LmtpServer-1] [] ZimbraLmtpBackend - Exception delivering mail (temporary failure)
  com.zimbra.common.service.ServiceException: system failure: failed to analyze part
  ...
  Caused by: com.zimbra.cs.convert.ConversionException: Communication with convertd timed out
  ...
  Caused by: java.net.SocketTimeoutException: Read timed out

Bugs

Disabling Attachment Indexing

All Attachments

All attachment indexing can be disabled at the class of service (COS) or account level. Check "Disable attachment viewing from web mail UI" on the advanced tab of the COS or account you wish to disable indexing.

Command Line

COS

$ zmprov modifyCOS default zimbraAttachmentsIndexingEnabled FALSE

Account

$ zmprov modifyAccount user@zmb.moc zimbraAttachmentsIndexingEnabled FALSE

Specific Mimetypes

Disabling indexing for certain mimetypes requires direct modification to the Zimbra directory. The goal is to map the desired file extension and mimetype to UnknownTypeHandler as opposed to DefaultHandler. To configure, create an LDIF file, then use ldapadd to apply the changes to LDAP. The following example disables indexing on Visio and AutoCad attachments.

Verify What Is Currently Disabled

Run an ldapsearch query to see which attachment types are currently disabled. A disabled MIME type will have zimbraMimeHandlerClass set to "UnknownTypeHandler" in its Zimbra directory entry.

su - zimbra
source ~/bin/zmshutil; zmsetvars
ldapsearch -x -H $ldap_master_url -D $zimbra_ldap_userdn -w $zimbra_ldap_password -b "cn=config,cn=zimbra" (zimbraMimeHandlerClass=UnknownTypeHandler)"

Create LDIF

/tmp/mimedisable.ldif

# application/acad, mime, config, zimbra
dn: cn=application/acad,cn=mime,cn=config,cn=zimbra
zimbraMimeType: application/acad
cn: application/acad
objectClass: zimbraMimeEntry
zimbraMimeIndexingEnabled: TRUE
zimbraMimeHandlerClass: UnknownTypeHandler
zimbraMimeFileExtension: dwg

# application/vnd.visio, mime, config, zimbra
dn: cn=application/vnd.visio,cn=mime,cn=config,cn=zimbra
zimbraMimeType: application/vnd.visio
cn: application/vnd.visio
objectClass: zimbraMimeEntry
zimbraMimeIndexingEnabled: TRUE
zimbraMimeHandlerClass: UnknownTypeHandler
zimbraMimeFileExtension: vsd

# some clients will send binaries as application/octet-stream type
dn: cn=application/octet-stream,cn=mime,cn=config,cn=zimbra
cn: application/octet-stream
objectclass: zimbraMimeEntry
zimbraMimeIndexingEnabled: TRUE
zimbraMimeType: application/octet-stream
zimbraMimeFileExtension: vsd
zimbraMimeFileExtension: dwg
zimbraMimeHandlerClass: UnknownTypeHandler
description: Disabled application/octet-stream extensions

Determine the ldap password

$ zmlocalconfig -s zimbra_ldap_password

Apply LDIF

$ ldapadd -x -h `zmhostname` -D uid=zimbra,cn=admins,cn=zimbra -W -f /tmp/mimedisable.ldif

You will be prompted for the ldap password. A service restart is not required after applying the changes.

Restart tomcat

$ tomcat restart

Verify

Verify bypassed attachment types are deliverable.

Revert Attachment Indexing

To remove custom handling of a specified mimetype, use the ldapdelete command with an LDIF file.

Create LDIF

This file contains one DN entry per line

/tmp/mimeremove.ldif

cn=application/acad,cn=mime,cn=config,cn=zimbra

Delete Entry

$ ldapdelete -x -h `zmhostname` -D uid=zimbra,cn=admins,cn=zimbra -W -f /tmp/mimeremove.ldif


Or just specify the dn as part of the ldapdelete command:

$ ldapdelete -x -h `zmhostname` -D uid=zimbra,cn=admins,cn=zimbra -W cn=application/acad,cn=mime,cn=config,cn=zimbra


Keywords: conversion, attachment, indexing, kvoop, verity, mime

Verified Against: Zimbra Collaboration Suite 4.5.10 Network Edition Date Created: 12/2/2007
Article ID: https://wiki.zimbra.com/index.php?title=Disable_Indexing_for_Specific_File_Types Date Modified: 2015-03-24



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search