IFMIME
NAME
ifmime -- check the MIME types of an incoming email message
SYNOPSIS
ifmime {-r mime-type} {-a mime-type}
DESCRIPTION
ifmime scans the main body and all attachments for MIME type
declarations. If no MIME type declaration is found in the
message, or at least one of the MIME types is included in the list
of acceptable MIME types (option -a), ifmime exits 100.
Otherwise, if at least one MIME type of the message is in the
list of to be rejected MIME types (option -r), ifmime
exits 0. If none of the found MIME types is included in either
list, ifmime exits 100.
In short, ifmime rejects all messages that include a MIME
type of the r-list except if they find a MIME type that is included
in the a-list.
Please note that case is not significant when MIME type specifications
are compared.
EXAMPLE
This utility can be used within ~/.qmail scripts to filter
out messages which are encoded in text/html:
|bouncesaying 'Sorry, I do not accept text/html' ifmime -r text/html
However, if you want to accept messages that include any text
in ``text/plain'' even if they include texts in ``text/html''
you should switch to:
|bouncesaying 'Sorry, I do not accept text/html' \
ifmime -r text/html -a text/plain
AUTHOR
Andreas F. Borchert, http://dotqmailutils.sourceforge.net/
converted to HTML: 2008/03/29
Thanks to Sourceforge
for hosting this package.
Andreas
F. Borchert, March 29th, 2008