TNEF Decoder plugin for SquirrelMail
====================================
Ver 1.0, 2010/09/11


Copyright (c) 2010- Paul Lesniewski <paul@squirrelmail.org>
Copyright (c) 2003  Bernd Wiegmann <bernd@wib-software.de>
Copyright (c) 2002  Graham Norburys <gnorbury@bondcar.com>



Description
===========

This plugin provides links to view and download the contents of
Transport Neutral Encapsulation Format (TNEF) attachments (usually
named "winmail.dat" and generated by Microsoft Outlook) on the
message view screen.



License
=======

This plugin is released under the GNU General Public
License (see the file COPYING for details).



Donations
=========

If you or your company make regular use of this software,
please consider supporting Open Source development by
donating to the authors or inquire about hiring them to
consult on other projects.  Donation/wish list links for
the author(s) are as follows:

Paul Lesniewski: https://squirrelmail.org/donate_paul_lesniewski.php



Requirements
============

  * SquirrelMail version 1.4.0 or above

  * If not using SquirrelMail 1.4.10+ or 1.5.2+,
    Compatibility plugin version 2.0.7 or above



Troubleshooting
===============

  * Make sure the plugin is configured correctly by browsing to
    http://your-squirrelmail-location/src/configtest.php

  * If changes to the configuration file don't seem to be having
    any effect, ensure that there are not two TNEF Decoder
    configuration files, one in the tnef_decoder directory and
    one in the main SquirrelMail config directory (named
    "config_tnef_decoder.php").  The one in the main SquirrelMail
    config directory will always override the one in the tnef_decoder
    directory.



Help Requests
=============

Before looking for help elsewhere, please try to help yourself:

  * Read the Troubleshooting section herein.

  * Look to see if others have already asked about the same issue.
    There are tips and links for the best places to do this in
    the SquirrelMail mailing list posting guidelines:
    http://squirrelmail.org/wiki/MailingListPostingGuidelines
    You should also try Google or some other search engine.

  * If you cannot find any information about your issue, please
    first mail your help request to the squirrelmail-plugins
    mailing list.  Information about it can be found here:
    http://lists.sourceforge.net/mailman/listinfo/squirrelmail-plugins
    You MUST read the mailing list posting guidelines (see above)
    and include as much information about your issue (and your
    system) as possible.  Including configtest output, any debug
    output, the plugin configuration settings you've made and
    anything else you can think of to make it easier to diagnose
    your problem will get you the most useful responses.  Inquiries
    that do not comply with the posting guidelines are liable to
    be ignored.

  * If you don't get any replies on the mailing list, you are
    welcome to send a help request to the authors' personal
    address(es), but please be patient with the mailing list.



TODO
====

  * There is still what is probably PHP4 code hanging around in
    the decoder... for example, do this:   grep -rin '&\$' *
    Someone needs to decide if that code will break if the & is
    removed.

  * Change small files handling?  Here is what Bernd said in 2003
    about them:  RTF Files smaller than 250 Bytes are not shown.
    The small files I found in the attachments were all empty.  In
    most cases the mail itself is also included as a RTF File and
    if the mail itself contains no text, the RTF File is empty as well.
    Before you mail me about empty files please check that there should
    be something else.  As of 2010, some empty RTF files still show up;
    the size limit has been increased to 300 bytes, and, more importantly,
    has been put into the configuration file, so administrators can
    tweak this value until a better solution (if any) is found.



Change Log
==========

  v1.0  2010/09/11  Paul Lesniewski <paul@squirrelmail.org>
    * Re-write of all code except the decoder, which fixes several bugs
      and loss of functionality
    * TNEF contents are now shown on the message view screen
    * Changed plugin name; make sure to de-activate and remove
      any traces of "attachment_tnef" when installing this version
    * Properly decode non-ASCII attributes

  v0.7  2003/10/10  Bernd Wiegmann <bernd@wib-software.de>
    * Bugfixes for nested attachments

  v0.6  2003/10/08  Bernd Wiegmann <bernd@wib-software.de>
    * Compressed RTF decoding implemented

  v0.55 2003/09/11  Bernd Wiegmann <bernd@wib-software.de>
    * The plugin decodes a lot more attributes (beta release)

  v0.5  2003/07/14  Bernd Wiegmann <bernd@wib-software.de>
    * Removed broken code and fixed translations

  v0.4  2003/06/12  Bernd Wiegmann <bernd@wib-software.de>
    * Now the plugin can be used with PHP's register_globals=off

  v0.3  2003/06/09  Bernd Wiegmann <bernd@wib-software.de>
    * Adapted plugin for SquirrelMail 1.4

  v0.2  2002/08/26  Graham Norburys <gnorbury@bondcar.com>
    * Fixed bug with embedded messages.  Now decodes recursively!

  v0.1  2002/06/01  Graham Norburys <gnorbury@bondcar.com>
    * Initial version



