On Mon, 02 Feb 2015 14:42:47 -0600
Noel Jones <njo...@megan.vbhcs.org> wrote:

> On 2/2/2015 2:28 PM, Jeremy Bowen wrote:
> > I would like to try to intercept certain outgoing emails which have
> > an attachment matching a particular set of criteria and then,
> > on-the-fly, rename the attachment (or extract, rename and re-attach
> > it). Maybe via a content filter - amavis or procmail ???

> The 'altermime' filter is often recommended for this.  Amavisd-new
> has some hooks for using altermime built in.  Be aware that
> altermime does not seem to be an active project, the last program
> update was several years ago.
> 
> Alternately, there are numerous perl MIME modules available that can
> be cobbled together if you can do some programming.

Thanks for that. I've just tried altermime but it appears that it only
operates on the message header and not the MIME headers in the body.
I played around modifying altermime to scan the body too but I think I'm
getting into the "thar be dragons" territory with that approach.

I think I can do what I need to accomplish more accurately & efficiently
with sed and procmail. I'm just not quite sure how I would go about
configuring postfix to make this operate on outgoing mail. Any advice ?

Reply via email to