UPGRADE 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. Upgrading your SquirrelMail Installation
  2. ========================================
  3. If you are upgrading from a previous version of SquirrelMail, you can
  4. use this guide to make the transition a bit smoother.
  5. 0. Check requirements
  6. =====================
  7. The system requirements may have been changed between your previous
  8. version and this version of SquirrelMail. The requirements won't change
  9. (much) between stable releases but may change significantly between
  10. different series (e.g. between 1.2.x and 1.4.x). Most notably, you need
  11. at least PHP version 4.1.0. The ReleaseNotes file is a good source for
  12. information about changed requirements.
  13. Also make sure to review the last section in this guide that details
  14. some issues that can arise if you are upgrading to or from certain
  15. versions.
  16. 1. What to do with your old installation
  17. =========================================
  18. Until you get your new version working right, you'll want to keep your
  19. current version in place - you don't need to change it at all unless
  20. you want to change its directory name to something like "squirrelmail-old"
  21. to reduce confusion (in Linux-like environments, use a command like
  22. "mv squirrelmail-1.4.8 squirrelmail-old").
  23. In this guide, we'll assume your current version is installed in
  24. /usr/share/squirrelmail-1.4.8 and that you'll be leaving it unchanged
  25. (until the upgrade is complete).
  26. 2. Unpack new SquirrelMail
  27. ===========================
  28. Make sure that you are in the directory that contains your SquirrelMail
  29. installation (in our exmaple, /usr/share/) and then unarchive the new
  30. SquirrelMail version you just downloaded (in our example, we'll assume
  31. you downloaded the squirrelmail-1.4.17.tar.gz distribution package;
  32. unpacking any other package is very similar). In a Linux-like environment,
  33. that would look like this:
  34. $ cd /usr/share/
  35. $ tar zxvf squirrelmail-1.4.17.tar.gz
  36. Of course, this assumes you placed the new version you downloaded into the
  37. /usr/share/ directory before you executed these commands. You should now
  38. have a new directory called "squirrelmail-1.4.17" right next to your old
  39. one (in this example "squirrelmail-1.4.8").
  40. 3. Copy important files from old installation
  41. ==============================================
  42. The important files to copy are:
  43. A. Configuration files
  44. B. Plugins
  45. C. Skins
  46. D. Translations
  47. E. Themes (if you've edited or added any of them)
  48. F. Preferences (but only if you keep them inside the
  49. SquirrelMail directory)
  50. A. Configuration files
  51. -----------------------
  52. If at all possible, start the configuration process from scratch. This
  53. way, you are much less prone to miss new configuration options or transfer
  54. any incompatible settings from one version to the next. That said, when
  55. upgrading between minor versions (e.g., within the 1.4 release series as
  56. in this example), copying your configuration files from the old installation
  57. to the new one should be perfectly acceptable. If you do so, it would be
  58. a good idea to run the configuration utility once as well as view the
  59. configuration test page to make sure that everything is OK.
  60. Again, we'll start from the directory that contains your SquirrelMail
  61. installation(s), and these commands apply to Linux-like environments.
  62. $ cd /usr/share/
  63. $ cp -p squirrelmail-1.4.8/config/config.php squirrelmail-1.4.17/config/
  64. If you have a local configuration file, copy that too:
  65. $ cp -p squirrelmail-1.4.8/config/config_local.php squirrelmail-1.4.17/config/
  66. As of version 1.5.2, you could copy the file plugin_hooks.php too, but
  67. since this file is automatically generated, it is much better to run the
  68. configuration utility once, save your settings and let SquirrelMail
  69. create that file for you.
  70. B. Plugins
  71. -----------
  72. Like SquirrelMail, plugins are frequently updated with feature and security
  73. improvements as well as to make them compatible with new SquirrelMail
  74. releases. It is suggested that you download new versions of your plugins at
  75. the same time you download your SquirrelMail installation, and that you
  76. install your plugins fresh (it's easy, don't panic!).
  77. PLEASE NOTE: You should not try to replace plugins that are already included
  78. in the SquirrelMail package. Sometimes third party plugins are brought into
  79. the SquirrelMail core, so take a peek at your new installation's plugins
  80. directory to see what is already there. You only need to download or copy
  81. your previous installation of third party plugins that are not in your new
  82. SquirrelMail package by default.
  83. If you decide to copy plugin installations from your old installation, you
  84. can copy an entire plugin directory from the old installation to the new
  85. one (this example uses the Email Footer plugin):
  86. $ cp -Rp squirrelmail-1.4.8/plugins/email_footer squirrelmail-1.4.17/plugins/
  87. If you have configured any plugins so that their configuration files are
  88. stored in the main SquirrelMail config/ directory, you'll want to copy
  89. those files, too. Again, using the Email Footer example:
  90. $ cp -p squirrelmail-1.4.8/config/config_email_footer.php squirrelmail-1.4.17/config/
  91. C. Skins
  92. ---------
  93. Skins (template sets) are handled the same as plugins are (and are only
  94. part of SquirrelMail versions 1.5.2 and up). As skins are updated regularly,
  95. it's always best to just download and install the newest versions of your
  96. skins when you download your SquirrelMail upgrade package.
  97. PLEASE NOTE: As with plugins, you should not try to replace skins that are
  98. already included in the SquirrelMail package. You only need to download or
  99. copy your previous installation of third party skins that are not in your
  100. new SquirrelMail package by default.
  101. If you decide to copy skin installations from your old installation, you
  102. can copy an entire skin/template directory from the old installation to the
  103. new one (this example uses the Default Smarty skin pack):
  104. $ cp -Rp squirrelmail-1.5.2/templates/default_smarty squirrelmail-1.5.3/templates/
  105. D. Translations
  106. ----------------
  107. Here again, we recommend that you simply download and install your
  108. desired language translations from the newest locales pack on the
  109. SquirrelMail website. If, however, you want to copy what you had
  110. before, it's easiest to simply move the locale/ directory in the new
  111. installation out of the way and copy the old one into its place:
  112. $ mv squirrelmail-1.4.17/locale/ squirrelmail-1.4.17/locale-new
  113. $ cp -Rp squirrelmail-1.4.8/locale/ squirrelmail-1.4.17/
  114. E. Themes
  115. ----------
  116. If you've created or modified themes, you should copy just those to the new
  117. SquirrelMail themes directory:
  118. $ cp -pi squirrelmail-1.4.8/themes/* squirrelmail-1.4.17/themes/
  119. F. Preferences
  120. ---------------
  121. Chances are that, as long as you followed our installation recommendations,
  122. you don't need to make any changes for your user preferences. That is,
  123. if you have preferences stored in a database or you have moved your
  124. preference file storage outside the SquirrelMail directory (such as
  125. /var/lib/squirrelmail/data/) as explained in our installation documents,
  126. then you don't need to do anything.
  127. However, note that when upgrading between major versions (such as between
  128. 1.4.x and 1.5.x), it is usually best to create a secondary preferences
  129. storage location and start with a fresh system for your users to configure.
  130. That said, many preferences are the same between versions and to date there
  131. are no known incompatibilities between 1.4.x preferences and 1.5.x preferences.
  132. If you have your preferences stored inside your old SquirrelMail
  133. installation, we'd STRONGLY encourage you to re-read our installation
  134. information and consider moving them away from the web server's reach.
  135. If for some reason you need to continue to store your preferences inside
  136. the SquirrelMail installation, you can move the new data/ directory out
  137. of the way and copy the old preferences to the new installation:
  138. $ mv squirrelmail-1.4.17/data/ squirrelmail-1.4.17/data-new
  139. $ cp -Rp squirrelmail-1.4.8/data/ squirrelmail-1.4.17/
  140. If you are using Windows or otherwise cannot use the commands above, please
  141. make sure that you preserve the permissions and ownership of the data/
  142. directory as you move it, since SquirrelMail will not work unless the web
  143. server has write permission in the data directory (which, presumably, your
  144. old data directory has been set up with).
  145. PLEASE NOTE: If you are upgrading from versions lower than 1.0.5, you
  146. are STRONGLY encouraged NOT to migrate preferences, since there were
  147. important security upgrades in the preferences system starting with
  148. SquirrelMail version 1.0.5.
  149. 4. Run the configuration utility
  150. =================================
  151. Although not strictly necessary for minor upgrades, we STRONGLY
  152. recommend that you run config/conf.pl to see the new configuration
  153. options available with the new version, as well as to verify that
  154. all of your old options are set properly. In SquirrelMail versions
  155. 1.5.2 and above, this also ensures that your plugins are properly
  156. registered with SquirrelMail.
  157. Always save your options, even if you haven't changed anything. This
  158. will ensure that any problems with your configuration that have been
  159. automatically detected and fixed are not lost.
  160. If you want to make sure that your configuration contains all themes
  161. included in new SquirrelMail package, go to theme options in
  162. configuration utility and run theme detection command.
  163. 5. Visit src/configtest.php
  164. ============================
  165. You should browse to http://example.com/squirrelmail/src/configtest.php
  166. (adjust the address to suit your system) and confirm that there are no
  167. configuration problems. Note that in versions 1.5.0 and up, you'll need
  168. to make sure $allow_remote_configtest is enabled in your configuration
  169. file to do so (or see "11. Tweaks" ==> "7. Allow remote configtest" in
  170. the configuration utility).
  171. 6. Verify that the new installation works
  172. ==========================================
  173. Log in and take a look around in your new installation and make sure
  174. everything is working as expected.
  175. 7. Follow-up
  176. =============
  177. Once you've finished upgrading, you may want to keep an archived copy
  178. of your old installation just in case something goes wrong with the new
  179. one. You can simply move the whole directory somewhere else outside
  180. of your web server's document root or compress the directory into an
  181. archive file for storage elsewhere. Here's how to create a zip file
  182. of your old installation in a Linux-like environment:
  183. $ cd /usr/share/
  184. $ zip -r squirrelmail-1.4.8.zip squirrelmail-1.4.8
  185. Or to create a gzipped tar archive:
  186. $ tar czvf squirrelmail-1.4.8.tar.gz squirrelmail-1.4.8
  187. Then make sure that you REMOVE the old directory so users can no longer
  188. access it - if you don't do this, you may be leaving yourself exposed
  189. to known security exploits.
  190. 8. How to point the web server to different SquirrelMail installations
  191. ======================================================================
  192. In this guide, we assumed that your installation directories looked
  193. like "squirrelmail-1.4.17". Most of the time, you'll want to allow
  194. your users to type in "squirrelmail" (or just "webmail" or "mail")
  195. without needing to know the version number. Of course, you can simply
  196. change the name of the SquirrelMail installation directory:
  197. $ cd /usr/share/
  198. $ mv squirrelmail-1.4.8 mail
  199. ... but there are several more graceful ways you can achieve this.
  200. In any Linux-like system, you can use symlinks to dynamically point
  201. "webmail" to any of your version-specific installations:
  202. $ cd /usr/share/
  203. $ ln -s squirrelmail-1.4.8 mail
  204. Note that symlinks can point anywhere you need them to, so the installation
  205. directory doesn't necessarily need to be in the same place the "mail" link
  206. is.
  207. You can also configure most any web server to point to your installation
  208. directory from any incoming address you desire. There are several
  209. redirection and address re-writing tools for most web servers, so this is
  210. just one example using Apache's Redirect directive:
  211. Redirect permanent /squirrelmail-1.4.17 https://example.com/mail
  212. 9. Version-specific upgrade issues
  213. ==================================
  214. Upgrading from the 1.4 release series to the 1.5 release series
  215. ---------------------------------------------------------------
  216. The plugin API changed substantially in version 1.5.2. At the least,
  217. you should NOT copy your old plugins when making this kind of upgrade.
  218. Upgrading from the 1.2 release series to the 1.4 release series
  219. ---------------------------------------------------------------
  220. Several layout changes were made and there were other changes that require
  221. plugin updates. At the least, you should NOT copy your old plugins when
  222. making this kind of upgrade.
  223. Upgrading from any version older than 1.4.4 to version 1.4.4 or later
  224. ---------------------------------------------------------------------
  225. Translations were removed from the main SquirrelMail package. Unless
  226. you copy the translations from your old installation, you will now need
  227. to visit the SquirrelMail download page and also get a copy of the our
  228. locales package.
  229. Downgrading from version 1.5.1 to any version older than 1.5.1
  230. --------------------------------------------------------------
  231. The "Index Order" options and SquirrelSpell user dictionaries will not be
  232. preserved if you use the same user preferences, although we discourage the
  233. use of the same preference sets between major release numbers (e.g., 1.4.x
  234. and 1.5.x).
  235. Upgrading from any version older than 1.2.2 to version 1.2.2 or later
  236. ---------------------------------------------------------------------
  237. The names used by some translations were changed starting in version 1.2.2.
  238. In most cases, you won't see any problems due to this change, however,
  239. the Norwegian Nynorsk (no_NO_ny) translation might need to be fixed. If
  240. you decide to retain the same preferences from your old installation, any
  241. users who have a "language" preference set to "no_NO_ny" will need to
  242. have it manually changed to "nn_NO".
  243. Upgrading from any version older than 1.0.5 to version 1.0.5 or later
  244. ---------------------------------------------------------------------
  245. Some important security upgrades were made to the preferences system
  246. in version 1.0.5. It is NOT recommended that you retain user preferences
  247. when upgrading from versions older than 1.0.5.