#!/bin/sh
[ "$1" = "-h" ] && cat <<tac

This example tests the features/changes added for release 1.75, to
detect and flag content/name/MIME-type mismatches.

tac

$ANOMY/bin/sanitizer.pl -nofprot $SAN_CONF \
    'file_default_policy = accept' \
    'file_default_filename = unknown.000' \
    'file_name_tpl = ./.tmp.$$$' \
    'header_rev = 0' \
    'feat_testing = 1' \
    'feat_fixmime = 1' \
    'feat_forwards = 1' \
    'feat_log_trace = 1' \
    'feat_log_inline = 2' \
    'feat_log_stderr = 0' <<EOF 2>test.log >test.out
Message-Id: <s29d4b.073@dx3.wdt.com>
X-Mailer: Novell GroupWise Internet Agent 6.5.3 
Date: Wed, 25 May 2005 06:37:24 -0400
From: "Reilly" <oom@wooment.com>
To: <keviald@cit.on.ca>, <cloly@eir.et>,
   <ord@eom.net>
Subject: Fwd: FW:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=__Part9FBC4474.1__="

--=__Part9FBC4474.1__=
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Disposition: inline

MZevilfile in disguise!

--=__Part9FBC4474.1__=
Content-Type: image/jpeg; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="homey.pdf";

This is neither an HTML file nor a PDF.

--=__Part9FBC4474.1__=
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="homey.jpg";

This isn not a jpeg.

--=__Part9FBC4474.1__=
Content-Type: image/jpeg; charset=ISO-8859-1
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="wmf-file.jpg";

AQAJAAADUh8AAAYAPQAAAAAAEQAAACYGDwAYAP//////ABAAAAAAAAAAAADAA4UA
0AIAAAkAAAAmBg8ACAD/////AgAAABcAAAAmBg8AIwD/////BAAbAFROUFAUACAA
uAAyBgAA//9PABQAAABNAGkAAAAKAAAAJgYPAAoAVE5QUAAAAgD0AwkAAAAmBg8A
CAD/////AwAAAA8AAAAmBg8AFABUTlBQBAAMAAEAAAABAAAAAAAAAAUAAAALAgAA
AAAFAAAADALQAsADBAAAAAQBDQAHAAAA/AIAAAAAZgAAAAQAAAAtAQAACQAAAPoC

--=__Part9FBC4474.1__=
Content-Type: image/jpeg; charset=ISO-8859-1
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="wmf-file2.jpg";

AQAJAAADUh8AAAYAPQAAAAAAEQAAACYGDwAYAP//////ABAAAAAAAAAAAADAA4UA
0AIAAAkAAAAmBg8ACAD/////AgAAABcAAAAmBg8AIwD/////BAAbAFROUFAUACAA
uAAyBgAA//9PABQAAABNAGkAAAAKAAAAJgYPAAoAVE5QUAAAAgD0AwkAAAAmBg8A
CAD/////AwAAAA8AAAAmBg8AFABUTlBQBAAMAAEAAAABAAAAAAAAAAUAAAALAgAA
AAAFAAAADALQAsADBAAAAAQBDQAHAAAA/AIAAAAAZgAAAAQAAAAtAQAACQAAAPoC

--=__Part9FBC4474.1__=--
EOF

echo "*** Exit code was $? ***" >>test.out
exit 0
