[Mimedefang] Altering mail attachment using Mime defang

Steffen Kaiser skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Fri Dec 21 02:08:33 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 21 Dec 2007, vinita batra wrote:

> There is some policy and according to that if mail attachment contains
> ms word file , then i need to replace that ms word attchment with new
> ms word file.

> so can you please give me some piece of code that can replace the mail
> attachment(ms word file) with newer attachment(new ms word file).

MIMEDefang allows you to modify the on-wire message with Perl. Hence, 
unless somebody has the exact program already in his pocket, you can get 
hints or hire a programmer.

Hints:

a)
http://lists.roaringpenguin.com/pipermail/mimedefang/2005-March/026257.html
The idea here: in filter() the offending mail attachement is dropped from 
the mail with action_drop(). Later in filter_end() another mail 
attachement is appended to the message with action_add_part().

b)
There were questions like that in the past, the basic structure consists 
of MIMETools objects - http://search.cpan.org/~doneill/MIME-tools-5.425/ .
Do something along the lines of the action_replace_with_warning() function 
in mimedefang.pl

Bye,

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBR2tmc+gJIbZtwg6XAQJBUAf/al5NC3ws0psl4X7aWwlbotyi5/DmFxhr
v+Vv4dbNgeYCgNnGddE+7VBgr9nkQpYS1ou7Ks+JTT7k1VVQbzow5AxNjTmBIUHt
wDkYClijOW5MvKdkBeeuF+4AUgqvh+7PgJ5X9yjCxSw+jhBZEGps2Njtcl0jQnnq
1mcZB5axFEXg7jVcygg/BhjO79H4UEWcCV/4jywQ55GrDxGrPVc5bCuycXW7Roa8
cUsjt9CjK2bO3i0Ppvom2GbzKraMn2MyU4dPkF/J4xGTmWzBdWwMBQtN+qc7cx9U
+Qo21QR1DgbtXWKzyA0DvX/Qen+hk2C8kKxfvw7yANxStAuM/fB2GA==
=lr0x
-----END PGP SIGNATURE-----



More information about the MIMEDefang mailing list