[Mailman-Users] Re-formatting messages

Peter Brooks peter.brooks at kchclinics.com
Thu Jul 17 13:12:57 CEST 2014


I'm using a mailing list for a very specific application. All the
e-mails arrive in a standard - but unfriendly format.

How do I reformat them? If I could filter the messages through a unix
script, that'd do the job perfectly. Is there a way to get mailman to
pass e-mails through a script before sending them?

What I'm actually trying to do is that the message arrives something like this:

"
Subject: Message from #343223 at 16:50 on 16/07/2014
Body:

Dear X,

Here is the from #343223 at 16:50 on 16/07/2014

J.Smith|Logged a message|Urgent|16:50 on
16/07/2014|Subject:Incident|Description:The machine is broken|
|How do I fix it?|Status:New|Telephone:01423435|e-mail:J-Smith at smiths.co.es|16:50
on 16/07/2014|Location:Head Office|
MessageID:343. at co.es.4212

"

What I'd like to turn this into is:

Subject: URGENT Incident - Logged by J.Smith at 16:50 on 16/07/2014
Message:

URGENT Incident - J.Smith - Telephone:01423435 e-mail:J-Smith at smiths.co.es
--------------------------------
The machine is broken
How do I fix it?
--------------------------------

Location: Head Office

"

What's the best way to achieve that?

All the messages have exactly the same format, so it'd be really easy
to write an awk filter to do this, and that'd be my preferred option -
but I've no idea where to put the script or how to ask mailman to use
it.

To complicate matters a little bit, I'm using a hosted machine, so I
have to do everything through CPANEL.

If this isn't possible, my next option would be to send the messages
to a machine I do have control over - so, if there's a way to do this
that needs root access then I'd like to know that too, because that's
plan C.

[My Plan A was to get the originating machine to send nicely formatted
messages in the first place, but I've not managed that and run out of
time..]


More information about the Mailman-Users mailing list