Delete specific attachment file through Conversion Channel ?

version : iMS5.2 sp1

O/S : Solaris 2.6 Generic_105181-29

I wanted to delete specific attachment file(ex: ALTDESK.ZIP) through Conversion Channel.

So I set up like below..

1) In mappings file

=================

CONVERSIONS

IN-CHAN=tcp_intranet;OUT-CHAN=tcp_local;CONVERTYes

==============

I only want to delete attached file from tcp_intranet to tcp_local.

2) msg-INSTANCE/imta/config/conversions

example mail header ::

omit -

MIME-version: 1.0

X-Mailer: iPlanet Messenger Express 5.2 Patch 1 (built Aug 19 2002)

Content-type: multipart/mixed; boundary=--6b2385053506b85

Content-language: ko

X-Accept-Language: ko

Priority: normal

This is a multi-part message in MIME format.

-6b2385053506b85

Content-Type: text/plain; charset=EUC-KR

Content-Disposition: inline

Content-Transfer-Encoding: quoted-printable

-6b2385053506b85

Content-Type: application/x-zip-compressed

Content-Transfer-Encoding: base64

Content-Disposition: attachment; filename=ALTDESK.ZIP

- conversions file setting

==================================================

in-channel=tcp_intranet; out-channel=tcp_local;

in-type=application; in-subtype=x-zip-compressed;

parameter-symbol-0=ALTDESK.ZIP; parameter-copy-0=*;

dparameter-symbol-0=ALTDESK.ZIP; dparameter-copy-0=*;

message-header-file=2; original-header-file=1;

override-header-file=1; override-option-file=1;

command="/product/leeky/convert.sh"

============================================

3) /product/leeky/convert.sh file

========================

#!/bin/sh

if [ $? -eq 1 ]; then

echo "STATUS=178030178" >> $OUTPUT_OPTIONS

else

cp $INPUT_FILE $OUTPUT_FILE

fi

=========================

4) The problems I face are

- All of zip files which are filtered is deleted. As you can see 2) I only want to delete ALTDESK.ZIP file

But, all of the zip-compressed files are deleted at the moment.

- This converison channel is work(even if all zip-compressed files are deleted). But sometimes this is not

working(2 or 3 times out of 10). I don not know why.

- Above all, I am not sure 2) and 3) settings are good. English is a second language to me. So it was

not easy to understand conversion channel setting in Admin Guide.

- How can I see the out put of "$OUTPUT_OPTIONS" ? I do not know where I can see that.

Is there anybody to help me ?

[2627 byte] By [707203] at [2007-11-25 9:07:56]
# 1

The section of the admin guide which can help is:

http://docs.sun.com/source/816-6009-10/channel2.htm#42283

Here there is an explanation of how the mime headers of the message part would align with the entries one would put into the conversions file entry. (The document has an error where it talks about APPARENT_NAME and APPARENT_FILENAME. It should really say the words "NAME" and "FILENAME" respectively).

Based on that document, the MIME headers of your message part :

Content-Type: application/x-zip-compressed

Content-Transfer-Encoding: base64

Content-Disposition: attachment; filename=ALTDESK.ZIP

will align with a conversions file settiong of:

in-channel=tcp_intranet; out-channel=tcp_local;

in-type=application; in-subtype=x-zip-compressed;

parameter-symbol-0=NAME; parameter-copy-0=*;

dparameter-symbol-0=FILENAME; dparameter-copy-0=*;

message-header-file=2; original-header-file=1;

override-header-file=1; override-option-file=1;

command="/product/leeky/convert.sh"

and a /product/leeky/convert.sh script which reads something like:

#!/bin/sh

grep "$FILENAME" /product/leek/badfiles.list

if [ $? -eq 1 ]; then

echo "STATUS=178030178" >> $OUTPUT_OPTIONS

else

grep "$NAME" /product/leek/badfiles.list

if [ $? -eq 1 ]; then

echo "STATUS=178030178" >> $OUTPUT_OPTIONS

else

cp $INPUT_FILE $OUTPUT_FILE

fi

fi

The lines:

parameter-symbol-0=NAME; parameter-copy-0=*;

dparameter-symbol-0=FILENAME; dparameter-copy-0=*;

tells the conversion channel to make the environment variable $NAME avaliable to your program with a value corresponding to the "name=" clause on the Content-Type line of the MIME headers. The environment variable $FILENAME is made avalable to your program and takes on the value extracted from the filename=" clause on the content-disposition line of the MIME headers.

The document at :

http://docs.sun.com/source/816-6092-10/conversion.html

may help provide other examples.

704673 at 2007-7-1 16:08:43 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...