Sun Java System Messaging Server 6 2005Q4 MTA Developer's Reference

Sample Input Message

The example that follows is the text of a sample input message the program in Example 5–2 is to process. The second message part is a file attachment. The attached file name is trojan_horse.vbs. Consequently when this message is processed by the channel, it should remove the attachment as the file extension .vbs is in the list of harmful file extensions. The sample program replaces the attachment with a text attachment indicating the content has been deleted.

Received: from [] ([])
 by (Sun Java System Messaging Server 6 2004Q2 (built Apr 7
 2003)) with SMTP id <\> for
 for; Fri, 11 Apr 2003 13:03:23 -0700 (PDT)
Date: Fri, 11 Apr 2003 13:03:08 -0700
Subject: test message
Message-id: <\>
Content-type: multipart/mixed; boundary=BoundaryMarke

Content-type: text/plain; charset=us-ascii
Content-disposition: inline

This is a
  test message!

Content-type: application/octet-stream
Content-disposition: attachment; filename="trojan_horse.vbs"
Content-transfer-encoding: base64