Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-11-2011, 10:46 AM
Special Member
 
Posts: 139
Default Batch Deletion/Removal of Attachment > X Mb

Is there any way by which I can remove only attachments from mail the mails for which size > X MB. I need to run this as a batch.
Reply With Quote
  #2 (permalink)  
Old 01-12-2011, 09:48 PM
sqb sqb is offline
Intermediate Member
 
Posts: 16
Default

Well, this is a popular question.

I'm facing a similar issue. Want to reduce the bloat of my store by bulk detaching large attachments after a certain period from user mailboxes.

Has no one done these kinds of things with zimbra?
__________________
Stewart Baillie
Reply With Quote
  #3 (permalink)  
Old 01-13-2011, 08:42 AM
Partner (VAR/HSP)
 
Posts: 186
Default

... a single User might use a tool like IMAP Delete Attachments or TB Add-On https://addons.mozilla.org/de/thunderbird/addon/556/ to bulk-delete attachments.

The way an attachment is being removed is as follows:

  1. Download E-Mail via IMAP Protocol
  2. Parse content of E-Mail and remove MIME Containers / Message Parts
  3. IMAP copy cleaned E-Mail back to Mailbox preserving state and date

The other way how it can be done is by scripting this process in Perl or PHP using Zimbra SOAP API. Since ZCS 6.0.4 or so there is "RemoveAttachmentsRequest" as can be seen in /opt/zimbra/docs/soap.txt But it will surely take some time and know-how because first you have to extract the needed parameters for calling "RemoveAttachmentsRequest" with correct parameters:

Code:
 <RemoveAttachmentsRequest>
    <m id="{message-id}" part="{list-of-part-ids-to-remove}">
  </RemoveAttachmentsRequest>
  
  {list-of-part-ids-to-remove} = comma-separated list of part IDs to strip from existing message body

# NOTE that this operation is effectively a create and a delete, and thus the message's item ID will change

  <RemoveAttachmentsResponse>
    <m id="{message-id}" f="{flags}" t="{tags}" s="{size}" d="{received-date}" l="{folder}" [cid="{conv}"]
        rev="{revision-number}" md="{date-metadata-changed}" ms="{change-sequence}"/>
  </RemoveAttachmentsResponse>
__________________
Best regards

Andreas Wolske

managedhosting.de GmbH

Zimbra Cloud Hosting, Consulting & Support
VMware vCloud Powered Serviceprovider

Last edited by FritzBrause; 01-13-2011 at 09:19 AM..
Reply With Quote
  #4 (permalink)  
Old 02-21-2011, 05:48 PM
Special Member
 
Posts: 118
Default

anyone know if their is an RFE for this? I can't seem to locate one.
__________________
Vote to Make CentOS Official;
http://bugzilla.zimbra.com/show_bug.cgi?id=23487
Reply With Quote
  #5 (permalink)  
Old 11-22-2011, 08:10 AM
New Member
 
Posts: 3
Default

Quote:
Originally Posted by langs View Post
anyone know if their is an RFE for this? I can't seem to locate one.
Apologies for dragging up an old thread, but having seen your message I submitted an RFE here:

https://bugzilla.zimbra.com/show_bug.cgi?id=67656

Cheers, Joseph
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.