[Mimedefang] Altering mail attachment using Mime defang

vinita batra batra.vinita at gmail.com
Fri Dec 21 04:17:23 EST 2007

Hi Sir,

Thanks for your prompt response.

I think the link given by you will help me a lot.
There is one more query.

In my last mail i had written that
"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.
new ms word file= original word file contents+ some other contents
according to the policy."

To get this new ms word file, i have one windows webservice.
The function of this WIndows webservice is to give the new MS word
file in response.
To call the webservice i m planning to create perl script web client.

>From your last reply i understood that offending mail attachement can
be dropped from the mail with action_drop().

Now after action_drop(),  i need to invoke perl sript web client which
would call
windows webservice and this webservice will return the new/modified ms
word file to perl web client.

Now i have following question
1. Where and how to invoke perl web client after action_drop().

Please help me on this.

Thanks and Best Regards,
Vinita Batra.

On 12/21/07, Steffen Kaiser
<skmimedefang at smail.inf.fh-bonn-rhein-sieg.de> wrote:
> 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
> 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
> _______________________________________________
> NOTE: If there is a disclaimer or other legal boilerplate in the above
> message, it is NULL AND VOID.  You may ignore it.
> Visit http://www.mimedefang.org and http://www.roaringpenguin.com
> MIMEDefang mailing list MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

More information about the MIMEDefang mailing list