Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:postfix_admin

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
tachtler:postfix_admin [2015/08/27 09:42] – [Postfix Anbindung] klaustachtler:postfix_admin [2020/05/03 06:24] (aktuell) – [MySQL-Datenbank] klaus
Zeile 101: Zeile 101:
   * einen **Benutzer** mit dem Namen **''postfixuser''** anlegen   * einen **Benutzer** mit dem Namen **''postfixuser''** anlegen
   * ein **Passwort** das **''geheim''** lautet dem Benutzer **''postfixuser''** zuweisen   * ein **Passwort** das **''geheim''** lautet dem Benutzer **''postfixuser''** zuweisen
-  * dem Benutzer **''postfixuser''** entsprechende **Rechte** für die Datenbank **''horde4''** erteilen. +  * dem Benutzer **''postfixuser''** entsprechende **Rechte** für die Datenbank **''postfix''** erteilen. 
  
 Hierzu soll ein Skript mit dem Namen  Hierzu soll ein Skript mit dem Namen 
Zeile 202: Zeile 202:
         DocumentRoot "/var/www/postfixadmin"         DocumentRoot "/var/www/postfixadmin"
         <Directory "/var/www/postfixadmin">         <Directory "/var/www/postfixadmin">
 +                Options -Indexes
 +                AllowOverride None
 +                Require all granted
 +        </Directory>
 +        <File "setup.php">
 +                Options -Indexes
 +                AllowOverride None
 +                Require ip 127.0.0.1/8
 +        </File>        
 +        DirectoryIndex index.php
 +        ErrorLog logs/postfixadmin_error.log
 +        CustomLog logs/postfixadmin_access.log combined
 +</VirtualHost>
 +</code>
 +
 +**__Apache 2.4 und [[http://postfixadmin.sourceforge.net/|Postfix Admin]] Version 3.2__ **:
 +<code apache>
 +#
 +# postfixadmin.tachtler.net
 +#
 +<VirtualHost *:80>
 +        ServerAdmin webmaster@tachtler.net
 +        ServerName postfixadmin.tachtler.net
 +        ServerAlias www.postfixadmin.tachtler.net
 +        ServerPath /
 +        Alias /postfixadmin/ /var/www/postfixadmin/public
 +        DocumentRoot "/var/www/postfixadmin/public"
 +        <Directory "/var/www/postfixadmin/public">
                 Options -Indexes                 Options -Indexes
                 AllowOverride None                 AllowOverride None
Zeile 272: Zeile 300:
  * Further details on the project are available at http://postfixadmin.sf.net   * Further details on the project are available at http://postfixadmin.sf.net 
    
- * @version $Id: config.inc.php 1613 2013-12-26 14:35:02Z christian_boltz $ + * @version $Id: config.inc.php 1876 2016-10-20 21:26:13Z christian_boltz $ 
  * @license GNU GPL v2 or later.   * @license GNU GPL v2 or later. 
    
Zeile 348: Zeile 376:
 // Database Config // Database Config
 // mysql = MySQL 3.23 and 4.0, 4.1 or 5 // mysql = MySQL 3.23 and 4.0, 4.1 or 5
-// mysqli = MySQL 4.1+ +// mysqli = MySQL 4.1+ or MariaDB
 // pgsql = PostgreSQL // pgsql = PostgreSQL
 +// sqlite = SQLite 3
 // Tachtler // Tachtler
 // default: $CONF['database_type'] = 'mysql'; // default: $CONF['database_type'] = 'mysql';
Zeile 355: Zeile 384:
 // Tachtler // Tachtler
 // default: $CONF['database_host'] = 'localhost'; // default: $CONF['database_host'] = 'localhost';
-$CONF['database_host'] = 'mysql.tachtler.net';+$CONF['database_host'] = 'mariadb.idmz.tachtler.net';
 // Tachtler // Tachtler
 // default: $CONF['database_user'] = 'postfix'; // default: $CONF['database_user'] = 'postfix';
Zeile 364: Zeile 393:
 // Tachtler // Tachtler
 // default: $CONF['database_name'] = 'postfix'; // default: $CONF['database_name'] = 'postfix';
-$CONF['database_name'] = 'postfix';+$CONF['database_name'] = 'postfixadmin'; 
 + 
 +// Database SSL Config 
 +$CONF['database_use_ssl'] = false; 
 +$CONF['database_ssl_key'] = NULL; 
 +$CONF['database_ssl_cert'] = NULL; 
 +$CONF['database_ssl_ca'] = NULL; 
 +$CONF['database_ssl_ca_path'] = NULL; 
 +$CONF['database_ssl_cipher'] = NULL; 
 // 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 a MYSQL database connection, use e.g.
 //   $CONF['database_host'] = '172.30.33.66:3308'; //   $CONF['database_host'] = '172.30.33.66:3308';
Zeile 370: Zeile 408:
 //   uncomment and change the following //   uncomment and change the following
 // $CONF['database_port'] = '5432'; // $CONF['database_port'] = '5432';
 +//
 +// If you wish to connect using a local socket file (e.g /var/run/mysql.sock) uncomment the below.
 +// $CONF['database_socket'] = '/var/run/mysql/mysqld.sock';
 +/
 +// If sqlite is used, specify the database file path:
 +//   $CONF['database_name'] = '/etc/postfix/sqlite/postfixadmin.db'
  
 // Here, if you need, you can customize table names. // Here, if you need, you can customize table names.
Zeile 386: Zeile 430:
     'vacation_notification' => 'vacation_notification',     'vacation_notification' => 'vacation_notification',
     'quota' => 'quota',     'quota' => 'quota',
- 'quota2' => 'quota2',+        'quota2' => 'quota2',
 ); );
  
Zeile 397: Zeile 441:
 // default: $CONF['admin_email'] = ''; // default: $CONF['admin_email'] = '';
 $CONF['admin_email'] = 'postmaster@tachtler.net'; $CONF['admin_email'] = 'postmaster@tachtler.net';
 +
 +// Site admin name
 +// This will be used as signature in notification messages
 +$CONF['admin_name'] = 'Postmaster tachtler.net';
  
 // Mail Server // Mail Server
Zeile 403: Zeile 451:
 $CONF['smtp_server'] = 'localhost'; $CONF['smtp_server'] = 'localhost';
 $CONF['smtp_port'] = '25'; $CONF['smtp_port'] = '25';
 +
 +// SMTP Client
 +// Hostname (FQDN) of the server hosting Postfix Admin
 +// Used in the HELO when sending emails from Postfix Admin
 +$CONF['smtp_client'] = '';
  
 // Encrypt // Encrypt
Zeile 413: Zeile 466:
 // authlib = support for courier-authlib style passwords // authlib = support for courier-authlib style passwords
 // dovecot:CRYPT-METHOD = use dovecotpw -s 'CRYPT-METHOD'. Example: dovecot:CRAM-MD5 // dovecot:CRYPT-METHOD = use dovecotpw -s 'CRYPT-METHOD'. Example: dovecot:CRAM-MD5
-//   (WARNING: don't use dovecot:* methods that include the username in the hash - you won't be able to login to PostfixAdmin in this case)+//     IMPORTANT: 
 +//     don't use dovecot:* methods that include the username in the hash - you won't be able to login to PostfixAdmin in this case 
 +//     - you'll need at least dovecot 2.1 for salted passwords ('doveadm pw' 2.0.x doesn't support the '-t' option) 
 +//     - dovecot 2.0.0 - 2.0.7 is not supported
 // Tachtler // Tachtler
 // default: $CONF['encrypt'] = 'md5crypt'; // default: $CONF['encrypt'] = 'md5crypt';
Zeile 419: Zeile 475:
  
 // In what flavor should courier-authlib style passwords be encrypted? // In what flavor should courier-authlib style passwords be encrypted?
 +// (only used if $CONF['encrypt'] == 'authlib')
 // md5 = {md5} + base64 encoded md5 hash // md5 = {md5} + base64 encoded md5 hash
 // md5raw = {md5raw} + plain encoded md5 hash // md5raw = {md5raw} + plain encoded md5 hash
Zeile 430: Zeile 487:
 // for dovecot 2.x (dovecot 2.0.0 - 2.0.7 is not supported!) // for dovecot 2.x (dovecot 2.0.0 - 2.0.7 is not supported!)
 $CONF['dovecotpw'] = "/usr/sbin/doveadm pw"; $CONF['dovecotpw'] = "/usr/sbin/doveadm pw";
 +if(@file_exists('/usr/bin/doveadm')) { // @ to silence openbase_dir stuff; see https://github.com/postfixadmin/postfixadmin/issues/171
 +    $CONF['dovecotpw'] = "/usr/bin/doveadm pw"; # debian
 +}
  
 // Password validation // Password validation
Zeile 444: Zeile 504:
     // Tachtler     // Tachtler
     // default: '/.{5}/'                => 'password_too_short 5',      # minimum length 5 characters     // default: '/.{5}/'                => 'password_too_short 5',      # minimum length 5 characters
-    '/.{8}/'                => 'password_too_short 5',      # minimum length characters+    '/.{8}/'                => 'password_too_short 8',      # minimum length characters
     '/([a-zA-Z].*){3}/'     => 'password_no_characters 3',  # must contain at least 3 characters     '/([a-zA-Z].*){3}/'     => 'password_no_characters 3',  # must contain at least 3 characters
     '/([0-9].*){2}/'        => 'password_no_digits 2',      # must contain at least 2 digits     '/([0-9].*){2}/'        => 'password_no_digits 2',      # must contain at least 2 digits
Zeile 470: Zeile 530:
 // Default Aliases // Default Aliases
 // The default aliases that need to be created for all domains. // The default aliases that need to be created for all domains.
 +// You can specify the target address in two ways:
 +// a) a full mail address
 +// b) only a localpart ('postmaster' => 'admin') - the alias target will point to the same domain
 // Tachtler // Tachtler
 // default: $CONF['default_aliases'] = array ( // default: $CONF['default_aliases'] = array (
Zeile 543: Zeile 606:
     that yourself.      that yourself. 
     Please follow the naming policy for custom database fields and tables on     Please follow the naming policy for custom database fields and tables on
-    http://sourceforge.net/apps/mediawiki/postfixadmin/index.php?title=Custom_fields+    https://sourceforge.net/p/postfixadmin/wiki/Custom_fields/
     to avoid clashes with future versions of PostfixAdmin.     to avoid clashes with future versions of PostfixAdmin.
  
Zeile 564: Zeile 627:
 $CONF['mailbox_struct_hook'       = ''; $CONF['mailbox_struct_hook'       = '';
 $CONF['alias_domain_struct_hook'  = ''; $CONF['alias_domain_struct_hook'  = '';
 +$CONF['fetchmail_struct_hook'     = '';
  
  
Zeile 579: Zeile 643:
 // Tachtler // Tachtler
 // default: $CONF['domain_quota_default'] = '2048'; // default: $CONF['domain_quota_default'] = '2048';
-$CONF['domain_quota_default'] = '4096';+$CONF['domain_quota_default'] = '5120';
  
 // Quota // Quota
Zeile 592: Zeile 656:
 // You can either use '1024000' or '1048576' // You can either use '1024000' or '1048576'
 $CONF['quota_multiplier'] = '1024000'; $CONF['quota_multiplier'] = '1024000';
- 
  
 // Transport // Transport
Zeile 625: Zeile 688:
 // transport maps to handle virtual vacations. It does not need to be a // 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). // real domain (i.e. you don't need to setup DNS for it).
 +// This domain must exclusively be used for vacation. Do NOT use it for "normal" mail addresses.
 // Tachtler // Tachtler
 // default: $CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld'; // default: $CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld';
Zeile 657: Zeile 721:
 // End Vacation Stuff. // End Vacation Stuff.
 // //
- 
-// Users Control for Domain Admin 
-// Set to "Yes" if your domain admins schould be able to  edit  field userscontrole in  table domain 
-// Userscontrol is edited in admin_create-domain.tpl and admin_edit-domain.tpl 
-// Userscontrol is default set  to  on when creating a domain 
-$CONF['users_domain_controle'] = 'YES'; 
- 
  
 // Alias Control // Alias Control
Zeile 670: Zeile 727:
 // to work you need to have the mailbox replicated in the alias table. // 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 'YES'. // If you want to take control of these aliases as well set this to 'YES'.
 +
 +// If you don't want edit alias tab (user mode) set this to 'NO';
 +$CONF['edit_alias'] = 'YES';
  
 // Alias control for superadmins // Alias control for superadmins
Zeile 703: Zeile 763:
 // If you don't want sendmail tab set this to 'NO'; // If you don't want sendmail tab set this to 'NO';
 $CONF['sendmail'] = 'YES'; $CONF['sendmail'] = 'YES';
 +// Set this to YES if you want to allow non-super-admins to
 +// send mails to their users
 +$CONF['sendmail_all_admins'] = 'NO';
  
 // Logging // Logging
Zeile 733: Zeile 796:
 // Tachtler // Tachtler
 // default: $CONF['footer_text'] = 'Return to change-this-to-your.domain.tld'; // default: $CONF['footer_text'] = 'Return to change-this-to-your.domain.tld';
-$CONF['footer_text'] = 'Return to postfixadmin.tachtler.net';+$CONF['footer_text'] = 'Zurück zu postfixadmin.tachtler.net';
 // Tachtler // Tachtler
 // default: $CONF['footer_link'] = 'http://change-this-to-your.domain.tld'; // default: $CONF['footer_link'] = 'http://change-this-to-your.domain.tld';
Zeile 761: Zeile 824:
  
     postmaster@tachtler.net     postmaster@tachtler.net
- 
-Der Webmail-Dienst ist unter der Adresse (URL/Link): 
- 
-    https://buero.tachtler.net 
- 
-zu erreichen. 
  
 Vielen Dank! Vielen Dank!
Zeile 913: Zeile 970:
 // See also the "Optional flags for names" table at // See also the "Optional flags for names" table at
 // http://www.php.net/manual/en/function.imap-open.php // http://www.php.net/manual/en/function.imap-open.php
-$CONF['create_mailbox_subdirs_hostoptions'] = array('');+$CONF['create_mailbox_subdirs_hostoptions'] = array();
  
 +// Optional:
 +// Allows a user to reset his forgotten password with a code sent by email/SMS
 +$CONF['forgotten_user_password_reset'] = true;
 +// Allows an admin to reset his forgotten password with a code sent by email/SMS
 +$CONF['forgotten_admin_password_reset'] = false;
 +
 +// Name of the function to send a SMS
 +// Please use a name that begins with "x_" to prevent collisions
 +// This function must accept 2 parameters: phone number and message,
 +// and return true on success or false on failure
 +// Note: if no sms_send_function is defined, the input field for the mobile
 +// number won't be displayed
 +$CONF['sms_send_function'] = '';
 +
 +/*
 +// Example of send SMS function using Clickatell HTTP API
 +function x_send_sms_clickatell($to, $message) {
 +
 +    $clickatell_api_id = 'CHANGEME';
 +    $clickatell_user = 'CHANGEME';
 +    $clickatell_password = 'CHANGEME';
 +    $clickatell_sender = 'CHANGEME';
 +
 +    $url = 'https://api.clickatell.com/http/sendmsg?api_id=%s&user=%s&password=%s&to=%s&from=%s&text=%s';
 +
 +    $url = sprintf($url, $clickatell_api_id, $clickatell_user, $clickatell_password, $to, $clickatell_sender, urlencode($message));
 +
 +    $result = file_get_contents($url);
 +
 +    return $result !== false;
 +}
 +*/
  
 // Theme Config // Theme Config
Zeile 937: Zeile 1026:
 // Tachtler - Can't include config.local.php into config.local.php himself! // Tachtler - Can't include config.local.php into config.local.php himself!
 // if (file_exists(dirname(__FILE__) . '/config.local.php')) { // if (file_exists(dirname(__FILE__) . '/config.local.php')) {
-//    include(dirname(__FILE__) . '/config.local.php');+//    include_once(dirname(__FILE__) . '/config.local.php');
 //} //}
  
Zeile 945: Zeile 1034:
 /* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ /* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
 </code> </code>
-  + 
 +==== /var/www/postfixadmin/templates_c ==== 
 + 
 +:!: **HINWEIS** - Ab **Version 3.1.0** sind nachfolgende Schritte erforderlich um ein Verzeichnis mit dem Namen 
 +  * **''[Installaltionsverzeichns]/templates_c''** - z.B. hier''/var/www/postfixadmin/templates_c'' 
 +anzulegen und mit entsprechenden **Besitz**- und **Datei**rechten auszustatten, da [[http://postfixadmin.sourceforge.net/|Postfix Admin]] **__ohne__** dieses Verzeichnis nicht startet. 
 + 
 +__Erstellen des Verzeichnisses__: 
 +<code> 
 +# mkdir /var/www/postfixadmin/templates_c 
 +</code> 
 + 
 +__**Besitz**rechte des Verzeichnisses setzen__: 
 +<code> 
 +# chown -R root:apache /var/www/postfixadmin/templates_c 
 +</code> 
 + 
 +__**Datei**rechte des Verzeichnisses setzen__: 
 +<code> 
 +# chmod -R 775 /var/www/postfixadmin/templates_c 
 +</code> 
 ==== Web-Anwendung ==== ==== Web-Anwendung ====
  
Zeile 999: Zeile 1109:
   * **Modul: ''auxprop''**   * **Modul: ''auxprop''**
   * **Backend: ''sql''**   * **Backend: ''sql''**
-<code ini>+<code bash>
 pwcheck_method: auxprop pwcheck_method: auxprop
 auxprop_plugin: sql auxprop_plugin: sql
Zeile 1008: Zeile 1118:
 sql_passwd: geheim sql_passwd: geheim
 sql_database: postfix sql_database: postfix
-sql_select: SELECT password FROM mailbox WHERE username = '%u@%r'+sql_select: SELECT %p FROM mailbox WHERE username = '%u@%r' AND active = 1
 </code> </code>
  
tachtler/postfix_admin.1440661329.txt.gz · Zuletzt geändert: 2015/08/27 09:42 von klaus