The next sections describes how MHonArc processes the content-types listed above.
Content-Type
header field, then the separate file will use the attribute as the filename. Otherwise,
MHonArc generates a unique filename with an extenstion based upon sub-type.
Here is the current list of application sub-types (with their filename extensions) supported by MHonArc:
Content-Type
header field, then the separate file will use the attribute as the filename. Otherwise,
MHonArc generates a unique filename with an extenstion based upon sub-type.
Here is the current list of audio sub-types (with their filename extensions) supported by MHonArc:
Content-Type header field, then the separate file will use the attribute as the
filename. Otherwise, MHonArc will generate a unique filename with an extenstion
based upon sub-type.
Here is the current list of image sub-types (with their filename extensions) supported by MHonArc:
IMG element will be used to
in-line the image into the HTMLized message.
HEAD an BODY tags, the TITLE element will be
replaced with an ADDRESS element surrounded by HR's, and the BASE element
URL will be propogated to relative URLs.
PRE element with special characters (< > &) converted to entity
references. MHonArc will also make any URLs into hyperlinks. The following URL
types are recognized:
http://...
ftp://...
afs://...
wais://...
telnet://...
gopher://...
news:...
nntp:...
mid:...
cid:...
mailto:...
prospero:...
Content-Type
header field, then the separate file will use the attribute as the filename. Otherwise,
MHonArc generates a unique filename with an extenstion based upon sub-type.
Here is the current list of video sub-types (with their filename extensions) supported by MHonArc:
sub filter {
local($head, *fields, $data) = @_;
# Filter code here
# The last statement should be the HTML return value, unless an
# explicit return is done.
}
$head
*fields
$head into
field label/field value components. The keys are the lower-case
representations of the field values. Example: If you would like to retrieve
the value of the Content-Type field, then use the following:
$fields{`content-type'}.
If a field occurs more than once in a header, MHonArc separates the field
values in the associative array by a `\034' character. To make your filter
less likely to break due to changes in MHonArc, you may use the $'X
variable instead of `\034'.
$data
$'OUTDIR to determine the location of the mail archive.
1;").
MHonArc just performs a require on the file, and if the file does not
return true, Perl will abort execution.
MIMEFILTERS in the Resource File is used to hook in user
specifed filters into MHonArc. The syntax for each line of the the MIMEFILTERS
element is as follows:
<content-type>:<routine-name>:<file-of-routine>
The definition of each colon-separated value is as follows:
mypackage'filter").
PERLINC resource element.
MIMEFILTERS:
<MIMEFILTERS> application/octet-stream:m2h_external'filter:mhexternal.pl application/oda:m2h_external'filter:mhexternal.pl application/pdf:m2h_external'filter:mhexternal.pl application/postscript:m2h_external'filter:mhexternal.pl application/rtf:m2h_external'filter:mhexternal.pl application/x-bcpio:m2h_external'filter:mhexternal.pl application/x-cpio:m2h_external'filter:mhexternal.pl application/x-csh:m2h_external'filter:mhexternal.pl application/x-dvi:m2h_external'filter:mhexternal.pl application/x-gtar:m2h_external'filter:mhexternal.pl application/x-hdf:m2h_external'filter:mhexternal.pl application/x-latex:m2h_external'filter:mhexternal.pl application/x-mif:m2h_external'filter:mhexternal.pl application/x-netcdf:m2h_external'filter:mhexternal.pl application/x-sh:m2h_external'filter:mhexternal.pl application/x-shar:m2h_external'filter:mhexternal.pl application/x-sv4cpio:m2h_external'filter:mhexternal.pl application/x-sv4crc:m2h_external'filter:mhexternal.pl application/x-tar:m2h_external'filter:mhexternal.pl application/x-tcl:m2h_external'filter:mhexternal.pl application/x-tex:m2h_external'filter:mhexternal.pl application/x-texinfo:m2h_external'filter:mhexternal.pl application/x-troff-man:m2h_external'filter:mhexternal.pl application/x-troff-me:m2h_external'filter:mhexternal.pl application/x-troff-ms:m2h_external'filter:mhexternal.pl application/x-troff:m2h_external'filter:mhexternal.pl application/x-ustar:m2h_external'filter:mhexternal.pl application/x-wais-source:m2h_external'filter:mhexternal.pl application/zip:m2h_external'filter:mhexternal.pl audio/basic:m2h_external'filter:mhexternal.pl audio/x-aiff:m2h_external'filter:mhexternal.pl audio/x-wav:m2h_external'filter:mhexternal.pl image/gif:m2h_external'filter:mhexternal.pl image/ief:m2h_external'filter:mhexternal.pl image/jpeg:m2h_external'filter:mhexternal.pl image/tiff:m2h_external'filter:mhexternal.pl image/x-cmu-raster:m2h_external'filter:mhexternal.pl image/x-pbm:m2h_external'filter:mhexternal.pl image/x-pgm:m2h_external'filter:mhexternal.pl image/x-pict:m2h_external'filter:mhexternal.pl image/x-pnm:m2h_external'filter:mhexternal.pl image/x-portable-anymap:m2h_external'filter:mhexternal.pl image/x-portable-bitmap:m2h_external'filter:mhexternal.pl image/x-portable-graymap:m2h_external'filter:mhexternal.pl image/x-portable-pixmap:m2h_external'filter:mhexternal.pl image/x-ppm:m2h_external'filter:mhexternal.pl image/x-rgb:m2h_external'filter:mhexternal.pl image/x-xbitmap:m2h_external'filter:mhexternal.pl image/x-xbm:m2h_external'filter:mhexternal.pl image/x-xpixmap:m2h_external'filter:mhexternal.pl image/x-xpm:m2h_external'filter:mhexternal.pl image/x-xwd:m2h_external'filter:mhexternal.pl image/x-xwindowdump:m2h_external'filter:mhexternal.pl message/partial:m2h_text_plain'filter:mhtxtplain.pl text/html:m2h_text_html'filter:mhtxthtml.pl text/plain:m2h_text_plain'filter:mhtxtplain.pl text/richtext:m2h_text_plain'filter:mhtxtplain.pl text/setext:m2h_text_setext'filter:mhtxtsetext.pl text/tab-separated-values:m2h_text_plain'filter:mhtxtplain.pl text/x-html:m2h_text_html'filter:mhtxthtml.pl text/x-setext:m2h_text_setext'filter:mhtxtsetext.pl video/mpeg:m2h_external'filter:mhexternal.pl video/quicktime:m2h_external'filter:mhexternal.pl video/x-msvideo:m2h_external'filter:mhexternal.pl video/x-sgi-movie:m2h_external'filter:mhexternal.pl </MIMEFILTERS>