Filter script to remove html, fullquotes and header lines

Martin Trautmann traut at gmx.de
Mon Mar 21 06:18:01 UTC 2022


Am 2022-03-20 um 22:46 schrieb Cameron Simpson:
> I think you'll have to write your own. 

I agree - but I hoped it could have been done with some fine tuning of 
an existing script.


> At minimum you need a full mail message parser so that you are not
> filtering, say, base64 or QP content incorrectly. So something which
> scans a mailbox and for each message:

That's why I wondered to do it with mutt - it can do all that stuff.

> - decodes it completely
> - applies your filters
> - assembles the new message
> and write this out to a new mailbox (so it isn't destructive and can be
> compared to the original - you don't want to accidentally shred your
> archive).
I would work on a copy of the mailbox file first, of course.

> I'd do this in Python myself - it has a good email library and you can
> do all the things you describe fairly easily with it.
So Python it is... Never programmed it before myself.

Thans,
Martin



More information about the Mutt-users mailing list