On 2/2/2015 2:28 PM, Jeremy Bowen wrote: > This one is a bit off-topic however I'm hoping that someone has come > across something similar and can point me in the right direction. > > 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 ??? > > These emails have a MIME "Content-Type: application/pdf;" header but > the filename does not have a .pdf extension, which confuses the bulk of > Windows email clients. > > I vaguely remember doing something similar with tnef/winmail.dat files > over a decade ago but I can't find any details now (and I may be > completely off base). Thanks in advance. >
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. -- Noel Jones