Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| centos:mail_c7:pfadmin_1 [08.09.2014 21:23. ] – Doku zu #PostfixAdmin unter #CentOS7 fertig gestellt. #dokuwiki #centos #dovecot #postfix django | centos:mail_c7:pfadmin_1 [22.07.2019 15:11. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 13: | Zeile 13: | ||
| Dann laden wir das **tar.gz**-Archiv auf unseren Webserver herunter. | Dann laden wir das **tar.gz**-Archiv auf unseren Webserver herunter. | ||
| - | wget http:// | + | # wget http:// |
| Im nächsten Schritt entpacken wir das Verzeichnis in den Webseiten-Speicherbereiches unseres [[centos: | Im nächsten Schritt entpacken wir das Verzeichnis in den Webseiten-Speicherbereiches unseres [[centos: | ||
| - | # tar -zxf postfixadmin-2.91.tar.gz -C /var/www/ | + | # tar -zxf postfixadmin-2.93.tar.gz -C /var/www/ |
| Die Datei und Nutzerrechte passen wir entsprechend an. | Die Datei und Nutzerrechte passen wir entsprechend an. | ||
| - | # chown root.apache / | + | # chown root.apache / |
| - | ===== vorbereitende Konfiguration | + | ===== Installation/ |
| + | ==== Installations-Dokument | ||
| Wichtige Informationen zur Installation finden wir in der Datei **INSTALL.TXT**. | Wichtige Informationen zur Installation finden wir in der Datei **INSTALL.TXT**. | ||
| - | | + | # less / |
| - | <file / | + | <file / |
| + | # | ||
| # Postfix Admin | # Postfix Admin | ||
| # by Mischa Peters <mischa at high5 dot net> | # by Mischa Peters <mischa at high5 dot net> | ||
| Zeile 66: | Zeile 68: | ||
| Postfix Admin archive (whatever the filename is): | Postfix Admin archive (whatever the filename is): | ||
| - | $ tar -zxvf postfixadmin-2.2.0.tgz | + | $ tar -zxvf postfixadmin-$version.tgz |
| Zeile 96: | Zeile 98: | ||
| ----------------------------------------------------- | ----------------------------------------------------- | ||
| - | Edit the config.inc.php file - or - create | + | Create a config.local.php file for your local configuration: |
| + | |||
| + | <?php | ||
| + | $CONF[' | ||
| + | $CONF[' | ||
| + | $CONF[' | ||
| + | $CONF[' | ||
| + | |||
| + | $CONF[' | ||
| + | ?> | ||
| + | |||
| + | See config.inc.php for all available config options and their default value. | ||
| + | |||
| + | You can also edit config.inc.php instead of creating a config.local.php, | ||
| + | but this will make updates harder | ||
| The most important settings are those for your database server. | The most important settings are those for your database server. | ||
| Zeile 109: | Zeile 125: | ||
| - | PostfixAdmin does not require write access to any files except the tempates_c | + | PostfixAdmin does not require write access to any files except the templates_c |
| directory (smarty cache). You can therefore leave the files owned as root (or | directory (smarty cache). You can therefore leave the files owned as root (or | ||
| another user); as long as the web server user (e.g. www-data) can read them, it | another user); as long as the web server user (e.g. www-data) can read them, it | ||
| Zeile 172: | Zeile 188: | ||
| See config.inc.php - see xmlrpc_enabled key (defaults to off). | See config.inc.php - see xmlrpc_enabled key (defaults to off). | ||
| - | You'll need to install a copy of the Zend Framework within Postfixadmin (see header within xmlrpc.php) | + | You'll need to install a copy of the Zend Framework |
| + | or your PHP include_path | ||
| + | NOTE: The XMLRPC interface is _not compatible_ with Zend Framework version 2.x. | ||
| You'll need to enable the xmlrpc link (see config.inc.php) | You'll need to enable the xmlrpc link (see config.inc.php) | ||
| Zeile 183: | Zeile 201: | ||
| There is also # | There is also # | ||
| + | |||
| </ | </ | ||
| + | ==== Upgrade-Dokument ==== | ||
| + | Wichtige Informationen zum Upgrade einer vorhandenen Installation finden wir in der Datei **UPGRADE.txt**. | ||
| + | # less / | ||
| + | | ||
| + | <file / | ||
| + | # Postfix Admin | ||
| + | # by Mischa Peters <mischa at high5 dot net> | ||
| + | # Copyright (c) 2002 - 2005 High5! | ||
| + | # Licensed under GPL for more info check GPL-LICENSE.TXT | ||
| + | # | ||
| + | |||
| + | REQUIRED!! | ||
| + | ---------- | ||
| + | - You are using Postfix 2.0 or higher. | ||
| + | - You are using Apache 1.3.27 / Lighttpd 1.3.15 or higher. | ||
| + | - You are using PHP 5.1.2 or higher. | ||
| + | - You are using MySQL 3.23 or higher OR PostgreSQL v7.4+ | ||
| + | |||
| + | |||
| + | READ THIS FIRST! | ||
| + | ---------------- | ||
| + | |||
| + | This document describes upgrading from an older PostfixAdmin version | ||
| + | (>= v1.5x) | ||
| + | |||
| + | It's recommend that you install Postfix Admin in a new folder and not | ||
| + | on-top of the old install!! (At the very least, make sure you have backups of | ||
| + | the database and relevant filesystem!) | ||
| + | |||
| + | When upgrading Postfix Admin, make sure you backup your database before | ||
| + | running upgrade.php. | ||
| + | |||
| + | |||
| + | 1. Backup the Database | ||
| + | ---------------------- | ||
| + | When you install from a previous version make sure you backup your database | ||
| + | first. There are a lot of changes in the database structure since Postfix Admin | ||
| + | 1.5.4. | ||
| + | |||
| + | $ mysqldump -a -u root -p > / | ||
| + | or | ||
| + | $ pg_dump -ad -u postfix postfix > / | ||
| + | |||
| + | |||
| + | 2. Unarchive new Postfix Admin | ||
| + | ------------------------------ | ||
| + | Make sure that you are in your WWW directory and then unarchive the | ||
| + | Postfix Admin archive (whatever the filename is): | ||
| + | |||
| + | $ tar -zxvf postfixadmin-X.X.tgz | ||
| + | |||
| + | |||
| + | 3. Change permissions | ||
| + | ---------------------- | ||
| + | Since the database password is stored in the config.inc.php it's a good idea | ||
| + | to have change the permissions for Postfix Admin. | ||
| + | |||
| + | $ cd / | ||
| + | $ find -type f -print0 | xargs -0 chmod 640 | ||
| + | $ find -type f -print0 | xargs -0 chown root:www | ||
| + | |||
| + | (the last command assumes your Apache is running with group " | ||
| + | |||
| + | Since version 2.4 we use smarty templates. That means the templates_c directory | ||
| + | needs to be writeable for your webserver. | ||
| + | |||
| + | $ chown -R www-data templates_c/ | ||
| + | |||
| + | (if your Apache runs as user " | ||
| + | |||
| + | |||
| + | 4. Configure | ||
| + | ------------ | ||
| + | Check the config.inc.php file. There you can specify settings that are | ||
| + | relevant to your setup. | ||
| + | |||
| + | Comparing config.inc.php with your previous using " | ||
| + | time. | ||
| + | |||
| + | You can use a config.local.php file to contain your local settings. These will override any | ||
| + | defined in config.inc.php - and save some time when upgrading to a new version of PostfixAdmin ;-) | ||
| + | |||
| + | 5. Run setup.php | ||
| + | ---------------------------------------- | ||
| + | |||
| + | Access setup.php through a web browser. | ||
| + | |||
| + | It will attempt to upgrade your database, and also allow you to create a superadmin user. | ||
| + | (In case the database upgrade fails, you can run setup.php? | ||
| + | |||
| + | From version 2.3, you need to specify a setup_password in config.inc.php - | ||
| + | setup.php should guide you through this process. If you do not have a setup_password, | ||
| + | into the form, and setup.php will echo out the hashed value (which needs to go into config.inc.php). | ||
| + | The setup_password removes the requirement for you to delete setup.php, and also closes a security hole. | ||
| + | |||
| + | Since version 2.2 of Postfixadmin, | ||
| + | updates automatically . | ||
| + | |||
| + | If you update from 2.1 or older, also create a superadmin account using setup.php. | ||
| + | |||
| + | Note that admin/ has been merged into the main directory. Login with the | ||
| + | superadmin account to setup domains and domain admins. | ||
| + | |||
| + | 6. Upgrade your postfix config | ||
| + | ------------------------------ | ||
| + | |||
| + | Since version 2.3, PostfixAdmin supports alias domains ($CONF[' | ||
| + | If you want to use them, you have to add some queries to your postfix config - | ||
| + | see POSTFIX_CONF for details. | ||
| + | |||
| + | |||
| + | 7. Done | ||
| + | ------- | ||
| + | This is all that is needed. Fire up your browser and go to the site that you | ||
| + | specified to host Postfix Admin. | ||
| + | |||
| + | </ | ||
| ==== mySQL Datenbank und -user anlegen ==== | ==== mySQL Datenbank und -user anlegen ==== | ||
| Wie Eingangs erwähnt, nutzen wir für die Verwaltung unserer Maildomänen und deren Nutzerkonten sowie Aliasen eine [[centos: | Wie Eingangs erwähnt, nutzen wir für die Verwaltung unserer Maildomänen und deren Nutzerkonten sowie Aliasen eine [[centos: | ||
| Zeile 236: | Zeile 372: | ||
| # vim / | # vim / | ||
| - | < | + | < |
| # postfixadmin.nausch.org | # postfixadmin.nausch.org | ||
| # | # | ||
| Zeile 291: | Zeile 427: | ||
| # systemctl reload httpd.service | # systemctl reload httpd.service | ||
| - | Wollen wir den Restart | + | Wollen wir den Reload |
| # systemctl status httpd.service | # systemctl status httpd.service | ||
| Zeile 992: | Zeile 1128: | ||
| Diesen tragen wir in die Konfigurationsdatei **config.inc.php** ein. | Diesen tragen wir in die Konfigurationsdatei **config.inc.php** ein. | ||
| - | # vim / | + | # vim / |
| <code php>... | <code php>... | ||
| Zeile 1017: | Zeile 1153: | ||
| {{ : | {{ : | ||
| + | |||
| + | ===== Postfix Konfiguration ==== | ||
| + | ==== virtual_alias files in Verbindung mit postfixadmin ==== | ||
| + | Damit unser Postfix-Mailserver auch Kenntnis von den Domänen und Konten in der MariaDB erhält müssen wir unsere Postfix-Konfigurationsdatei // | ||
| + | |||
| + | < | ||
| + | # das mySQL-Datenbankbackend (Verwaltung mit Hilfe von postfixadmin) | ||
| + | # default: virtual_mailbox_domains = $virtual_mailbox_maps | ||
| + | # virtual_alias_maps = $virtual_maps | ||
| + | # virtual_mailbox_maps = | ||
| + | virtual_mailbox_domains = proxy: | ||
| + | |||
| + | virtual_alias_maps = proxy: | ||
| + | proxy: | ||
| + | proxy: | ||
| + | |||
| + | virtual_mailbox_maps = proxy: | ||
| + | proxy: | ||
| + | |||
| + | Die zugehörigen Dateien, haben dann folgende Inhalte. | ||
| + | === mysql_virtual_domains_maps.cf === | ||
| + | # vim / | ||
| + | <file bash / | ||
| + | # Definition der Datenbankanbindung zur Abfrage der virtuellen Domaenen | ||
| + | # | ||
| + | user = postfix_user | ||
| + | password = rbgsDK39DeM2b2btx9iMHfzd | ||
| + | hosts = mariadb.dmz.nausch.org | ||
| + | dbname = postfix | ||
| + | query = SELECT domain FROM domain WHERE domain=' | ||
| + | </ | ||
| + | |||
| + | === mysql_virtual_alias_maps.cf === | ||
| + | # vim / | ||
| + | <file bash / | ||
| + | # Definition der Datenbankanbindung zur Abfrage der virtual Alias Maps | ||
| + | # | ||
| + | user = postfix_user | ||
| + | password = rbgsDK39DeM2b2btx9iMHfzd | ||
| + | hosts = mariadb.dmz.nausch.org | ||
| + | dbname = postfix | ||
| + | query = SELECT goto FROM alias WHERE address=' | ||
| + | </ | ||
| + | |||
| + | === mysql_virtual_alias_domain_maps.cf === | ||
| + | # vim / | ||
| + | <file bash / | ||
| + | # Definition der Datenbankanbindung zur Abfrage der virtual Alias Domain Maps | ||
| + | # | ||
| + | user = postfix_user | ||
| + | password = rbgsDK39DeM2b2btx9iMHfzd | ||
| + | hosts = mariadb.dmz.nausch.org | ||
| + | dbname = postfix | ||
| + | query = SELECT goto FROM alias, | ||
| + | | ||
| + | AND alias_domain.active=' | ||
| + | </ | ||
| + | |||
| + | === mysql_virtual_alias_domain_catchall_maps.cf === | ||
| + | # vim / | ||
| + | <file bash / | ||
| + | # Definition der Datenbankanbindung zur Abfrage der virtual Alias Domain Catchall Maps | ||
| + | # | ||
| + | user = postfix_user | ||
| + | password = rbgsDK39DeM2b2btx9iMHfzd | ||
| + | hosts = mariadb.dmz.nausch.org | ||
| + | dbname = postfix | ||
| + | query = SELECT goto FROM alias, | ||
| + | | ||
| + | AND alias_domain.active=' | ||
| + | </ | ||
| + | |||
| + | === mysql_virtual_mailbox_maps.cf === | ||
| + | # vim / | ||
| + | <file bash / | ||
| + | # Definition der Datenbankanbindung zur Abfrage der virtual Mailbox Maps | ||
| + | # | ||
| + | user = postfix_user | ||
| + | password = rbgsDK39DeM2b2btx9iMHfzd | ||
| + | hosts = mariadb.dmz.nausch.org | ||
| + | dbname = postfix | ||
| + | query = SELECT maildir FROM mailbox WHERE username=' | ||
| + | </ | ||
| + | |||
| + | === mysql_virtual_alias_domain_mailbox_maps.cf === | ||
| + | # vim / | ||
| + | <file bash / | ||
| + | # Definition der Datenbankanbindung zur Abfrage der virtual Alias Domain Mailbox Maps | ||
| + | # | ||
| + | user = postfix_user | ||
| + | password = rbgsDK39DeM2b2btx9iMHfzd | ||
| + | hosts = mariadb.dmz.nausch.org | ||
| + | dbname = postfix | ||
| + | query = SELECT maildir FROM mailbox, | ||
| + | AND mailbox.username = CONCAT(' | ||
| + | | ||
| + | </ | ||
| ====== Links ====== | ====== Links ====== | ||
| Zeile 1023: | Zeile 1256: | ||
| * **[[http:// | * **[[http:// | ||
| - | ~~DISCUSSION~~ | + | |
| - | ~~AUTOTWEET: | + | |