iMS add footer to outbound mails

CONVERSIONS IN-CHAN=*;OUT-CHAN=*;CONVERT yes
2. Create conversions file as specified in imta_tailor:
! Append disclaimer to single part messages if the body part
! is text.
!
in-channel=*; out-channel=*;
in-type=text; in-subtype=*; part-number=1;
parameter-symbol-0=APPARENT_NAME; parameter-copy-0=*;
dparameter-symbol-0=APPARENT_FILENAME; dparameter-copy-0=*;
message-header-file=2; original-header-file=1;
override-header-file=1;
command=”/train/conversion/append_disclaimer.sh footer.txt”
!
! Append disclaimer only to the first part of a multipart message
! if that part is a text message part. (part-number=1.1 is the
! first part of a multipart message).
!
in-channel=*; out-channel=*;
in-type=text; in-subtype=*; part-number=1.1;
parameter-symbol-0=APPARENT_NAME; parameter-copy-0=*;
dparameter-symbol-0=APPARENT_FILENAME; dparameter-copy-0=*;
message-header-file=2; original-header-file=1;
override-header-file=1;
command=”/train/conversion/append_disclaimer.sh footer.txt”
! 3. a shell script for /train/conversion/append_disclaimer.sh
#!/bin/sh
#
# File: append_disclaimer.sh
#
# Usage:
# append_disclaimer.sh [-debug] “name-of-disclaimer-text-file”
#
# References:
# http://docs.sun.com/source/816-6009-10/ … .htm#42323
# http://docs.sun.com/source/816-6009-10/ … .htm#42402
#
#
if [ “$1” = “-debug” ] then
shift
set -x fi DISCLAIMER_FILE=$1 DISCLAIMER_FILE=/train/conversion/${DISCLAIMER_FILE} TAG=”Standard Disclaimer
Appended `date`” cp $INPUT_FILE $OUTPUT_FILE # copy original message part to output destination.
# See if the message was already tagged.
grep “Comments: Standard Disclaimer Appended” $MESSAGE_HEADERS >/dev/null if [ $? -ne 0 ] then
# add a blank line
echo “” >> $OUTPUT_FILE
# append the disclaimer
cat $DISCLAIMER_FILE >> $OUTPUT_FILE # Set a directive so the message will be tagged
echo “OUTPUT_DIAGNOSTIC=\”${TAG}\”” > $OUTPUT_OPTIONS fi
#
# end script.
4. footer.txt – just whatever you want to append to your mails:
*****This footer is appended to the message.***** 5. imsimta refresh — that’s about it!]]>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.