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 16:30. ] – [SSL geschützten Apache vHost anlegen] 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 312: | Zeile 448: | ||
Sep 08 18:25:25 vml000097.dmz.nausch.org systemd[1]: Reloaded The Apache HTTP Server. | Sep 08 18:25:25 vml000097.dmz.nausch.org systemd[1]: Reloaded The Apache HTTP Server. | ||
</ | </ | ||
+ | |||
+ | ===== Anwendungs-Konfiguration ===== | ||
+ | Die Konfiguration von PostfixAdmin erfolgt über die Konfigurationsdatei **config.inc.php**. Rufen wir jetzt schon die WEB-GUI auf, erhalten wir " | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Diese Datei versehen wir nun mit den entsprechenden Daten unserer Produktionsumgebung. | ||
+ | |||
+ | <WRAP center round alert> | ||
+ | **WICHTIG: | ||
+ | Die vorerst wichtigsten Daten sind neben der Datenbank-Definitionen, | ||
+ | </ | ||
+ | |||
+ | # vim / | ||
+ | |||
+ | Die Änderungen in der Datei sind im nachfolgendem Beispiel mit dem Namen des Admins und dem Datum versehen. | ||
+ | <file php / | ||
+ | /** | ||
+ | * Postfix Admin | ||
+ | | ||
+ | * LICENSE | ||
+ | * This source file is subject to the GPL license that is bundled with | ||
+ | * this package in the file LICENSE.TXT. | ||
+ | | ||
+ | * Further details on the project are available at http:// | ||
+ | | ||
+ | * @version $Id: config.inc.php 1613 2013-12-26 14:35:02Z christian_boltz $ | ||
+ | * @license GNU GPL v2 or later. | ||
+ | | ||
+ | * File: config.inc.php | ||
+ | * Contains configuration options. | ||
+ | */ | ||
+ | |||
+ | / | ||
+ | | ||
+ | * You have to set $CONF[' | ||
+ | * application will run! | ||
+ | * Doing this implies you have changed this file as required. | ||
+ | * i.e. configuring database etc; specifying setup.php password etc. | ||
+ | */ | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // In order to setup Postfixadmin, | ||
+ | // To create the hash, visit setup.php in a browser and type a password into the field, | ||
+ | // on submission it will be echoed out to you as a hashed value. | ||
+ | $CONF[' | ||
+ | |||
+ | // Language config | ||
+ | // Language files are located in ' | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Hook to override or add translations in $PALANG | ||
+ | // Set to the function name you want to use as hook function (see language_hook example function below) | ||
+ | $CONF[' | ||
+ | |||
+ | /* | ||
+ | language_hook example function | ||
+ | |||
+ | Called if $CONF[' | ||
+ | Allows to add or override $PALANG interface texts. | ||
+ | |||
+ | If you add new texts, please always prefix them with ' | ||
+ | $PALANG[' | ||
+ | added to languages/ | ||
+ | |||
+ | Please also make sure that all your added texts are included in all | ||
+ | sections - that includes all 'case " | ||
+ | section (for users that don't have any of the languages specified | ||
+ | in the 'case " | ||
+ | Usually the ' | ||
+ | |||
+ | If you modify an existing text/ | ||
+ | to the bugtracker on http:// | ||
+ | can benefit from the corrected text/ | ||
+ | |||
+ | Returns: modified $PALANG array | ||
+ | */ | ||
+ | /* | ||
+ | function language_hook($PALANG, | ||
+ | switch ($language) { | ||
+ | case " | ||
+ | $PALANG[' | ||
+ | break; | ||
+ | case " | ||
+ | $PALANG[' | ||
+ | break; | ||
+ | default: | ||
+ | $PALANG[' | ||
+ | } | ||
+ | |||
+ | return $PALANG; | ||
+ | } | ||
+ | */ | ||
+ | |||
+ | // Database Config | ||
+ | // mysql = MySQL 3.23 and 4.0, 4.1 or 5 | ||
+ | // mysqli = MySQL 4.1+ | ||
+ | // pgsql = PostgreSQL | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | // $CONF[' | ||
+ | // $CONF[' | ||
+ | // $CONF[' | ||
+ | // $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // If you need to specify a different port for a MYSQL database connection, use e.g. | ||
+ | // | ||
+ | // If you need to specify a different port for POSTGRESQL database connection | ||
+ | // | ||
+ | // $CONF[' | ||
+ | |||
+ | // Here, if you need, you can customize table names. | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | // Site Admin | ||
+ | // Define the Site Admin' | ||
+ | // This will be used to send emails from to create mailboxes and | ||
+ | // from Send Email / Broadcast message pages. | ||
+ | // Leave blank to send email from the logged-in Admin' | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Mail Server | ||
+ | // Hostname (FQDN) of your mail server. | ||
+ | // This is used to send email to Postfix in order to create mailboxes. | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Encrypt | ||
+ | // In what way do you want the passwords to be crypted? | ||
+ | // md5crypt = internal postfix admin md5 | ||
+ | // md5 = md5 sum of the password | ||
+ | // system = whatever you have set as your PHP system default | ||
+ | // cleartext = clear text passwords (ouch!) | ||
+ | // mysql_encrypt = useful for PAM integration | ||
+ | // authlib = support for courier-authlib style passwords | ||
+ | // dovecot: | ||
+ | // | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | // nix ouch! Da wir später CRAM-Verfahren einsetzen wollen, werden die Passwörter in Klartext gespeichert! Denn die Nutzerkonten müssen nicht | ||
+ | // vor dem angeblichen bösen Admin verborgen werden, sondern vor den bösen Buben im Internet, wie NSA, BND und GCHQ, welche unsere Grund- und | ||
+ | // Freiheitsrechte bedrohen und natürlich auch all die anderen Verbrecher und Bösewichter! | ||
+ | $CONF[' | ||
+ | |||
+ | // In what flavor should courier-authlib style passwords be encrypted? | ||
+ | // md5 = {md5} + base64 encoded md5 hash | ||
+ | // md5raw = {md5raw} + plain encoded md5 hash | ||
+ | // SHA = {SHA} + base64-encoded sha1 hash | ||
+ | // crypt = {crypt} + Standard UNIX DES-encrypted with 2-character salt | ||
+ | $CONF[' | ||
+ | |||
+ | // If you use the dovecot encryption method: where is the dovecotpw binary located? | ||
+ | // for dovecot 1.x | ||
+ | // $CONF[' | ||
+ | // for dovecot 2.x (dovecot 2.0.0 - 2.0.7 is not supported!) | ||
+ | $CONF[' | ||
+ | |||
+ | // Password validation | ||
+ | // New/changed passwords will be validated using all regular expressions in the array. | ||
+ | // If a password doesn' | ||
+ | // error message from $PALANG (see languages/ | ||
+ | // See http:// | ||
+ | // about the regular expression syntax. | ||
+ | // If you need custom error messages, you can add them using $CONF[' | ||
+ | // If a $PALANG text contains a %s, you can add its value after the $PALANG key | ||
+ | // (separated with a space). | ||
+ | $CONF[' | ||
+ | # '/ | ||
+ | // Django : 2014-09-07 | ||
+ | // default: '/ | ||
+ | '/ | ||
+ | '/ | ||
+ | '/ | ||
+ | ); | ||
+ | |||
+ | // Generate Password | ||
+ | // Generate a random password for a mailbox or admin and display it. | ||
+ | // If you want to automagically generate passwords set this to ' | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Show Password | ||
+ | // Always show password after adding a mailbox or admin. | ||
+ | // If you want to always see what password was set set this to ' | ||
+ | $CONF[' | ||
+ | |||
+ | // Page Size | ||
+ | // Set the number of entries that you would like to see | ||
+ | // in one page. | ||
+ | // Django : 2014-05-22 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Default Aliases | ||
+ | // The default aliases that need to be created for all domains. | ||
+ | $CONF[' | ||
+ | // Django : 2014-05-22 | ||
+ | // default: ' | ||
+ | // ' | ||
+ | // ' | ||
+ | // ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | // Mailboxes | ||
+ | // If you want to store the mailboxes per domain set this to ' | ||
+ | // Examples: | ||
+ | // YES: / | ||
+ | // | ||
+ | $CONF[' | ||
+ | // If you don't want to have the domain in your mailbox set this to ' | ||
+ | // Examples: | ||
+ | // YES: / | ||
+ | // | ||
+ | // Note: If $CONF[' | ||
+ | $CONF[' | ||
+ | // If you want to define your own function to generate a maildir path set this to the name of the function. | ||
+ | // Notes: | ||
+ | // - this configuration directive will override both domain_path and domain_in_mailbox | ||
+ | // - the maildir_name_hook() function example is present below, commented out | ||
+ | // - if the function does not exist the program will default to the above domain_path and domain_in_mailbox settings | ||
+ | $CONF[' | ||
+ | |||
+ | /* | ||
+ | maildir_name_hook example function | ||
+ | |||
+ | Called when creating a mailbox if $CONF[' | ||
+ | - allows for customized maildir paths determined by a custom function | ||
+ | - the example below will prepend a single-character directory to the | ||
+ | beginning of the maildir, splitting domains more or less evenly over | ||
+ | 36 directories for improved filesystem performance with large numbers | ||
+ | of domains. | ||
+ | |||
+ | Returns: maildir path | ||
+ | ie. I/ | ||
+ | */ | ||
+ | /* | ||
+ | function maildir_name_hook($domain, | ||
+ | $chars = " | ||
+ | |||
+ | $dir_index = hexdec(substr(md5($domain), | ||
+ | $dir = substr($chars, | ||
+ | return sprintf(" | ||
+ | } | ||
+ | */ | ||
+ | |||
+ | / | ||
+ | *_struct_hook - change, add or remove fields | ||
+ | |||
+ | If you need additional fields or want to change or remove existing fields, | ||
+ | you can write a hook function to modify $struct in the *Handler classes. | ||
+ | |||
+ | The edit form will automatically be updated according to the modified | ||
+ | $struct. The list page is not yet updated automatically. | ||
+ | |||
+ | You can define one hook function per class, named like the primary database | ||
+ | table of that class. | ||
+ | The hook function is called with $struct as parameter and must return the | ||
+ | modified $struct. | ||
+ | |||
+ | Note: Adding a field to $struct adds the handling of this field in | ||
+ | PostfixAdmin, | ||
+ | that yourself. | ||
+ | Please follow the naming policy for custom database fields and tables on | ||
+ | http:// | ||
+ | to avoid clashes with future versions of PostfixAdmin. | ||
+ | |||
+ | See initStruct() in the *Handler class for the default $struct. | ||
+ | See pacol() in functions.inc.php for the available flags on each column. | ||
+ | | ||
+ | Example: | ||
+ | |||
+ | function x_struct_admin_modify($struct) { | ||
+ | $struct[' | ||
+ | $struct[' | ||
+ | $struct[' | ||
+ | return $struct; # important! | ||
+ | } | ||
+ | $CONF[' | ||
+ | */ | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | |||
+ | // Default Domain Values | ||
+ | // Specify your default values below. Quota in MB. | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | // $CONF[' | ||
+ | // $CONF[' | ||
+ | // $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Quota | ||
+ | // When you want to enforce quota for your mailbox users set this to ' | ||
+ | $CONF[' | ||
+ | // If you want to enforce domain-level quotas set this to ' | ||
+ | $CONF[' | ||
+ | // You can either use ' | ||
+ | $CONF[' | ||
+ | |||
+ | // Transport | ||
+ | // If you want to define additional transport options for a domain set this to ' | ||
+ | // Read the transport file of the Postfix documentation. | ||
+ | $CONF[' | ||
+ | // Transport options | ||
+ | // If you want to define additional transport options put them in array below. | ||
+ | $CONF[' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | // Transport default | ||
+ | // You should define default transport. It must be in array above. | ||
+ | $CONF[' | ||
+ | |||
+ | |||
+ | // | ||
+ | // | ||
+ | // Virtual Vacation Stuff | ||
+ | // | ||
+ | // | ||
+ | |||
+ | // If you want to use virtual vacation for you mailbox users set this to ' | ||
+ | // NOTE: Make sure that you install the vacation module. (See VIRTUAL-VACATION/ | ||
+ | $CONF[' | ||
+ | |||
+ | // This is the autoreply domain that you will need to set in your Postfix | ||
+ | // transport maps to handle virtual vacations. It does not need to be a | ||
+ | // real domain (i.e. you don't need to setup DNS for it). | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Vacation Control | ||
+ | // If you want users to take control of vacation set this to ' | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Vacation Control for admins | ||
+ | // Set to ' | ||
+ | $CONF[' | ||
+ | |||
+ | // ReplyType options | ||
+ | // If you want to define additional reply options put them in array below. | ||
+ | // The array has the format | ||
+ | // Special values for seconds are: | ||
+ | // 0 => only reply to the first mail while on vacation | ||
+ | // 1 => reply on every mail | ||
+ | $CONF[' | ||
+ | 0 => ' | ||
+ | # considered annoying - only send a reply on every mail if you really need it | ||
+ | # 1 => ' | ||
+ | 60*60 *24*7 => ' | ||
+ | ); | ||
+ | |||
+ | // | ||
+ | // End Vacation Stuff. | ||
+ | // | ||
+ | |||
+ | // Users Control for Domain Admin | ||
+ | // Set to " | ||
+ | // Userscontrol is edited in admin_create-domain.tpl and admin_edit-domain.tpl | ||
+ | // Userscontrol is default set to on when creating a domain | ||
+ | $CONF[' | ||
+ | |||
+ | |||
+ | // Alias Control | ||
+ | // Postfix Admin inserts an alias in the alias table for every mailbox it creates. | ||
+ | // The reason for this is that when you want catch-all and normal mailboxes | ||
+ | // to work you need to have the mailbox replicated in the alias table. | ||
+ | // If you want to take control of these aliases as well set this to ' | ||
+ | |||
+ | // Alias control for superadmins | ||
+ | $CONF[' | ||
+ | |||
+ | // Alias Control for domain admins | ||
+ | $CONF[' | ||
+ | |||
+ | // Special Alias Control | ||
+ | // Set to ' | ||
+ | // as defined in $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Alias Goto Field Limit | ||
+ | // Set the max number of entries that you would like to see | ||
+ | // in one ' | ||
+ | // ' | ||
+ | $CONF[' | ||
+ | |||
+ | // Alias Domains | ||
+ | // Alias domains allow to " | ||
+ | // configuration easier if you need the same set of aliases on multiple domains, but | ||
+ | // also requires postfix to do more database queries. | ||
+ | // Note: If you update from 2.2.x or earlier, you will have to update your postfix configuration. | ||
+ | // Set to ' | ||
+ | $CONF[' | ||
+ | |||
+ | // Backup | ||
+ | // If you don't want backup tab set this to ' | ||
+ | $CONF[' | ||
+ | |||
+ | // Send Mail | ||
+ | // If you don't want sendmail tab set this to ' | ||
+ | $CONF[' | ||
+ | |||
+ | // Logging | ||
+ | // If you don't want logging set this to ' | ||
+ | $CONF[' | ||
+ | |||
+ | // Fetchmail | ||
+ | // If you don't want fetchmail tab set this to ' | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // fetchmail_extra_options allows users to specify any fetchmail options and any MDA | ||
+ | // (it will even accept 'rm -rf /' as MDA!) | ||
+ | // This should be set to NO, except if you *really* trust *all* your users. | ||
+ | $CONF[' | ||
+ | |||
+ | // Header | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Footer | ||
+ | // Below information will be on all pages. | ||
+ | // If you don't want the footer information to appear set this to ' | ||
+ | $CONF[' | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | // $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // MOTD (" | ||
+ | // You can display a MOTD below the menu on all pages. | ||
+ | // This can be configured seperately for users, domain admins and superadmins | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Welcome Message | ||
+ | // This message is send to every newly created mailbox. | ||
+ | // Change the text between EOM. | ||
+ | // Django : 2014-09-07 | ||
+ | // default; $CONF[' | ||
+ | // Hi, | ||
+ | // | ||
+ | // Welcome to your new account. | ||
+ | // EOM; | ||
+ | $CONF[' | ||
+ | Griasde! | ||
+ | |||
+ | Herzlich Willkommen auf dem Mailserver von nausch.org! | ||
+ | |||
+ | Wenn Du Probleme, Fragen und/oder Anregungen zu diesem Dienst hast, dann schreib | ||
+ | einfach eine eMail an django@nausch.org. | ||
+ | |||
+ | Den Webmaildienst erreichst du unter dieser Adresse: | ||
+ | https:// | ||
+ | |||
+ | Viel Spass und viele Gruesse | ||
+ | |||
+ | BOfH aka Django | ||
+ | Bastard Operator from Hell | ||
+ | http:// | ||
+ | EOM; | ||
+ | |||
+ | // When creating mailboxes or aliases, check that the domain-part of the | ||
+ | // address is legal by performing a name server look-up. | ||
+ | $CONF[' | ||
+ | |||
+ | |||
+ | // Optional: | ||
+ | // Analyze alias gotos and display a colored block in the first column | ||
+ | // indicating if an alias or mailbox appears to deliver to a non-existent | ||
+ | // account. | ||
+ | // for custom destinations (such as mailboxes that forward to a UNIX shell | ||
+ | // account or mail that is sent to a MS exchange server, or any other | ||
+ | // domain or subdomain you use) | ||
+ | // See http:// | ||
+ | // color names available on most browsers | ||
+ | |||
+ | //set to YES to enable this feature | ||
+ | $CONF[' | ||
+ | //display a guide to what these colors mean | ||
+ | $CONF[' | ||
+ | // ' | ||
+ | // associated with each status, you can customize it here | ||
+ | $CONF[' | ||
+ | // show_undeliverable is useful if most accounts are delivered to this | ||
+ | // postfix system. | ||
+ | // elsewhere, you will probably want to disable this. | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | // mails to these domains will never be flagged as undeliverable | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | // you can assign special colors to some domains. To do this, | ||
+ | // - add the domain to show_custom_domains | ||
+ | // - add the corresponding color to show_custom_colors | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | // If you use a recipient_delimiter in your postfix config, you can also honor it when aliases are checked. | ||
+ | // Example: $CONF[' | ||
+ | // Set to "" | ||
+ | $CONF[' | ||
+ | |||
+ | // Optional: | ||
+ | // Script to run after creation of mailboxes. | ||
+ | // Note that this may fail if PHP is run in "safe mode", or if | ||
+ | // operating system features (such as SELinux) or limitations | ||
+ | // prevent the web-server from executing external scripts. | ||
+ | // Parameters: (1) username (2) domain (3) maildir (4) quota | ||
+ | // $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Optional: | ||
+ | // Script to run after alteration of mailboxes. | ||
+ | // Note that this may fail if PHP is run in "safe mode", or if | ||
+ | // operating system features (such as SELinux) or limitations | ||
+ | // prevent the web-server from executing external scripts. | ||
+ | // Parameters: (1) username (2) domain (3) maildir (4) quota | ||
+ | // $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Optional: | ||
+ | // Script to run after deletion of mailboxes. | ||
+ | // Note that this may fail if PHP is run in "safe mode", or if | ||
+ | // operating system features (such as SELinux) or limitations | ||
+ | // prevent the web-server from executing external scripts. | ||
+ | // Parameters: (1) username (2) domain | ||
+ | // $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Optional: | ||
+ | // Script to run after creation of domains. | ||
+ | // Note that this may fail if PHP is run in "safe mode", or if | ||
+ | // operating system features (such as SELinux) or limitations | ||
+ | // prevent the web-server from executing external scripts. | ||
+ | // Parameters: (1) domain | ||
+ | // | ||
+ | $CONF[' | ||
+ | |||
+ | // Optional: | ||
+ | // Script to run after deletion of domains. | ||
+ | // Note that this may fail if PHP is run in "safe mode", or if | ||
+ | // operating system features (such as SELinux) or limitations | ||
+ | // prevent the web-server from executing external scripts. | ||
+ | // Parameters: (1) domain | ||
+ | // $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Optional: | ||
+ | // Sub-folders which should automatically be created for new users. | ||
+ | // The sub-folders will also be subscribed to automatically. | ||
+ | // Will only work with IMAP server which implement sub-folders. | ||
+ | // Will not work with POP3. | ||
+ | // If you define create_mailbox_subdirs, | ||
+ | // create_mailbox_subdirs_host must also be defined. | ||
+ | // | ||
+ | // $CONF[' | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | // | ||
+ | // Specify '' | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // Optional: | ||
+ | // Show used quotas from Dovecot dictionary backend in virtual | ||
+ | // mailbox listing. | ||
+ | // See: DOCUMENTATION/ | ||
+ | // http:// | ||
+ | // | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // if you use dovecot >= 1.2, set this to yes. | ||
+ | // Note about dovecot config: table " | ||
+ | $CONF[' | ||
+ | |||
+ | // | ||
+ | // Normally, the TCP port number does not have to be specified. | ||
+ | // $CONF[' | ||
+ | // | ||
+ | // If you have trouble connecting to the IMAP-server, | ||
+ | // a value for $CONF[' | ||
+ | // are some examples to experiment with: | ||
+ | // $CONF[' | ||
+ | // $CONF[' | ||
+ | // See also the " | ||
+ | // http:// | ||
+ | $CONF[' | ||
+ | |||
+ | |||
+ | // Theme Config | ||
+ | // Specify your own logo and CSS file | ||
+ | $CONF[' | ||
+ | $CONF[' | ||
+ | // If you want to customize some styles without editing the $CONF[' | ||
+ | // you can add a custom CSS file. It will be included after $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | // XMLRPC Interface. | ||
+ | // This should be only of use if you wish to use e.g the | ||
+ | // Postfixadmin-Squirrelmail package | ||
+ | // change to boolean true to enable xmlrpc | ||
+ | $CONF[' | ||
+ | |||
+ | // If you want to keep most settings at default values and/or want to ensure | ||
+ | // that future updates work without problems, you can use a separate config | ||
+ | // file (config.local.php) instead of editing this file and override some | ||
+ | // settings there. | ||
+ | if (file_exists(dirname(__FILE__) . '/ | ||
+ | include(dirname(__FILE__) . '/ | ||
+ | } | ||
+ | |||
+ | // | ||
+ | // END OF CONFIG FILE | ||
+ | // | ||
+ | /* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: | ||
+ | </ | ||
+ | |||
+ | ===== Initialisierung ===== | ||
+ | Die Erstinitialisierung nehmen wir nun über unserem Browser vor. | ||
+ | $ firefox http:// | ||
+ | |||
+ | Als erstes erzeugen wir den Passworthash unseres Konfigurationspasswortes. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Nachdem wir das Passwort 2x eingegeben haben klicken wir auf die Schaltfläche **[Generate password hash]**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Diesen tragen wir in die Konfigurationsdatei **config.inc.php** ein. | ||
+ | # vim / | ||
+ | <code php>... | ||
+ | |||
+ | // In order to setup Postfixadmin, | ||
+ | // To create the hash, visit setup.php in a browser and type a password into the field, | ||
+ | // on submission it will be echoed out to you as a hashed value. | ||
+ | // Django : 2014-09-07 | ||
+ | // default: $CONF[' | ||
+ | $CONF[' | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | Anschließend rufen wir die Konfigurationsseite nochmals auf und legen unseren Superadmin- aka BOfH((**B**astard **O**perator **f**rom **H**ell))-Account an. | ||
+ | $ firefox http:// | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Nach Eingabe der betreffenden Daten klicken wir die Schaltfläche **[Add Admin]**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Wir haben nun die Konfiguration von PostfixAdmin erfolgreich abgeschlossen und können nun die Loginseite unserer WEB-GUI aufrufen. | ||
+ | $ firefox http:// | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ===== 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 ====== | ||
+ | * **[[centos: | ||
+ | * **[[wiki: | ||
+ | * **[[http:// | ||
+ | |||