check_content_type
Description
This module parses a MIME message into its components and compares the content types of all parts with the contents of config/content_types. It returns OK, DENY or DECLINED on the first match, or DECLINED if there is no match.
The content-types from the message have all LFWS replaced by a single space. For nested parts, all the content-types leading to this part are concatenated, separated by tabs. Thus, a text/plain part of a signed multipart message may be represented as:
multipart-signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="boundary-1"<TAB>multipart/mixed; boundary="boundary-2"<TAB>text/plain; charset=iso-8859-1
(all on one line, of course)
This allows distinguishing between e.g., an HTML-only message and a multipart/alternative message containing an HTML version.