Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
centos:mail_c7:pfadmin_1 [23.10.2015 18:28. ] djangocentos: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://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-2.92/postfixadmin-2.92.tar.gz+   wget http://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-2.93/postfixadmin-2.93.tar.gz
  
 Im nächsten Schritt entpacken wir das Verzeichnis in den Webseiten-Speicherbereiches unseres [[centos:web_c7:start|Apache-Webservers]]. Im nächsten Schritt entpacken wir das Verzeichnis in den Webseiten-Speicherbereiches unseres [[centos:web_c7:start|Apache-Webservers]].
-   # tar -zxf postfixadmin-2.92.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 /var/www/postfixadmin-2.92/ -R+   # chown root.apache /var/www/postfixadmin-2.93/ -R
  
-===== vorbereitende Konfiguration =====+===== Installation/Upgrade Informationen ===== 
 +==== 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 /var/www/postfixadmin-*/INSTALL.TXT+   # less /var/www/postfixadmin-*/INSTALL.TXT
  
 <file /var/www/postfixadmin-*/INSTALL.TXT># <file /var/www/postfixadmin-*/INSTALL.TXT>#
 +#
 # Postfix Admin # Postfix Admin
 # by Mischa Peters <mischa at high5 dot net> # by Mischa Peters <mischa at high5 dot net>
Zeile 123: 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 198: Zeile 200:
 https://sourceforge.net/projects/postfixadmin https://sourceforge.net/projects/postfixadmin
  
-There is also #postfixadmin on irc.freenode.net.</file>+There is also #postfixadmin on irc.freenode.net.
  
 +</file>
 +
 +==== Upgrade-Dokument ====
 +Wichtige Informationen zum Upgrade einer vorhandenen Installation finden wir in der Datei **UPGRADE.txt**.
 +   # less /var/www/postfixadmin-*/DOCUMENTS/UPGRADE.txt
 +  
 +<file /var/www/postfixadmin-*/DOCUMENTS/UPGRADE.txt>#
 +# 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 > /tmp/postfixadmin-backup.sql
 +or
 +  $ pg_dump -ad -u postfix postfix > /tmp/postfixadmin-backup.sql
 +
 +
 +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 /usr/local/www/postfixadmin
 +  $ 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 "www")
 +
 +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 "www-data")
 +
 +
 +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 "diff" might save you some
 +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?debug=1 to see the last executed query.)
 +
 +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, type one
 +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, setup.php can perform the needed database 
 +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['alias_domain']).
 +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.
 +
 +</file>
 ==== 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:mysql|mySQL-Datenbank]].  Wie Eingangs erwähnt, nutzen wir für die Verwaltung unserer Maildomänen und deren Nutzerkonten sowie Aliasen eine [[centos:mysql|mySQL-Datenbank]]. 
Zeile 1032: Zeile 1153:
  
 {{ :centos:mail_c7:postfixadmin_05.png?direct&850 |Bild: Postfixadmin - Admin-Zugang}} {{ :centos:mail_c7:postfixadmin_05.png?direct&850 |Bild: Postfixadmin - Admin-Zugang}}
 +
 +===== 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 //**/etc/postfix/main.cf**// um folgenden Block erweitern.
 +
 +<code># Django : 2014-10-15 - virtuelle Mail-Domains und Mailboxen mit Anbindung an
 +#          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:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
 + 
 +virtual_alias_maps =      proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
 +                          proxy:mysql:/etc/postfix/mysql_virtual_alias_domain_maps.cf
 +                          proxy:mysql:/etc/postfix/mysql_virtual_alias_domain_catchall_maps.cf
 + 
 +virtual_mailbox_maps =    proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
 +                          proxy:mysql:/etc/postfix/mysql_virtual_alias_domain_mailbox_maps.cf</code>
 +
 +Die zugehörigen Dateien, haben dann folgende Inhalte.
 +=== mysql_virtual_domains_maps.cf ===
 +   # vim /etc/postfix/mysql_virtual_domains_maps.cf
 +<file bash /etc/postfix/mysql_virtual_domains_maps.cf># Django : 2013-02-07
 +# 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='%s' AND active = '1'
 +</file>
 +
 +=== mysql_virtual_alias_maps.cf ===
 +   # vim /etc/postfix/mysql_virtual_alias_maps.cf
 +<file bash /etc/postfix/mysql_virtual_alias_maps.cf># Django : 2012-02-07
 +# 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='%s' AND active = '1'
 +</file>
 +
 +=== mysql_virtual_alias_domain_maps.cf ===
 +   # vim /etc/postfix/mysql_virtual_alias_domain_maps.cf
 +<file bash /etc/postfix/mysql_virtual_alias_domain_maps.cf># Django : 2013-02-07
 +# 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,alias_domain WHERE alias_domain.alias_domain = '%d' AND
 +           alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1
 +           AND alias_domain.active='1'
 +</file>
 +
 +=== mysql_virtual_alias_domain_catchall_maps.cf ===
 +   # vim /etc/postfix/mysql_virtual_alias_domain_catchall_maps.cf
 +<file bash /etc/postfix/mysql_virtual_alias_domain_catchall_maps.cf># Django : 2013-02-07
 +# 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,alias_domain WHERE alias_domain.alias_domain = '%d' AND
 +           alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1
 +           AND alias_domain.active='1'
 +</file> 
 +
 +=== mysql_virtual_mailbox_maps.cf ===
 +   # vim /etc/postfix/mysql_virtual_mailbox_maps.cf
 +<file bash /etc/postfix/mysql_virtual_mailbox_maps.cf># Django : 2013-02-07
 +# 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='%s' AND active = '1'
 +</file>
 +
 +=== mysql_virtual_alias_domain_mailbox_maps.cf ===
 +   # vim /etc/postfix/mysql_virtual_alias_domain_mailbox_maps.cf
 +<file bash /etc/postfix/mysql_virtual_alias_domain_mailbox_maps.cf># Django : 2012-10-09
 +# 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,alias_domain WHERE alias_domain.alias_domain = '%d'
 +           AND mailbox.username = CONCAT('%u', '@', alias_domain.target_domain) AND
 +           mailbox.active = 1 AND alias_domain.active='1'
 +</file>
  
 ====== Links ====== ====== Links ======
Zeile 1038: Zeile 1256:
   * **[[http://dokuwiki.nausch.org/doku.php/|Zurück zur Startseite]]**   * **[[http://dokuwiki.nausch.org/doku.php/|Zurück zur Startseite]]**
  
-~~DISCUSSION~~ 
  
  • centos/mail_c7/pfadmin_1.1445624908.txt.gz
  • Zuletzt geändert: 23.10.2015 18:28.
  • von django