2007-03-24 08:27:00 +01:00
< ? php
2007-09-30 17:53:54 +02:00
/**
* Postfix Admin
*
* LICENSE
* This source file is subject to the GPL license that is bundled with
* this package in the file LICENSE . TXT .
*
2013-11-10 16:57:32 +01:00
* Further details on the project are available at http :// postfixadmin . sf . net
2007-09-30 17:53:54 +02:00
*
* @ license GNU GPL v2 or later .
*
* File : config . inc . php
* Contains configuration options .
*/
2018-04-27 22:38:38 +02:00
################################################################################
# #
# PostfixAdmin default configuration #
# #
# This file contains the PostfixAdmin default configuration settings. #
# #
# Please do not edit this file. #
# #
# Instead, add the options you want to change/override to #
# config.local.php (if it doesn't exist, create it). #
# This will make version upgrades much easier. #
# #
################################################################################
2018-12-27 22:43:11 +01:00
global $CONF ;
2018-04-27 22:38:38 +02:00
2007-10-04 15:53:45 +02:00
/*****************************************************************
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2009-09-16 23:37:06 +02:00
* You have to set $CONF [ 'configured' ] = true ; before the
2007-10-04 15:53:45 +02:00
* application will run !
* Doing this implies you have changed this file as required .
2009-04-08 22:15:03 +02:00
* i . e . configuring database etc ; specifying setup . php password etc .
2007-10-04 15:53:45 +02:00
*/
2009-05-21 15:03:46 +02:00
$CONF [ 'configured' ] = false ;
2007-10-04 15:53:45 +02:00
2009-04-18 22:19:16 +02:00
// In order to setup Postfixadmin, you MUST specify a hashed password here.
// 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.
2009-05-21 15:03:46 +02:00
$CONF [ 'setup_password' ] = 'changeme' ;
2007-12-02 16:09:39 +01:00
2007-03-24 08:27:00 +01:00
// Language config
2007-12-02 16:09:39 +01:00
// Language files are located in './languages', change as required..
2007-03-24 08:27:00 +01:00
$CONF [ 'default_language' ] = 'en' ;
2011-08-23 23:23:16 +02:00
// 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' ] = '' ;
/*
language_hook example function
Called if $CONF [ 'language_hook' ] == '<name_of_the_function>'
Allows to add or override $PALANG interface texts .
2011-08-24 00:38:36 +02:00
If you add new texts , please always prefix them with 'x_' ( for example
$PALANG [ 'x_mytext' ] = 'foo' ) to avoid they clash with texts that might be
added to languages /*. lang in future versions of PostfixAdmin .
Please also make sure that all your added texts are included in all
sections - that includes all 'case "XY":' sections and the 'default:'
section ( for users that don ' t have any of the languages specified
in the 'case "XY":' section ) .
Usually the 'default:' section should contain english text .
If you modify an existing text / translation , please consider to report it
to the bugtracker on http :// sf . net / projects / postfixadmin so that all users
can benefit from the corrected text / translation .
2011-08-23 23:23:16 +02:00
Returns : modified $PALANG array
*/
/*
function language_hook ( $PALANG , $language ) {
switch ( $language ) {
case " de " :
2011-08-24 00:38:36 +02:00
$PALANG [ 'x_whatever' ] = 'foo' ;
2011-08-23 23:23:16 +02:00
break ;
2011-08-24 00:38:36 +02:00
case " fr " :
$PALANG [ 'x_whatever' ] = 'bar' ;
2011-08-23 23:23:16 +02:00
break ;
default :
2011-08-24 00:38:36 +02:00
$PALANG [ 'x_whatever' ] = 'foobar' ;
2011-08-23 23:23:16 +02:00
}
return $PALANG ;
}
*/
2007-03-24 08:27:00 +01:00
// Database Config
2008-10-11 09:43:11 +02:00
// mysql = MySQL 3.23 and 4.0, 4.1 or 5
2015-09-07 23:12:46 +02:00
// mysqli = MySQL 4.1+ or MariaDB
2007-03-24 08:27:00 +01:00
// pgsql = PostgreSQL
2016-01-27 13:47:33 +01:00
// sqlite = SQLite 3
2012-07-01 23:27:43 +02:00
$CONF [ 'database_type' ] = 'mysqli' ;
2009-05-21 15:03:46 +02:00
$CONF [ 'database_host' ] = 'localhost' ;
$CONF [ 'database_user' ] = 'postfix' ;
$CONF [ 'database_password' ] = 'postfixadmin' ;
2007-03-24 08:27:00 +01:00
$CONF [ 'database_name' ] = 'postfix' ;
2017-09-05 11:09:36 +02:00
2020-02-28 15:19:31 +01:00
// Database SSL Config (PDO/MySQLi only)
2017-11-15 01:53:59 +01:00
$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 ;
2020-03-02 10:36:39 +01:00
$CONF [ 'database_ssl_verify_server_cert' ] = true ;
2017-11-15 01:53:59 +01:00
2009-09-01 16:01:26 +02:00
// If you need to specify a different port for a MYSQL database connection, use e.g.
// $CONF['database_host'] = '172.30.33.66:3308';
2017-09-05 11:09:36 +02:00
//
// If you need to specify a different port for MySQLi(3306)/POSTGRESQL(5432) database connection
2009-09-01 16:01:26 +02:00
// uncomment and change the following
// $CONF['database_port'] = '5432';
2017-09-05 11:09:36 +02:00
//
2020-02-12 15:05:04 +01:00
// If you wish to connect using a local socket file (e.g /var/run/mysql.sock) set this to the socket path.
2017-09-05 11:09:36 +02:00
// $CONF['database_socket'] = '/var/run/mysql/mysqld.sock';
2020-02-12 15:05:04 +01:00
$CONF [ 'database_socket' ] = '' ;
2016-01-27 13:47:33 +01:00
// If sqlite is used, specify the database file path:
// $CONF['database_name'] = '/etc/postfix/sqlite/postfixadmin.db'
2009-09-01 16:01:26 +02:00
2007-03-24 08:27:00 +01:00
// Here, if you need, you can customize table names.
$CONF [ 'database_prefix' ] = '' ;
$CONF [ 'database_tables' ] = array (
2007-10-04 15:53:45 +02:00
'admin' => 'admin' ,
'alias' => 'alias' ,
2008-05-22 00:06:08 +02:00
'alias_domain' => 'alias_domain' ,
2007-11-04 22:06:00 +01:00
'config' => 'config' ,
2007-10-04 15:53:45 +02:00
'domain' => 'domain' ,
'domain_admins' => 'domain_admins' ,
2008-07-19 01:07:40 +02:00
'fetchmail' => 'fetchmail' ,
2007-10-04 15:53:45 +02:00
'log' => 'log' ,
'mailbox' => 'mailbox' ,
'vacation' => 'vacation' ,
'vacation_notification' => 'vacation_notification' ,
2009-01-15 12:38:11 +01:00
'quota' => 'quota' ,
2009-11-05 15:55:39 +01:00
'quota2' => 'quota2' ,
2007-03-24 08:27:00 +01:00
);
// Site Admin
2011-07-19 23:12:25 +02:00
// Define the Site Admin's email address below.
// 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's Email address.
$CONF [ 'admin_email' ] = '' ;
2007-03-24 08:27:00 +01:00
2019-05-31 11:42:42 +02:00
// Define the smtp password for admin_email.
// This will be used to send emails from to create mailboxes and
// from Send Email / Broadcast message pages.
// Leave blank to send emails without authentification
$CONF [ 'admin_smtp_password' ] = '' ;
2016-10-17 18:12:14 +02:00
// Site admin name
// This will be used as signature in notification messages
$CONF [ 'admin_name' ] = 'Postmaster' ;
2007-03-24 08:27:00 +01:00
// Mail Server
// Hostname (FQDN) of your mail server.
// This is used to send email to Postfix in order to create mailboxes.
$CONF [ 'smtp_server' ] = 'localhost' ;
$CONF [ 'smtp_port' ] = '25' ;
2016-03-08 20:21:56 +01:00
// SMTP Client
// Hostname (FQDN) of the server hosting Postfix Admin
// Used in the HELO when sending emails from Postfix Admin
2016-03-09 19:57:23 +01:00
$CONF [ 'smtp_client' ] = '' ;
2016-03-08 20:21:56 +01:00
2019-07-12 11:24:59 +02:00
// Set 'YES' to use TLS when sending emails.
$CONF [ 'smtp_sendmail_tls' ] = 'NO' ;
2007-03-24 08:27:00 +01:00
// Encrypt
// In what way do you want the passwords to be crypted?
// md5crypt = internal postfix admin md5
2007-11-18 22:43:10 +01:00
// md5 = md5 sum of the password
2007-03-24 08:27:00 +01:00
// system = whatever you have set as your PHP system default
// cleartext = clear text passwords (ouch!)
2009-01-15 15:32:43 +01:00
// mysql_encrypt = useful for PAM integration
2016-10-18 21:49:13 +02:00
// authlib = support for courier-authlib style passwords - also set $CONF['authlib_default_flavor']
2009-03-14 00:32:20 +01:00
// dovecot:CRYPT-METHOD = use dovecotpw -s 'CRYPT-METHOD'. Example: dovecot:CRAM-MD5
2020-04-01 22:31:16 +02:00
// php_crypt:CRYPT-METHOD:DIFFICULTY:PREFIX = use PHP built in crypt()-function. Example: php_crypt:SHA512:50000
2018-05-29 02:36:08 +02:00
// - php_crypt CRYPT-METHOD: Supported values are DES, MD5, BLOWFISH, SHA256, SHA512
// - php_crypt DIFFICULTY: Larger value is more secure, but uses more CPU and time for each login.
// - php_crypt DIFFICULTY: Set this according to your CPU processing power.
// - php_crypt DIFFICULTY: Supported values are BLOWFISH:4-31, SHA256:1000-999999999, SHA512:1000-999999999
// - php_crypt DIFFICULTY: leave empty to use default values (BLOWFISH:10, SHA256:5000, SHA512:5000). Example: php_crypt:SHA512
2016-04-12 01:54:34 +02:00
// 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
2020-04-01 22:31:16 +02:00
// - php_crypt PREFIX: hash has specified prefix - example: php_crypt:SHA512::{SHA256-CRYPT}
2020-03-14 23:30:51 +01:00
// sha512.b64 - {SHA512-CRYPT.B64} (base64 encoded sha512) (no dovecot dependency; should support migration from md5crypt)
2007-03-24 08:27:00 +01:00
$CONF [ 'encrypt' ] = 'md5crypt' ;
2013-10-31 22:58:14 +01:00
// In what flavor should courier-authlib style passwords be encrypted?
2016-10-18 21:49:13 +02:00
// (only used if $CONF['encrypt'] == 'authlib')
2009-02-03 18:50:13 +01:00
// md5 = {md5} + base64 encoded md5 hash
// md5raw = {md5raw} + plain encoded md5 hash
2009-10-24 02:11:09 +02:00
// SHA = {SHA} + base64-encoded sha1 hash
2013-10-31 22:58:14 +01:00
// crypt = {crypt} + Standard UNIX DES-encrypted with 2-character salt
2009-02-03 18:50:13 +01:00
$CONF [ 'authlib_default_flavor' ] = 'md5raw' ;
2009-03-14 00:32:20 +01:00
// If you use the dovecot encryption method: where is the dovecotpw binary located?
2012-07-01 23:27:43 +02:00
// for dovecot 1.x
// $CONF['dovecotpw'] = "/usr/sbin/dovecotpw";
// for dovecot 2.x (dovecot 2.0.0 - 2.0.7 is not supported!)
$CONF [ 'dovecotpw' ] = " /usr/sbin/doveadm pw " ;
2018-04-29 22:58:57 +02:00
if ( @ file_exists ( '/usr/bin/doveadm' )) { // @ to silence openbase_dir stuff; see https://github.com/postfixadmin/postfixadmin/issues/171
2017-06-25 19:49:32 +02:00
$CONF [ 'dovecotpw' ] = " /usr/bin/doveadm pw " ; # debian
}
2009-03-14 00:32:20 +01:00
2011-09-25 20:39:20 +02:00
// Password validation
// New/changed passwords will be validated using all regular expressions in the array.
// If a password doesn't match one of the regular expressions, the corresponding
2019-12-27 20:42:34 +01:00
// error message from $PALANG (see languages/*.lang) will be displayed.
2011-09-25 20:39:20 +02:00
// See http://de3.php.net/manual/en/reference.pcre.pattern.syntax.php for details
// about the regular expression syntax.
// If you need custom error messages, you can add them using $CONF['language_hook'].
// If a $PALANG text contains a %s, you can add its value after the $PALANG key
// (separated with a space).
$CONF [ 'password_validation' ] = array (
# '/regular expression/' => '$PALANG key (optional: + parameter)',
'/.{5}/' => 'password_too_short 5' , # minimum length 5 characters
2021-01-17 23:31:53 +01:00
'/([a-zA-Z].*){3}/' => 'password_no_characters 3' , # must contain at least 3 consecutive characters
2011-09-25 20:39:20 +02:00
'/([0-9].*){2}/' => 'password_no_digits 2' , # must contain at least 2 digits
2020-11-09 22:40:52 +01:00
/* support a 'callable' value which if it returns a non-empty string will be assumed to have failed. */
/**
* 'any-key' => function ( $password ) {
* if ( rand ( 0 , 5 ) == 0 ) { return 'password_too_short' ; }
* // add some remote api check here ... or whatever
* },
*/
2011-09-25 20:39:20 +02:00
);
2007-10-04 15:53:45 +02:00
2007-03-24 08:27:00 +01:00
// Generate Password
// Generate a random password for a mailbox or admin and display it.
2013-02-19 23:36:10 +01:00
// If you want to automagically generate passwords set this to 'YES'.
2007-03-24 08:27:00 +01:00
$CONF [ 'generate_password' ] = 'NO' ;
// Show Password
// Always show password after adding a mailbox or admin.
// If you want to always see what password was set set this to 'YES'.
$CONF [ 'show_password' ] = 'NO' ;
// Page Size
// Set the number of entries that you would like to see
// in one page.
$CONF [ 'page_size' ] = '10' ;
// Default Aliases
// The default aliases that need to be created for all domains.
2014-09-28 12:39:42 +02:00
// 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
2007-03-24 08:27:00 +01:00
$CONF [ 'default_aliases' ] = array (
2007-10-04 15:53:45 +02:00
'abuse' => 'abuse@change-this-to-your.domain.tld' ,
'hostmaster' => 'hostmaster@change-this-to-your.domain.tld' ,
'postmaster' => 'postmaster@change-this-to-your.domain.tld' ,
'webmaster' => 'webmaster@change-this-to-your.domain.tld'
2007-03-24 08:27:00 +01:00
);
// Mailboxes
// If you want to store the mailboxes per domain set this to 'YES'.
2008-03-05 01:09:46 +01:00
// Examples:
// YES: /usr/local/virtual/domain.tld/username@domain.tld
// NO: /usr/local/virtual/username@domain.tld
2012-07-01 23:27:43 +02:00
$CONF [ 'domain_path' ] = 'YES' ;
2007-03-24 08:27:00 +01:00
// If you don't want to have the domain in your mailbox set this to 'NO'.
2008-03-05 01:09:46 +01:00
// Examples:
// YES: /usr/local/virtual/domain.tld/username@domain.tld
// NO: /usr/local/virtual/domain.tld/username
// Note: If $CONF['domain_path'] is set to NO, this setting will be forced to YES.
2012-07-01 23:27:43 +02:00
$CONF [ 'domain_in_mailbox' ] = 'NO' ;
2010-09-27 01:14:42 +02:00
// 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' ] = 'NO' ;
/*
maildir_name_hook example function
2013-02-20 00:08:01 +01:00
Called when creating a mailbox if $CONF [ 'maildir_name_hook' ] == '<name_of_the_function>'
2010-09-27 01:14:42 +02:00
- 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 / example . com / user /
*/
/*
function maildir_name_hook ( $domain , $user ) {
$chars = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ " ;
$dir_index = hexdec ( substr ( md5 ( $domain ), 28 )) % strlen ( $chars );
$dir = substr ( $chars , $dir_index , 1 );
return sprintf ( " %s/%s/%s/ " , $dir , $domain , $user );
}
*/
2011-12-21 00:07:34 +01:00
/*
* _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 , but it does not create it in the database . You have to do
that yourself .
Please follow the naming policy for custom database fields and tables on
2016-10-20 23:26:13 +02:00
https :// sourceforge . net / p / postfixadmin / wiki / Custom_fields /
2011-12-21 00:07:34 +01:00
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 [ 'superadmin' ][ 'editable' ] = 0 ; # make the 'superadmin' flag read-only
$struct [ 'superadmin' ][ 'display_in_form' ] = 0 ; # don't display the 'superadmin' flag in edit form
$struct [ 'x_newfield' ] = pacol ( [ ... ] ); # additional field 'x_newfield'
return $struct ; # important!
}
$CONF [ 'admin_struct_hook' ] = 'x_struct_admin_modify' ;
*/
$CONF [ 'admin_struct_hook' ] = '' ;
$CONF [ 'domain_struct_hook' ] = '' ;
2013-11-16 21:38:15 +01:00
$CONF [ 'alias_struct_hook' ] = '' ;
$CONF [ 'mailbox_struct_hook' ] = '' ;
2011-12-21 00:07:34 +01:00
$CONF [ 'alias_domain_struct_hook' ] = '' ;
2015-04-04 15:58:42 +02:00
$CONF [ 'fetchmail_struct_hook' ] = '' ;
2011-12-21 00:07:34 +01:00
2007-03-24 08:27:00 +01:00
// Default Domain Values
// Specify your default values below. Quota in MB.
$CONF [ 'aliases' ] = '10' ;
$CONF [ 'mailboxes' ] = '10' ;
$CONF [ 'maxquota' ] = '10' ;
2011-04-19 22:18:46 +02:00
$CONF [ 'domain_quota_default' ] = '2048' ;
2007-03-24 08:27:00 +01:00
// Quota
// When you want to enforce quota for your mailbox users set this to 'YES'.
2009-05-21 15:03:46 +02:00
$CONF [ 'quota' ] = 'NO' ;
2011-04-19 22:18:46 +02:00
// If you want to enforce domain-level quotas set this to 'YES'.
$CONF [ 'domain_quota' ] = 'YES' ;
2007-03-24 08:27:00 +01:00
// You can either use '1024000' or '1048576'
$CONF [ 'quota_multiplier' ] = '1024000' ;
2019-03-16 16:04:22 +01:00
// fill state threshold (in per cent) for medium level (displayed as orange)
$CONF [ 'quota_level_med_pct' ] = 55 ;
// fill state threshold (in per cent) for high level (displayed as red)
$CONF [ 'quota_level_high_pct' ] = 90 ;
2007-03-24 08:27:00 +01:00
// Transport
// If you want to define additional transport options for a domain set this to 'YES'.
// Read the transport file of the Postfix documentation.
$CONF [ 'transport' ] = 'NO' ;
// Transport options
// If you want to define additional transport options put them in array below.
$CONF [ 'transport_options' ] = array (
2007-10-04 15:53:45 +02:00
'virtual' , // for virtual accounts
'local' , // for system accounts
'relay' // for backup mx
2007-03-24 08:27:00 +01:00
);
// Transport default
// You should define default transport. It must be in array above.
$CONF [ 'transport_default' ] = 'virtual' ;
2012-04-19 23:55:36 +02:00
2012-04-23 22:57:54 +02:00
//
//
// Virtual Vacation Stuff
//
//
2007-03-24 08:27:00 +01:00
// If you want to use virtual vacation for you mailbox users set this to 'YES'.
2009-08-01 16:40:48 +02:00
// NOTE: Make sure that you install the vacation module. (See VIRTUAL-VACATION/)
2007-03-24 08:27:00 +01:00
$CONF [ 'vacation' ] = 'NO' ;
2012-04-23 22:57:54 +02:00
2007-03-24 08:27:00 +01:00
// 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).
2014-10-07 18:11:49 +02:00
// This domain must exclusively be used for vacation. Do NOT use it for "normal" mail addresses.
2007-03-24 08:27:00 +01:00
$CONF [ 'vacation_domain' ] = 'autoreply.change-this-to-your.domain.tld' ;
// Vacation Control
2007-06-20 00:38:05 +02:00
// If you want users to take control of vacation set this to 'YES'.
2007-03-24 08:27:00 +01:00
$CONF [ 'vacation_control' ] = 'YES' ;
// Vacation Control for admins
// Set to 'YES' if your domain admins should be able to edit user vacation.
$CONF [ 'vacation_control_admin' ] = 'YES' ;
2012-04-23 22:57:54 +02:00
// ReplyType options
// If you want to define additional reply options put them in array below.
2013-12-22 17:50:55 +01:00
// The array has the format seconds between replies => $PALANG text
// Special values for seconds are:
// 0 => only reply to the first mail while on vacation
// 1 => reply on every mail
2012-04-23 22:57:54 +02:00
$CONF [ 'vacation_choice_of_reply' ] = array (
2013-12-22 17:50:55 +01:00
0 => 'reply_once' , // Sends only Once the message during Out of Office
# considered annoying - only send a reply on every mail if you really need it
# 1 => 'reply_every_mail', // Reply on every email
60 * 60 * 24 * 7 => 'reply_once_per_week' // Reply if last autoreply was at least a week ago
2012-04-19 23:55:36 +02:00
);
2012-04-23 22:57:54 +02:00
//
// End Vacation Stuff.
//
2012-04-19 23:55:36 +02:00
2007-03-24 08:27:00 +01:00
// 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 'YES'.
2011-01-02 22:32:48 +01:00
2017-07-09 14:33:44 +02:00
// If you don't want edit alias tab (user mode) set this to 'NO';
$CONF [ 'edit_alias' ] = 'YES' ;
2011-01-02 22:32:48 +01:00
// Alias control for superadmins
2012-07-01 23:27:43 +02:00
$CONF [ 'alias_control' ] = 'YES' ;
2007-03-24 08:27:00 +01:00
2011-01-02 22:32:48 +01:00
// Alias Control for domain admins
2012-07-01 23:27:43 +02:00
$CONF [ 'alias_control_admin' ] = 'YES' ;
2007-03-24 08:27:00 +01:00
// Special Alias Control
2011-01-02 22:32:48 +01:00
// Set to 'NO' if your domain admins shouldn't be able to edit the default aliases
// as defined in $CONF['default_aliases']
2007-03-24 08:27:00 +01:00
$CONF [ 'special_alias_control' ] = 'NO' ;
// Alias Goto Field Limit
// Set the max number of entries that you would like to see
// in one 'goto' field in overview, the rest will be hidden and "[and X more...]" will be added.
// '0' means no limits.
$CONF [ 'alias_goto_limit' ] = '0' ;
2008-07-27 21:06:55 +02:00
// Alias Domains
// Alias domains allow to "mirror" aliases and mailboxes to another domain. This makes
2008-07-27 21:24:09 +02:00
// 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.
2008-07-27 21:06:55 +02:00
// Set to 'NO' to disable alias domains.
$CONF [ 'alias_domain' ] = 'YES' ;
2007-03-24 08:27:00 +01:00
// Backup
// If you don't want backup tab set this to 'NO';
2012-07-01 23:27:43 +02:00
$CONF [ 'backup' ] = 'NO' ;
2007-03-24 08:27:00 +01:00
// Send Mail
// If you don't want sendmail tab set this to 'NO';
$CONF [ 'sendmail' ] = 'YES' ;
2017-02-12 20:39:37 +01:00
// Set this to YES if you want to allow non-super-admins to
2017-02-11 23:16:43 +01:00
// send mails to their users
2017-02-12 20:39:37 +01:00
$CONF [ 'sendmail_all_admins' ] = 'NO' ;
2007-03-24 08:27:00 +01:00
// Logging
// If you don't want logging set this to 'NO';
$CONF [ 'logging' ] = 'YES' ;
2007-10-12 00:27:25 +02:00
// Fetchmail
// If you don't want fetchmail tab set this to 'NO';
$CONF [ 'fetchmail' ] = 'YES' ;
// 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 [ 'fetchmail_extra_options' ] = 'NO' ;
2007-03-24 08:27:00 +01:00
// Header
$CONF [ 'show_header_text' ] = 'NO' ;
$CONF [ 'header_text' ] = ':: Postfix Admin ::' ;
// Footer
// Below information will be on all pages.
// If you don't want the footer information to appear set this to 'NO'.
$CONF [ 'show_footer_text' ] = 'YES' ;
$CONF [ 'footer_text' ] = 'Return to change-this-to-your.domain.tld' ;
$CONF [ 'footer_link' ] = 'http://change-this-to-your.domain.tld' ;
2011-07-29 22:34:36 +02:00
// MOTD ("Motto of the day")
// You can display a MOTD below the menu on all pages.
// This can be configured seperately for users, domain admins and superadmins
$CONF [ 'motd_user' ] = '' ;
$CONF [ 'motd_admin' ] = '' ;
$CONF [ 'motd_superadmin' ] = '' ;
2007-03-24 08:27:00 +01:00
// Welcome Message
// This message is send to every newly created mailbox.
// Change the text between EOM.
$CONF [ 'welcome_text' ] = <<< EOM
Hi ,
Welcome to your new account .
EOM ;
2008-06-08 17:29:44 +02:00
// When creating mailboxes or aliases, check that the domain-part of the
2007-03-24 08:27:00 +01:00
// address is legal by performing a name server look-up.
$CONF [ 'emailcheck_resolve_domain' ] = 'YES' ;
2007-09-11 21:56:59 +02:00
// 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. Also, display indications, for POP/IMAP mailboxes and
// 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://www.w3schools.com/html/html_colornames.asp for a list of
// color names available on most browsers
//set to YES to enable this feature
2012-07-01 23:27:43 +02:00
$CONF [ 'show_status' ] = 'YES' ;
2007-09-11 21:56:59 +02:00
//display a guide to what these colors mean
2012-07-01 23:27:43 +02:00
$CONF [ 'show_status_key' ] = 'YES' ;
2007-09-11 21:56:59 +02:00
// 'show_status_text' will be displayed with the background colors
// associated with each status, you can customize it here
$CONF [ 'show_status_text' ] = ' ' ;
// show_undeliverable is useful if most accounts are delivered to this
// postfix system. If many aliases and mailboxes are forwarded
// elsewhere, you will probably want to disable this.
2012-07-01 23:27:43 +02:00
$CONF [ 'show_undeliverable' ] = 'YES' ;
2007-09-11 21:56:59 +02:00
$CONF [ 'show_undeliverable_color' ] = 'tomato' ;
2008-11-01 21:15:46 +01:00
// mails to these domains will never be flagged as undeliverable
2012-07-01 23:27:43 +02:00
$CONF [ 'show_undeliverable_exceptions' ] = array ( " unixmail.domain.ext " , " exchangeserver.domain.ext " );
2018-12-28 20:57:21 +01:00
// show mailboxes with expired password; requires password_expiration to be enabled
2018-08-21 15:57:06 +02:00
$CONF [ 'show_expired' ] = 'YES' ;
$CONF [ 'show_expired_color' ] = 'orange' ;
// show vacation enabled mailboxes
$CONF [ 'show_vacation' ] = 'YES' ;
$CONF [ 'show_vacation_color' ] = 'turquoise' ;
// show disabled accounts
$CONF [ 'show_disabled' ] = 'YES' ;
$CONF [ 'show_disabled_color' ] = 'grey' ;
// show POP/IMAP mailboxes
2012-07-01 23:27:43 +02:00
$CONF [ 'show_popimap' ] = 'YES' ;
2007-09-11 21:56:59 +02:00
$CONF [ 'show_popimap_color' ] = 'darkgrey' ;
2008-11-01 21:15:46 +01:00
// 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
2007-09-11 21:56:59 +02:00
$CONF [ 'show_custom_domains' ] = array ( " subdomain.domain.ext " , " domain2.ext " );
$CONF [ 'show_custom_colors' ] = array ( " lightgreen " , " lightblue " );
2009-05-03 19:23:48 +02:00
// If you use a recipient_delimiter in your postfix config, you can also honor it when aliases are checked.
// Example: $CONF['recipient_delimiter'] = "+";
// Set to "" to disable this check.
$CONF [ 'recipient_delimiter' ] = " " ;
2007-09-11 21:56:59 +02:00
2007-03-24 08:27:00 +01:00
// 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.
2009-11-16 22:09:14 +01:00
// Parameters: (1) username (2) domain (3) maildir (4) quota
2007-03-24 08:27:00 +01:00
// $CONF['mailbox_postcreation_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postcreation.sh';
2013-11-16 21:38:15 +01:00
$CONF [ 'mailbox_postcreation_script' ] = '' ;
2007-03-24 08:27:00 +01:00
2008-05-25 23:19:58 +02:00
// 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.
2009-11-16 22:09:14 +01:00
// Parameters: (1) username (2) domain (3) maildir (4) quota
2008-05-25 23:19:58 +02:00
// $CONF['mailbox_postedit_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postedit.sh';
2013-11-16 21:38:15 +01:00
$CONF [ 'mailbox_postedit_script' ] = '' ;
2008-05-25 23:19:58 +02:00
2007-03-24 08:27:00 +01:00
// 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.
2009-11-16 22:09:14 +01:00
// Parameters: (1) username (2) domain
2007-03-24 08:27:00 +01:00
// $CONF['mailbox_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postdeletion.sh';
2013-11-16 21:38:15 +01:00
$CONF [ 'mailbox_postdeletion_script' ] = '' ;
2007-03-24 08:27:00 +01:00
// Optional:
2009-01-15 12:19:51 +01:00
// 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.
2010-10-01 00:11:18 +02:00
// Parameters: (1) domain
2009-01-15 13:25:19 +01:00
//$CONF['domain_postcreation_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postcreation.sh';
2013-11-16 21:38:15 +01:00
$CONF [ 'domain_postcreation_script' ] = '' ;
2009-01-15 12:19:51 +01:00
// Optional:
2007-03-24 08:27:00 +01:00
// 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.
2010-10-01 00:11:18 +02:00
// Parameters: (1) domain
2007-03-24 08:27:00 +01:00
// $CONF['domain_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postdeletion.sh';
2013-11-16 21:38:15 +01:00
$CONF [ 'domain_postdeletion_script' ] = '' ;
2007-03-24 08:27:00 +01:00
// 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, then the
// create_mailbox_subdirs_host must also be defined.
2019-09-05 19:12:10 +02:00
// Note: requires imap extension within PHP
2007-03-24 08:27:00 +01:00
// $CONF['create_mailbox_subdirs']=array('Spam');
2013-11-16 21:38:15 +01:00
$CONF [ 'create_mailbox_subdirs' ] = array ();
$CONF [ 'create_mailbox_subdirs_host' ] = 'localhost' ;
2007-03-24 08:27:00 +01:00
//
2008-08-14 20:58:13 +02:00
// Specify '' for Dovecot and 'INBOX.' for Courier.
2008-08-15 00:08:38 +02:00
$CONF [ 'create_mailbox_subdirs_prefix' ] = 'INBOX.' ;
2009-01-15 12:38:11 +01:00
// Optional:
// Show used quotas from Dovecot dictionary backend in virtual
// mailbox listing.
// See: DOCUMENTATION/DOVECOT.txt
// http://wiki.dovecot.org/Quota/Dict
//
2009-10-19 00:43:13 +02:00
$CONF [ 'used_quotas' ] = 'NO' ;
// if you use dovecot >= 1.2, set this to yes.
// Note about dovecot config: table "quota" is for 1.0 & 1.1, table "quota2" is for dovecot 1.2 and newer
2012-07-01 23:27:43 +02:00
$CONF [ 'new_quota_table' ] = 'YES' ;
2009-01-15 12:38:11 +01:00
2008-08-14 20:58:13 +02:00
//
2007-03-24 08:27:00 +01:00
// Normally, the TCP port number does not have to be specified.
// $CONF['create_mailbox_subdirs_hostport']=143;
//
// If you have trouble connecting to the IMAP-server, then specify
// a value for $CONF['create_mailbox_subdirs_hostoptions']. These
// are some examples to experiment with:
// $CONF['create_mailbox_subdirs_hostoptions']=array('notls');
// $CONF['create_mailbox_subdirs_hostoptions']=array('novalidate-cert','norsh');
// See also the "Optional flags for names" table at
// http://www.php.net/manual/en/function.imap-open.php
2017-03-22 22:08:53 +01:00
$CONF [ 'create_mailbox_subdirs_hostoptions' ] = array ();
2007-03-24 08:27:00 +01:00
2016-10-17 18:12:14 +02:00
// Optional:
// Allows a user to reset his forgotten password with a code sent by email/SMS
2016-10-19 13:06:10 +02:00
$CONF [ 'forgotten_user_password_reset' ] = true ;
2016-10-17 18:12:14 +02:00
// Allows an admin to reset his forgotten password with a code sent by email/SMS
2016-10-19 13:06:10 +02:00
$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
2018-04-22 22:52:13 +02:00
// Note: if no sms_send_function is defined, the input field for the mobile
// number won't be displayed
2016-10-19 13:06:10 +02:00
$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 ;
}
*/
2007-10-12 00:27:25 +02:00
2008-02-21 22:43:58 +01:00
// Theme Config
2020-09-28 21:33:54 +02:00
$CONF [ 'theme' ] = 'default' ;
2019-10-19 17:33:18 +02:00
// Specify your own favicon, logo and CSS file
$CONF [ 'theme_favicon' ] = 'images/favicon.ico' ;
2008-02-21 22:43:58 +01:00
$CONF [ 'theme_logo' ] = 'images/logo-default.png' ;
2020-09-25 22:52:22 +02:00
$CONF [ 'theme_css' ] = 'css/bootstrap.css' ;
2011-07-19 22:24:41 +02:00
// If you want to customize some styles without editing the $CONF['theme_css'] file,
// you can add a custom CSS file. It will be included after $CONF['theme_css'].
$CONF [ 'theme_custom_css' ] = '' ;
2008-02-21 22:43:58 +01:00
2009-08-26 23:38:33 +02:00
// XMLRPC Interface.
2009-11-05 15:55:39 +01:00
// This should be only of use if you wish to use e.g the
2009-08-26 23:38:33 +02:00
// Postfixadmin-Squirrelmail package
// change to boolean true to enable xmlrpc
$CONF [ 'xmlrpc_enabled' ] = false ;
2018-08-17 16:07:14 +02:00
//Account expiration info
2018-12-28 20:14:26 +01:00
//If enabled, mailbox passwords have a password_expiry field set, which is updated each time the password is changed, based on the parent domain's password_expiry (days) value.
2018-08-17 16:07:14 +02:00
//More details in README.password_expiration
2018-12-28 20:14:26 +01:00
$CONF [ 'password_expiration' ] = 'YES' ;
2018-08-17 16:07:14 +02:00
2021-01-14 18:06:49 +01:00
$CONF [ 'version' ] = '3.3.3' ;
2020-09-27 11:47:56 +02:00
2019-10-19 17:33:18 +02:00
// If you want to keep most settings at default values and/or want to ensure
2007-10-12 00:27:25 +02:00
// 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.
2009-04-22 13:31:53 +02:00
if ( file_exists ( dirname ( __FILE__ ) . '/config.local.php' )) {
2015-05-15 20:58:52 +02:00
require_once ( dirname ( __FILE__ ) . '/config.local.php' );
2007-12-02 16:09:39 +01:00
}
2007-11-04 22:06:00 +01:00
2007-03-24 08:27:00 +01:00
//
// END OF CONFIG FILE
//
2007-11-04 22:06:00 +01:00
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */