Results 1 to 5 of 5

Thread: Batch Deletion/Removal of Attachment > X Mb

  1. #1
    Himanshu is offline Advanced Member
    Join Date
    Jan 2008
    Posts
    217
    Rep Power
    7

    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.

  2. #2
    sqb
    sqb is offline Intermediate Member
    Join Date
    Jun 2007
    Location
    Alice Springs, NT, 0870, Australia
    Posts
    16
    Rep Power
    7

    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

  3. #3
    FritzBrause is offline Partner (VAR/HSP)
    Join Date
    Jan 2008
    Location
    Berlin, Germany
    Posts
    201
    Rep Power
    7

    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>
    Last edited by FritzBrause; 01-13-2011 at 10:19 AM.
    Best regards

    Andreas Wolske

    managedhosting.de GmbH

    Zimbra Cloud Hosting, Consulting & Support
    VMware vCloud Powered Serviceprovider

  4. #4
    langs's Avatar
    langs is offline Special Member
    Join Date
    Sep 2006
    Location
    Brisbane
    Posts
    132
    Rep Power
    8

    Default

    anyone know if their is an RFE for this? I can't seem to locate one.

  5. #5
    iknowjoseph is offline New Member
    Join Date
    Jun 2008
    Location
    Uk
    Posts
    3
    Rep Power
    6

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 03-04-2008, 09:53 AM
  2. Replies: 3
    Last Post: 08-11-2007, 12:40 PM
  3. Replies: 42
    Last Post: 08-11-2006, 09:50 AM
  4. 3.1 on FC4 problems
    By cohnhead in forum Installation
    Replies: 8
    Last Post: 05-26-2006, 11:16 AM
  5. Migration from Exchange 2003
    By goetzi in forum Administrators
    Replies: 13
    Last Post: 11-22-2005, 10:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •