On Mon, Mar 21, 2022 at 07:18:01AM +0100, Martin Trautmann <tr...@gmx.de> wrote:

> 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

i didn't see the original post but...

textmail can probably do at least some of what you want:

  https://raf.org/textmail
  https://github.com/raforg/textmail

and it has some extensibility so you can supply external
translation programs for the bits it doesn't do.

it can operate on individual mail messages or mbox files.
check the output carefully. :-)

cheers,
raf

Reply via email to