Well. I took this source (https://github.com/gitpan/ Mail-Box/blob/master/examples/strip-attachments.pl) and modified it to work with maildirs.
It even keeps original untouched, so backups are also available :) Eero 2017-12-31 18:43 GMT+02:00 Bill Cole < postfixlists-070...@billmail.scconsult.com>: > On 31 Dec 2017, at 10:24 (-0500), Voytek wrote: > > On Mon, January 1, 2018 1:19 am, Alex JOST wrote: >> >>> Am 29.12.2017 um 21:15 schrieb Eero Volotinen: >>> >> >> A bit offtopic, but I need cli-tool to remove attachments from specific >>>> maildir messages, so how to do that? >>>> >>> >>> The Thunderbird add-on 'AttachmentExtractor' should be able to do that, >>> but I don't know if it still works with recent versions of Thunderbird as >>> it hasn't been updated in a long time. >>> >>> As Bill already noted such operations should be considered wisely. Wrong >>> manipulation of the message can make it unreadable. Backups are >>> mandatory. >>> >> >> >> I'm happy to be corrected here, but, I'm fairly certain I have done so in >> the past, with no ill effect, and, one can always copy the actual file to >> a new file, anyhow. >> >> it was i think uudecode ? first for uuencoded emails, and, munpack for >> mime encoded, something like 'munpack email_file': >> > > Yes, but that does not *remove* the attachments from the existing message > file. It extracts decoded copies of the attachments. The original message > file is unmodified. > > > > -- > Bill Cole > b...@scconsult.com or billc...@apache.org > (AKA @grumpybozo and many *@billmail.scconsult.com addresses) > Currently Seeking Steady Work: https://linkedin.com/in/billcole >