===============
 Upgrading IMP
===============

:Contact: imp@lists.horde.org


These are instructions to upgrade from earlier IMP versions.


Upgrading IMP From 4.x To 5.x
=============================

This is a non-exhaustive, quick explanation of what has changed between an IMP
4.x installation to IMP 5.x.


HTML GUI editor
---------------

IMP only supports the CKeditor javascript HTML rich text editor.  Xinha is no
longer supported.

Button configuration is now stored in the prefs value 'ckeditor_buttons'.


Server Options
--------------

The 'realm' option has been removed.  Altering usernames at runtime should
instead by accomplished by using Horde's 'authusername' and/or IMP's
'preauthenticate' hooks.


Configuration Options
---------------------

Configuration relating to displaying the terms of agreement, GnuPg, OpenSSL,
spellchecking, and login redirection have been moved to Horde.

The 'show_preview' option has been removed; enabling previews is now handled
by the 'show_preview' preference.

The 'allow_resume_all_in_drafts' option has been removed; all messages that
appear in the configured Drafts mailbox always are now always allowed to be
resumed.

The 'css_files' configuration option for the dynamic (dimp) display has been
removed.  Equivalent behavior can now be found in the Horde-wide 'cssfiles'
hook.

The 'max_from_chars' and 'max_subj_chars' configuration options for the
minimal (mimp) display have been removed.

The following configuration options have been removed:

   allow_receipts
   append_trailer
   cache_folders
   limit_factor
   prepend_header
   show_account_colors
   size_limit
   sort_limit


Preferences
-----------

The 'sending_charset' and 'time_format' preferences have been moved to Horde.

The following preferences are no longer used and may be safely removed from
your ``config/prefs.php`` file::

   alternative_display
   attachment_display
   auto_delete_drafts
   delete_attachments_monthly
   delete_sentmail_monthly
   disposition_request_read
   disposition_send_mdn
   fckeditor_buttons
   fetchmail_link
   fetchmail_menu
   filter_on_sidebar
   forward_bodytext
   image_addrbook
   image_replacement
   nav_expanded_sidebar
   purge_sentmail
   purge_spam
   purge_trash
   use_vinbox
   use_vtrash
   vinbox_id
   vtrash_id


Hooks
-----

* hooks.php has changed

The following hooks have been renamed:
  OLD: spam_bounce -> NEW: spam_email
  OLD: postsent -> NEW: post_sent

* imp_hook_vinfo has been removed - use preauth hook instead
* msglist_format hook has been removed - instead:
*  x-priority now handled in the core code
*  old attachment icon handling see atc_flag pref
*  msglist_flags hook now used to dynamically set flags on messages
* The headers.php configuration file has been removed; setting custom headers
  is now done via the 'pre_sent' hook.
* Setting message trailers is now done entirely within the 'trailer' hook.


Fetchmail
---------

All code relating to fetchmail has been removed.


Server configuration
--------------------

The format of servers.php has changed and has been renamed to backends.php.


Maintenance Tasks
-----------------

TODO


Flags
-----

The list of available IMAP Flags/Keywords is now configurable via the
'msgflags' preference.

The \Answered, \Deleted, and \Draft IMAP flags are no longer user settable
by default - these flags have special meanings and are automatically handled
by the various message action functions instead.


CSS
---

TODO


Menu
----

The dynamic view (DIMP) no longer supports the 'action' parameter located
in config/menu.php.



Upgrading IMP From 4.1.x To 4.2.x
=================================

This is a non-exhaustive, quick explanation of what has changed between an IMP
4.1.x installation to IMP 4.2.x.


SQL Backend
-----------

An SQL table has been added that can be used to track sent messages. This is
necessary to provide users with the "favourite recipients" address book, and
for message rate throttling.

Execute the provided SQL script to add the table to your database, e.g.::

   mysql --user=root --password=<MySQL-root-password> <db name> < scripts/sql/imp.sql


Unified IMAP Quota Driver
-------------------------

Separate quota drivers for Cyrus and Courier servers are no longer
necessary. These drivers have been replaced by a generic IMAP driver that
should also be suitable for other IMAP servers that support the QUOTA
extension. Update ``config/servers.php`` and change the 'quota' => 'driver'
setting to 'imap'.


Application Hooks
-----------------

All hooks that are specific to IMP have been moved from the
``horde/config/hooks.php`` file. Move your existing IMP Hooks from there to
``imp/config/hooks.php``.


User-Defined Mailbox Icons
--------------------------

The usage of the hook ``_imp_hook_mbox_icons()`` has changed.  If you use this
hook, make sure you change your implementation so it returns the correct
value.


Changed Preferences
-------------------

The default values for the folder preferences 'sent_mail_folder',
'drafts_folder', and 'trash_folder' have been changed and localized. Use the
old values to prohibit the creation of duplicate folders for users that
didn't explicitly set the folders in their preferences.

The following preferences are no longer used and may be safely removed from
your ``config/prefs.php`` file and your preferences backend::

   'auto_expand'
   'num_words'

The 'mail_hdr' preferences has been moved from the identities to a regular
preference. Existing user preferences are no longer used and have to be
re-created by the users.


New Message List Format Hook
----------------------------

The new hook ``_imp_hook_msglist_format()`` has been added which allows the
formatting of a message entry in the mailbox message list to be altered
at the time the list is created.  This hook has made the following
configuration options obsolete::

   $conf['mailbox']['show_attachments']
   $conf['mailbox']['show_xpriority']

If you wish to continue using the functionality previously provided by these
options, you should activate the msglist_format hook in ``config/conf.php``.
The sample hook contained in ``config/hooks.php`` contains the code necessary
to replicate the previous behavior.


Spell Checking
--------------

The ``pspell`` driver is no longer supported since it does not work with
HTML messages.  If using pspell, you must upgrade to aspell version 0.60+.


Javascript HTML Editor
----------------------

Support has been added for FCKeditor_ as an option for the javascript HTML
editor available on the compose page.  You must have Horde 3.2 or later
installed to use this editor.


Upgrading IMP From 4.0.x To 4.1.x
=================================

This is a non-exhaustive, quick explanation of what has changed between an IMP
4.0.x installation to IMP 4.1.x.


Automatic Namespace Detection
-----------------------------

The ``namespace``, ``hierarchies``, ``folders``, ``delimiter``, and
``dotfiles`` parameters were removed from ``config/servers.php``.  Namespaces
are now automatically configured pursuant to RFC 2342.

If using the UW IMAP daemon, you may notice a bunch of additional namespaces
that were not displayed before as well as the ability of the user to
view all files that live in their home directory via the folders screen.
Information on how to correct your IMAP server configuration can be found at

  http://wiki.horde.org/ImpUWIMAPNamespaces


User-Defined Headers
--------------------

The ``config/headers.txt`` file has been removed and replaced by
``config/headers.php``.  Any user-defined headers should be migrated to this
file.  The new file has the advantage of allowing any valid PHP expression
to be executed at run-time when generating the headers.  See the top of
the ``headers.php`` file for the new format required.


Removed Preferences
-------------------

The following preferences are no longer used and may be safely removed from
your ``config/prefs.php`` file and your preferences backend::

   'disposition_request_delivery'
   'wrap_width'


Virtual Folders
---------------

The format for saved Virtual Folders has changed.  To convert to the new
format you must run the script located at
``scripts/upgrades/convert_vfolders.php``.
