INSTALL.TXT 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. #
  2. # Postfix Admin
  3. # by Mischa Peters <mischa at high5 dot net>
  4. # Copyright (c) 2002 - 2005 High5!
  5. # Licensed under GPL for more info check GPL-LICENSE.TXT
  6. #
  7. REQUIRED!!
  8. ----------
  9. - You are using Postfix 2.0 or higher.
  10. - You are using Apache 1.3.27 / Lighttpd 1.3.15 or higher.
  11. - You are using PHP 5.1.2 or higher.
  12. - You are using MySQL 3.23 or higher (5.x recommended) OR PostgreSQL 7.4 (or higher)
  13. READ THIS FIRST!
  14. ----------------
  15. When this is an upgrade from a previous version of Postfix Admin, please read
  16. DOCUMENTS/UPGRADE.TXT also!
  17. If you need to setup Postfix to be able to handle Virtual Domains and Virtual
  18. Users check out:
  19. - the PostfixAdmin documentation in the DOCUMENTS/ directory
  20. - our wiki at http://sourceforge.net/apps/mediawiki/postfixadmin/
  21. There are also lots of HOWTOs around the web. Be warned that many of them
  22. (even those listed below) may be outdated or incomplete.
  23. Please stick to the PostfixAdmin documentation, and use those HOWTOs only if
  24. you need some additional information that is missing in the PostfixAdmin
  25. DOCUMENTS/ folder.
  26. - http://codepoets.co.uk/postfixadmin-postgresql-courier-squirrelmail-debian-etch-howto-tutorial (Debian+Courier+PostgreSQL+Postfix+Postfixadmin)
  27. - http://bliki.rimuhosting.com/space/knowledgebase/linux/mail/postfixadmin+on+debian+sarge (Postfix+MySQL+Postfixadmin+Dovecot)
  28. - http://en.gentoo-wiki.com/wiki/Virtual_mail_server_using_Postfix,_Courier_and_PostfixAdmin (Postfix+MySQL+Postfixadmin+Courier)
  29. 1. Unarchive new Postfix Admin
  30. ------------------------------
  31. Make sure that you are in your WWW directory and then unarchive the
  32. Postfix Admin archive (whatever the filename is):
  33. $ tar -zxvf postfixadmin-$version.tgz
  34. 2. Setup a Database
  35. -------------------
  36. With your chosen/preferred database server (i.e. MySQL or PostgreSQL),
  37. you need to create a new database. A good name for this could be :
  38. postfix
  39. The mechanics of creating the database vary depending on which server
  40. you are using. Most users will find using phpMyAdmin or phpPgAdmin the
  41. easiest route.
  42. If you wish to use the command line, you'll need to do something like :
  43. For MySQL:
  44. CREATE DATABASE postfix;
  45. CREATE USER 'postfix'@'localhost' IDENTIFIED BY 'choose_a_password';
  46. GRANT ALL PRIVILEGES ON `postfix` . * TO 'postfix'@'localhost';
  47. For PostgreSQL:
  48. CREATE USER postfix WITH PASSWORD 'whatever';
  49. CREATE DATABASE postfix OWNER postfix ENCODING 'unicode';
  50. 3. Configure PostfixAdmin so it can find the database
  51. -----------------------------------------------------
  52. Create a config.local.php file for your local configuration:
  53. <?php
  54. $CONF['database_type'] = 'mysqli';
  55. $CONF['database_user'] = 'postfix';
  56. $CONF['database_password'] = 'postfixadmin';
  57. $CONF['database_name'] = 'postfix';
  58. $CONF['configured'] = true;
  59. ?>
  60. See config.inc.php for all available config options and their default value.
  61. You can also edit config.inc.php instead of creating a config.local.php,
  62. but this will make updates harder and is therefore not recommended.
  63. The most important settings are those for your database server.
  64. You must also change the line that says :
  65. $CONF['configured'] = false;
  66. to
  67. $CONF['configured'] = true;
  68. PostfixAdmin does not require write access to any files except the templates_c
  69. directory (smarty cache). You can therefore leave the files owned as root (or
  70. another user); as long as the web server user (e.g. www-data) can read them, it
  71. will be fine.
  72. For templates_c/, allow write access (only) for the web server user (e. g. www-data).
  73. The easiest way to do this is chown -R www-data templates_c
  74. The next 'step', is optional. Only do it, if other non-trusted users have access
  75. to your user:
  76. Depending on your environment, you may want to protect the database username
  77. and password stored in config.inc.php - if so, you could move them into the
  78. Apache configuration file (which can be set to be visible only by root) using
  79. something like the following in your VirtualHost definition :
  80. SetEnv DB_USER "postfix"
  81. SetEnv DB_PASS "opensesame"
  82. config.inc.php would then be able to access these through :
  83. $CONF['database_user'] = $_SERVER['DB_USER']
  84. 4. Check settings, and create Admin user
  85. ----------------------------------------
  86. Hit http://yourserver.tld/postfixadmin/setup.php in a web browser.
  87. You should see a list of 'OK' messages.
  88. The setup.php script will attempt to create the database structure
  89. (or upgrade it if you're coming from a previous version).
  90. Assuming everything is OK you can specify a password (which you'll
  91. need to use setup.php again in the future); when you submit the form,
  92. the hashed value (which you need to enter into config.inc.php is echoed
  93. out - with appropriate instructions on what to do with it).
  94. create the admin user using the form displayed.
  95. 5. Use PostfixAdmin
  96. -------------------
  97. This is all that is needed. Fire up your browser and go to the site that you
  98. specified to host Postfix Admin.
  99. 6. Integration with Postfix, Dovecot etc.
  100. -----------------------------------------
  101. Now that PostfixAdmin is working, you need to do some configuration in Postfix,
  102. Dovecot etc. so that they use the domains, mailboxes and aliases you setup in
  103. PostfixAdmin.
  104. The files in the DOCUMENTS/ directory explain which settings you need to
  105. do/change.
  106. 7. XMLRPC Integration (OPTIONAL!)
  107. --------------------------------
  108. See ADDITIONS/squirrelmail-plugin
  109. See xmlrpc.php - only a subset of Postfixadmin's functionality is currently exposed.
  110. See config.inc.php - see xmlrpc_enabled key (defaults to off).
  111. You'll need to install a copy of the Zend Framework (version 1.12.x) within Postfixadmin
  112. or your PHP include_path (see header within xmlrpc.php).
  113. NOTE: The XMLRPC interface is _not compatible_ with Zend Framework version 2.x.
  114. You'll need to enable the xmlrpc link (see config.inc.php)
  115. 8. More information
  116. -------------------
  117. As of March 2007, PostfixAdmin moved to SourceForge. For the
  118. forum posts and source updates, see:
  119. https://sourceforge.net/projects/postfixadmin
  120. There is also #postfixadmin on irc.freenode.net.