... 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>