Cleanup plugin for SquirrelMail
============================================================
Ver 0.3, 2008/10/04


Copyright (c) 2003 Jimmy Connor <jimmy@advcs.org>
Copyright (c) 2008 Paul Lesniewski <paul@squirrelmail.org>



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

This plugin provides a means for accomplishing some
SquirrelMail housekeeping chores for administrators
who are using a hosted solution that does not provide
the ability to run cron jobs or otherwise manage the
webmail system using normal means.

Currently, the only task that is done is cleanup of
the SquirrelMail attachments directory.  The normal
way to do this is create a cron job such as:

/usr/sbin/tmpwatch 240 /path/to/attachments/directory

Or:

find /path/to/attachments/directory -atime +2 -print0 | xargs -0 rm -f

If at all possible, one of the above solutions is
STRONGLY recommended.  If not possible, this plugin
can be used for attachment file cleanup, although
it requires that the web server have read access to
the attachments directory (which can be added with a
command like: chmod -R ug+r /path/to/attachments/directory).
Since the attachments directory is now readable by
the web server, it should be moved outside the web
server's document root directory to prevent unauthorized
access to the files therein.  If you cannot do that,
you should create a file within it named ".htaccess"
with the contents "deny from all".

Also, it is STRONGLY recommended that you do NOT use
the same directory to store both data (user preferences)
and attachments.  If you do, you should back up that
directory before first trying this plugin to ensure
that important files are not accidentally removed (this
plugin tries to avoid deleting such files, but it is
always best to test after creating a backup).



License
=======

This plugin is released under the GNU General Public
License (see 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://sourceforge.net/donate/index.php?user_id=508228



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

  * SquirrelMail version 1.4.0.



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

  * If changes to the configuration file don't seem to be
    having any effect, ensure that you are editing the correct
    configuration file.  If one is located in the main SquirrelMail
    config directory (named "config_cleanup.php"), it will
    always be used.  Otherwise, "config.php" in the cleanup
    plugin directory will be used.



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
====

  * Ideas?



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

  v0.3  2008/10/04  Paul Lesniewski <paul@squirrelmail.org>
    * Add support for hashed attachment directories
    * Added configurable settings (see new configuration file)
    * Cleanup is no longer done randomly; instead it is done
      once every week (or whatever is chosen in the configuration
      file)
    * Added configuration test (used on src/configtest.php)
    * General cleanup and updating for newest plugin requirements

  v0.2  2003/11/05  Jimmy Connor <jimmy@advcs.org>
    * Added randomization
    * Fixed error when attachment directory didn't exist or wasn't
      readable by web server
    * Added more files to skip (if there are more, please report them)
    * Added recommendations that this be done with a cron job if at
      all possible

  v0.1  2003/10/29  Jimmy Connor <jimmy@advcs.org>
    * Initial release

