IFPSEUDOPLAINTEXT


NAME

ifpseudoplaintext -- check if a multipart message contains just a dummy text/plain part

SYNOPSIS

ifpseudoplaintext

DESCRIPTION

Some multipart messages consist of a ``text/plain'' and a ``text/html'' component. In some of these cases, the ``text/plain'' part is empty or contains messages like

   ``This message contains an HTML formatted message but your email client
   does not support the display of HTML. Please view this message in a
   different mail client or forward this email to a web-based mail system.''

or

   ``No text version was provided''

or

   ``This mail can not be seen for non-HTML mail clients''

which are not helpful for mail readers who strictly prefer plain text messages.

ifpseudoplaintext scans the main body and all attachments for MIME type declarations. If no ``text/plain'' component is found, ifpseudoplaintext exits 100. If any ``text/plain'' parts are found that seem to contain real text, ifpseudoplaintext exits 100. However, if all ``text/plain'' parts are empty or contain just pseudo contents as above, ifpseudoplaintext exits 0.

In short, ifpseudoplaintext rejects all messages that have ``text/plain'' components but all of them contain just pseudo contents.

EXAMPLE

This utility can be used within ~/.qmail scripts to filter out messages which are encoded in text/html:

   |bouncesaying 'Sorry, I found no real plain text!' ifpseudoplaintext

AUTHOR

Andreas F. Borchert, http://dotqmailutils.sourceforge.net/
converted to HTML: 2008/03/29

Thanks to Sourceforge for hosting this package. SourceForge.net Logo

Andreas F. Borchert, March 29th, 2008