You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

INSTALL.TXT 6.0KB

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