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.
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.
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
... 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:
- Download E-Mail via IMAP Protocol
- Parse content of E-Mail and remove MIME Containers / Message Parts
- 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 09:19 AM.
Best regards
Andreas Wolske
managedhosting.de GmbH
Zimbra Cloud Hosting, Consulting & Support
VMware vCloud Powered Serviceprovider
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)