1<?php 2/** 3 * Postfix Admin 4 * 5 * LICENSE 6 * This source file is subject to the GPL license that is bundled with 7 * this package in the file LICENSE.TXT. 8 * 9 * Further details on the project are available at http://postfixadmin.sf.net 10 * 11 * @license GNU GPL v2 or later. 12 * 13 * File: config.inc.php 14 * Contains configuration options. 15 */ 16 17 18################################################################################ 19# # 20# PostfixAdmin default configuration # 21# # 22# This file contains the PostfixAdmin default configuration settings. # 23# # 24# Please do not edit this file. # 25# # 26# Instead, add the options you want to change/override to # 27# config.local.php (if it doesn't exist, create it). # 28# This will make version upgrades much easier. # 29# # 30################################################################################ 31 32global $CONF; 33 34/***************************************************************** 35 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 36 * You have to set $CONF['configured'] = true; before the 37 * application will run! 38 * Doing this implies you have changed this file as required. 39 * i.e. configuring database etc; specifying setup.php password etc. 40 */ 41$CONF['configured'] = false; 42 43// In order to setup Postfixadmin, you MUST specify a hashed password here. 44// To create the hash, visit setup.php in a browser and type a password into the field, 45// on submission it will be echoed out to you as a hashed value. 46$CONF['setup_password'] = 'changeme'; 47 48// Language config 49// Language files are located in './languages', change as required.. 50$CONF['default_language'] = 'en'; 51 52// Hook to override or add translations in $PALANG 53// Set to the function name you want to use as hook function (see language_hook example function below) 54$CONF['language_hook'] = ''; 55 56/* 57 language_hook example function 58 59 Called if $CONF['language_hook'] == '<name_of_the_function>' 60 Allows to add or override $PALANG interface texts. 61 62 If you add new texts, please always prefix them with 'x_' (for example 63 $PALANG['x_mytext'] = 'foo') to avoid they clash with texts that might be 64 added to languages/*.lang in future versions of PostfixAdmin. 65 66 Please also make sure that all your added texts are included in all 67 sections - that includes all 'case "XY":' sections and the 'default:' 68 section (for users that don't have any of the languages specified 69 in the 'case "XY":' section). 70 Usually the 'default:' section should contain english text. 71 72 If you modify an existing text/translation, please consider to report it 73 to the bugtracker on http://sf.net/projects/postfixadmin so that all users 74 can benefit from the corrected text/translation. 75 76 Returns: modified $PALANG array 77*/ 78/* 79function language_hook($PALANG, $language) { 80 switch ($language) { 81 case "de": 82 $PALANG['x_whatever'] = 'foo'; 83 break; 84 case "fr": 85 $PALANG['x_whatever'] = 'bar'; 86 break; 87 default: 88 $PALANG['x_whatever'] = 'foobar'; 89 } 90 91 return $PALANG; 92} 93*/ 94 95// Database Config 96// mysql = MySQL 3.23 and 4.0, 4.1 or 5 97// mysqli = MySQL 4.1+ or MariaDB 98// pgsql = PostgreSQL 99// sqlite = SQLite 3 100$CONF['database_type'] = 'mysqli'; 101$CONF['database_host'] = 'localhost'; 102$CONF['database_user'] = 'postfix'; 103$CONF['database_password'] = 'postfixadmin'; 104$CONF['database_name'] = 'postfix'; 105 106// Database SSL Config (PDO/MySQLi only) 107$CONF['database_use_ssl'] = false; 108$CONF['database_ssl_key'] = NULL; 109$CONF['database_ssl_cert'] = NULL; 110$CONF['database_ssl_ca'] = NULL; 111$CONF['database_ssl_ca_path'] = NULL; 112$CONF['database_ssl_cipher'] = NULL; 113$CONF['database_ssl_verify_server_cert'] = true; 114 115// If you need to specify a different port for a MYSQL database connection, use e.g. 116// $CONF['database_host'] = '172.30.33.66:3308'; 117// 118// If you need to specify a different port for MySQLi(3306)/POSTGRESQL(5432) database connection 119// uncomment and change the following 120// $CONF['database_port'] = '5432'; 121// 122// If you wish to connect using a local socket file (e.g /var/run/mysql.sock) set this to the socket path. 123// $CONF['database_socket'] = '/var/run/mysql/mysqld.sock'; 124$CONF['database_socket'] = ''; 125 126// If sqlite is used, specify the database file path: 127// $CONF['database_name'] = '/etc/postfix/sqlite/postfixadmin.db' 128 129// Here, if you need, you can customize table names. 130$CONF['database_prefix'] = ''; 131$CONF['database_tables'] = array ( 132 'admin' => 'admin', 133 'alias' => 'alias', 134 'alias_domain' => 'alias_domain', 135 'config' => 'config', 136 'domain' => 'domain', 137 'domain_admins' => 'domain_admins', 138 'fetchmail' => 'fetchmail', 139 'log' => 'log', 140 'mailbox' => 'mailbox', 141 'vacation' => 'vacation', 142 'vacation_notification' => 'vacation_notification', 143 'quota' => 'quota', 144 'quota2' => 'quota2', 145); 146 147// Site Admin 148// Define the Site Admin's email address below. 149// This will be used to send emails from to create mailboxes and 150// from Send Email / Broadcast message pages. 151// Leave blank to send email from the logged-in Admin's Email address. 152$CONF['admin_email'] = ''; 153 154// Define the smtp password for admin_email. 155// This will be used to send emails from to create mailboxes and 156// from Send Email / Broadcast message pages. 157// Leave blank to send emails without authentification 158$CONF['admin_smtp_password'] = ''; 159 160// Site admin name 161// This will be used as signature in notification messages 162$CONF['admin_name'] = 'Postmaster'; 163 164// Mail Server 165// Hostname (FQDN) of your mail server. 166// This is used to send email to Postfix in order to create mailboxes. 167$CONF['smtp_server'] = 'localhost'; 168$CONF['smtp_port'] = '25'; 169 170// SMTP Client 171// Hostname (FQDN) of the server hosting Postfix Admin 172// Used in the HELO when sending emails from Postfix Admin 173$CONF['smtp_client'] = ''; 174 175// Set 'YES' to use TLS when sending emails. 176$CONF['smtp_sendmail_tls'] = 'NO'; 177 178// Encrypt 179// See: https://github.com/postfixadmin/postfixadmin/blob/master/DOCUMENTS/HASHING.md 180// In what way do you want the passwords to be stored in the database, needs to be compatabile with Postfix/MTAs etc. 181// 182// md5crypt = internal postfix admin md5 183// md5 = md5 sum of the password 184// system = whatever you have set as your PHP system default 185// cleartext = clear text passwords (ouch!) 186// mysql_encrypt = useful for PAM integration 187// authlib = support for courier-authlib style passwords - also set $CONF['authlib_default_flavor'] 188// dovecot:CRYPT-METHOD = use dovecotpw -s 'CRYPT-METHOD'. Example: dovecot:CRAM-MD5 189// php_crypt:CRYPT-METHOD:DIFFICULTY:PREFIX = use PHP built in crypt()-function. Example: php_crypt:SHA512:50000 190// - php_crypt CRYPT-METHOD: Supported values are DES, MD5, BLOWFISH, SHA256, SHA512 191// - php_crypt DIFFICULTY: Larger value is more secure, but uses more CPU and time for each login. 192// - php_crypt DIFFICULTY: Set this according to your CPU processing power. 193// - php_crypt DIFFICULTY: Supported values are BLOWFISH:4-31, SHA256:1000-999999999, SHA512:1000-999999999 194// - php_crypt DIFFICULTY: leave empty to use default values (BLOWFISH:10, SHA256:5000, SHA512:5000). Example: php_crypt:SHA512 195// IMPORTANT: 196// - don't use dovecot:* methods that include the username in the hash - you won't be able to login to PostfixAdmin in this case 197// - you'll need at least dovecot 2.1 for salted passwords ('doveadm pw' 2.0.x doesn't support the '-t' option) 198// - dovecot 2.0.0 - 2.0.7 is not supported 199// - php_crypt PREFIX: hash has specified prefix - example: php_crypt:SHA512::{SHA256-CRYPT} 200// sha512.b64 - {SHA512-CRYPT.B64} (base64 encoded sha512) (no dovecot dependency; should support migration from md5crypt) 201$CONF['encrypt'] = 'php_crypt'; 202 203// In what flavor should courier-authlib style passwords be encrypted? 204// (only used if $CONF['encrypt'] == 'authlib') 205// md5 = {md5} + base64 encoded md5 hash 206// md5raw = {md5raw} + plain encoded md5 hash 207// SHA = {SHA} + base64-encoded sha1 hash 208// crypt = {crypt} + Standard UNIX DES-encrypted with 2-character salt 209$CONF['authlib_default_flavor'] = 'md5raw'; 210 211// If you use the dovecot encryption method: where is the dovecotpw binary located? 212// for dovecot 1.x 213// $CONF['dovecotpw'] = "/usr/sbin/dovecotpw"; 214// for dovecot 2.x (dovecot 2.0.0 - 2.0.7 is not supported!) 215#$CONF['dovecotpw'] = "/usr/sbin/doveadm pw"; 216#if(@file_exists('/usr/bin/doveadm')) { // @ to silence openbase_dir stuff; see https://github.com/postfixadmin/postfixadmin/issues/171 217# $CONF['dovecotpw'] = "/usr/bin/doveadm pw"; # debian 218#} 219$CONF['dovecotpw'] = "/usr/local/sbin/dovecotpw"; # FreeBSD 220 221// Password validation 222// New/changed passwords will be validated using all regular expressions in the array. 223// If a password doesn't match one of the regular expressions, the corresponding 224// error message from $PALANG (see languages/*.lang) will be displayed. 225// See http://de3.php.net/manual/en/reference.pcre.pattern.syntax.php for details 226// about the regular expression syntax. 227// If you need custom error messages, you can add them using $CONF['language_hook']. 228// If a $PALANG text contains a %s, you can add its value after the $PALANG key 229// (separated with a space). 230$CONF['password_validation'] = array( 231# '/regular expression/' => '$PALANG key (optional: + parameter)', 232 '/.{5}/' => 'password_too_short 5', # minimum length 5 characters 233 '/([a-zA-Z].*){3}/' => 'password_no_characters 3', # must contain at least 3 characters 234 '/([0-9].*){2}/' => 'password_no_digits 2', # must contain at least 2 digits 235 236 /* support a 'callable' value which if it returns a non-empty string will be assumed to have failed, non-empty string should be a PALANG key */ 237 // 'length_check' => function($password) { if (strlen(trim($password)) < 3) { return 'password_too_short'; } }, 238); 239 240// Generate Password 241// Generate a random password for a mailbox or admin and display it. 242// If you want to automagically generate passwords set this to 'YES'. 243$CONF['generate_password'] = 'NO'; 244 245// Show Password 246// Always show password after adding a mailbox or admin. 247// If you want to always see what password was set set this to 'YES'. 248$CONF['show_password'] = 'NO'; 249 250// Page Size 251// Set the number of entries that you would like to see 252// in one page. 253$CONF['page_size'] = '10'; 254 255// Default Aliases 256// The default aliases that need to be created for all domains. 257// You can specify the target address in two ways: 258// a) a full mail address 259// b) only a localpart ('postmaster' => 'admin') - the alias target will point to the same domain 260$CONF['default_aliases'] = array ( 261 'abuse' => 'abuse@change-this-to-your.domain.tld', 262 'hostmaster' => 'hostmaster@change-this-to-your.domain.tld', 263 'postmaster' => 'postmaster@change-this-to-your.domain.tld', 264 'webmaster' => 'webmaster@change-this-to-your.domain.tld' 265); 266 267// Mailboxes 268// If you want to store the mailboxes per domain set this to 'YES'. 269// Examples: 270// YES: /usr/local/virtual/domain.tld/username@domain.tld 271// NO: /usr/local/virtual/username@domain.tld 272$CONF['domain_path'] = 'YES'; 273// If you don't want to have the domain in your mailbox set this to 'NO'. 274// Examples: 275// YES: /usr/local/virtual/domain.tld/username@domain.tld 276// NO: /usr/local/virtual/domain.tld/username 277// Note: If $CONF['domain_path'] is set to NO, this setting will be forced to YES. 278$CONF['domain_in_mailbox'] = 'NO'; 279// If you want to define your own function to generate a maildir path set this to the name of the function. 280// Notes: 281// - this configuration directive will override both domain_path and domain_in_mailbox 282// - the maildir_name_hook() function example is present below, commented out 283// - if the function does not exist the program will default to the above domain_path and domain_in_mailbox settings 284$CONF['maildir_name_hook'] = 'NO'; 285 286/* 287 maildir_name_hook example function 288 289 Called when creating a mailbox if $CONF['maildir_name_hook'] == '<name_of_the_function>' 290 - allows for customized maildir paths determined by a custom function 291 - the example below will prepend a single-character directory to the 292 beginning of the maildir, splitting domains more or less evenly over 293 36 directories for improved filesystem performance with large numbers 294 of domains. 295 296 Returns: maildir path 297 ie. I/example.com/user/ 298*/ 299/* 300function maildir_name_hook($domain, $user) { 301 $chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 302 303 $dir_index = hexdec(substr(md5($domain), 28)) % strlen($chars); 304 $dir = substr($chars, $dir_index, 1); 305 return sprintf("%s/%s/%s/", $dir, $domain, $user); 306} 307*/ 308 309/* 310 *_struct_hook - change, add or remove fields 311 312 If you need additional fields or want to change or remove existing fields, 313 you can write a hook function to modify $struct in the *Handler classes. 314 315 The edit form will automatically be updated according to the modified 316 $struct. The list page is not yet updated automatically. 317 318 You can define one hook function per class, named like the primary database 319 table of that class. 320 The hook function is called with $struct as parameter and must return the 321 modified $struct. 322 323 Note: Adding a field to $struct adds the handling of this field in 324 PostfixAdmin, but it does not create it in the database. You have to do 325 that yourself. 326 Note: If you add fields here and you want them to be displayed in the 327 virtual lists, you must also modify the corresponding virtual-list template. 328 Please follow the naming policy for custom database fields and tables on 329 https://sourceforge.net/p/postfixadmin/wiki/Custom_fields/ 330 to avoid clashes with future versions of PostfixAdmin. 331 332 See initStruct() in the *Handler class for the default $struct. 333 See pacol() in functions.inc.php for the available flags on each column. 334 335 Example: 336 337 function x_struct_admin_modify($struct) { 338 $struct['superadmin']['editable'] = 0; # make the 'superadmin' flag read-only 339 $struct['superadmin']['display_in_form'] = 0; # don't display the 'superadmin' flag in edit form 340 $struct['x_newfield'] = pacol( [...] ); # additional field 'x_newfield' 341 return $struct; # important! 342 } 343 $CONF['admin_struct_hook'] = 'x_struct_admin_modify'; 344*/ 345$CONF['admin_struct_hook'] = ''; 346$CONF['domain_struct_hook'] = ''; 347$CONF['alias_struct_hook'] = ''; 348$CONF['mailbox_struct_hook'] = ''; 349$CONF['alias_domain_struct_hook'] = ''; 350$CONF['fetchmail_struct_hook'] = ''; 351 352 353// Default Domain Values 354// Specify your default values below. Quota in MB. 355$CONF['aliases'] = '10'; 356$CONF['mailboxes'] = '10'; 357$CONF['maxquota'] = '10'; 358$CONF['domain_quota_default'] = '2048'; 359 360// Quota 361// When you want to enforce quota for your mailbox users set this to 'YES'. 362$CONF['quota'] = 'NO'; 363// If you want to enforce domain-level quotas set this to 'YES'. 364$CONF['domain_quota'] = 'YES'; 365// You can either use '1024000' or '1048576' 366$CONF['quota_multiplier'] = '1024000'; 367// fill state threshold (in per cent) for medium level (displayed as orange) 368$CONF['quota_level_med_pct'] = 55; 369// fill state threshold (in per cent) for high level (displayed as red) 370$CONF['quota_level_high_pct'] = 90; 371 372// Transport 373// If you want to define additional transport options for a domain set this to 'YES'. 374// Read the transport file of the Postfix documentation. 375$CONF['transport'] = 'NO'; 376// Transport options 377// If you want to define additional transport options put them in array below. 378$CONF['transport_options'] = array ( 379 'virtual', // for virtual accounts 380 'local', // for system accounts 381 'relay' // for backup mx 382); 383// Transport default 384// You should define default transport. It must be in array above. 385$CONF['transport_default'] = 'virtual'; 386 387 388// 389// 390// Virtual Vacation Stuff 391// 392// 393 394// If you want to use virtual vacation for you mailbox users set this to 'YES'. 395// NOTE: Make sure that you install the vacation module. (See VIRTUAL-VACATION/) 396$CONF['vacation'] = 'NO'; 397 398// This is the autoreply domain that you will need to set in your Postfix 399// transport maps to handle virtual vacations. It does not need to be a 400// real domain (i.e. you don't need to setup DNS for it). 401// This domain must exclusively be used for vacation. Do NOT use it for "normal" mail addresses. 402$CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld'; 403 404// Vacation Control 405// If you want users to take control of vacation set this to 'YES'. 406$CONF['vacation_control'] ='YES'; 407 408// Vacation Control for admins 409// Set to 'YES' if your domain admins should be able to edit user vacation. 410$CONF['vacation_control_admin'] = 'YES'; 411 412// ReplyType options 413// If you want to define additional reply options put them in array below. 414// The array has the format seconds between replies => $PALANG text 415// Special values for seconds are: 416// 0 => only reply to the first mail while on vacation 417// 1 => reply on every mail 418$CONF['vacation_choice_of_reply'] = array ( 419 0 => 'reply_once', // Sends only Once the message during Out of Office 420 # considered annoying - only send a reply on every mail if you really need it 421 # 1 => 'reply_every_mail', // Reply on every email 422 60*60 *24*7 => 'reply_once_per_week' // Reply if last autoreply was at least a week ago 423); 424 425// 426// End Vacation Stuff. 427// 428 429// Alias Control 430// Postfix Admin inserts an alias in the alias table for every mailbox it creates. 431// The reason for this is that when you want catch-all and normal mailboxes 432// to work you need to have the mailbox replicated in the alias table. 433// If you want to take control of these aliases as well set this to 'YES'. 434 435// If you don't want edit alias tab (user mode) set this to 'NO'; 436$CONF['edit_alias'] = 'YES'; 437 438// Alias control for superadmins 439$CONF['alias_control'] = 'YES'; 440 441// Alias Control for domain admins 442$CONF['alias_control_admin'] = 'YES'; 443 444// Special Alias Control 445// Set to 'NO' if your domain admins shouldn't be able to edit the default aliases 446// as defined in $CONF['default_aliases'] 447$CONF['special_alias_control'] = 'NO'; 448 449// Alias Goto Field Limit 450// Set the max number of entries that you would like to see 451// in one 'goto' field in overview, the rest will be hidden and "[and X more...]" will be added. 452// '0' means no limits. 453$CONF['alias_goto_limit'] = '0'; 454 455// Alias Domains 456// Alias domains allow to "mirror" aliases and mailboxes to another domain. This makes 457// configuration easier if you need the same set of aliases on multiple domains, but 458// also requires postfix to do more database queries. 459// Note: If you update from 2.2.x or earlier, you will have to update your postfix configuration. 460// Set to 'NO' to disable alias domains. 461$CONF['alias_domain'] = 'YES'; 462 463// Backup 464// If you don't want backup tab set this to 'NO'; 465$CONF['backup'] = 'NO'; 466 467// Send Mail 468// If you don't want sendmail tab set this to 'NO'; 469$CONF['sendmail'] = 'YES'; 470// Set this to YES if you want to allow non-super-admins to 471// send mails to their users 472$CONF['sendmail_all_admins'] = 'NO'; 473 474// Logging 475// If you don't want logging set this to 'NO'; 476$CONF['logging'] = 'YES'; 477 478// Fetchmail 479// If you don't want fetchmail tab set this to 'NO'; 480$CONF['fetchmail'] = 'YES'; 481 482// fetchmail_extra_options allows users to specify any fetchmail options and any MDA 483// (it will even accept 'rm -rf /' as MDA!) 484// This should be set to NO, except if you *really* trust *all* your users. 485$CONF['fetchmail_extra_options'] = 'NO'; 486 487// Header 488$CONF['show_header_text'] = 'NO'; 489$CONF['header_text'] = ':: Postfix Admin ::'; 490 491// Footer 492// Below information will be on all pages. 493// If you don't want the footer information to appear set this to 'NO'. 494$CONF['show_footer_text'] = 'YES'; 495$CONF['footer_text'] = 'Return to change-this-to-your.domain.tld'; 496$CONF['footer_link'] = 'http://change-this-to-your.domain.tld'; 497 498// MOTD ("Motto of the day") 499// You can display a MOTD below the menu on all pages. 500// This can be configured seperately for users, domain admins and superadmins 501$CONF['motd_user'] = ''; 502$CONF['motd_admin'] = ''; 503$CONF['motd_superadmin'] = ''; 504 505// Welcome Message 506// This message is send to every newly created mailbox. 507// Change the text between EOM. 508$CONF['welcome_text'] = <<<EOM 509Hi, 510 511Welcome to your new account. 512EOM; 513 514// When creating mailboxes or aliases, check that the domain-part of the 515// address is legal by performing a name server look-up. 516$CONF['emailcheck_resolve_domain']='YES'; 517 518 519// Optional: 520// Analyze alias gotos and display a colored block in the first column 521// indicating if an alias or mailbox appears to deliver to a non-existent 522// account. Also, display indications, for POP/IMAP mailboxes and 523// for custom destinations (such as mailboxes that forward to a UNIX shell 524// account or mail that is sent to a MS exchange server, or any other 525// domain or subdomain you use) 526// See http://www.w3schools.com/html/html_colornames.asp for a list of 527// color names available on most browsers 528 529//set to YES to enable this feature 530$CONF['show_status']='YES'; 531//display a guide to what these colors mean 532$CONF['show_status_key']='YES'; 533// 'show_status_text' will be displayed with the background colors 534// associated with each status, you can customize it here 535$CONF['show_status_text']=' '; 536// show_undeliverable is useful if most accounts are delivered to this 537// postfix system. If many aliases and mailboxes are forwarded 538// elsewhere, you will probably want to disable this. 539$CONF['show_undeliverable']='YES'; 540$CONF['show_undeliverable_color']='tomato'; 541// mails to these domains will never be flagged as undeliverable 542$CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext"); 543// show mailboxes with expired password; requires password_expiration to be enabled 544$CONF['show_expired']='YES'; 545$CONF['show_expired_color']='orange'; 546// show vacation enabled mailboxes 547$CONF['show_vacation']='YES'; 548$CONF['show_vacation_color']='turquoise'; 549// show disabled accounts 550$CONF['show_disabled']='YES'; 551$CONF['show_disabled_color']='grey'; 552// show POP/IMAP mailboxes 553$CONF['show_popimap']='YES'; 554$CONF['show_popimap_color']='darkgrey'; 555// you can assign special colors to some domains. To do this, 556// - add the domain to show_custom_domains 557// - add the corresponding color to show_custom_colors 558$CONF['show_custom_domains']=array("subdomain.domain.ext","domain2.ext"); 559$CONF['show_custom_colors']=array("lightgreen","lightblue"); 560// If you use a recipient_delimiter in your postfix config, you can also honor it when aliases are checked. 561// Example: $CONF['recipient_delimiter'] = "+"; 562// Set to "" to disable this check. 563$CONF['recipient_delimiter'] = ""; 564 565/** 566 * NOTE FOR OPTIONAL SCRIPTS BELOW. 567 * 568 * These scripts will probably be called by your webserver user (typically 'www-data'). 569 * 570 * Execution may fail for a number of reasons, perhaps : 571 * * PHP is running in 'safe mode' 572 * * you have operating system features like SELinux or Apparmor 573 * * Unix file ownership/permission restrictions 574 * 575 * Your mail system probably requires different ownership (e.g. courier, dovecot, mail ...) 576 * 577 * You will probably need to use 'sudo' either within the script, or when calling it, to resolve issues of ownership/permission. 578 * 579 * Details about errors from execution should be logged into PHP's error_log. 580 * 581 * See also: https://github.com/postfixadmin/postfixadmin/blob/master/DOCUMENTS/FAQ.txt 582 * 583 */ 584 585// Optional: See NOTE above. 586// Script to run after creation of mailboxes. 587// Parameters: (1) username (2) domain (3) maildir (4) quota 588// $CONF['mailbox_postcreation_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postcreation.sh'; 589$CONF['mailbox_postcreation_script'] = ''; 590 591// Optional: See NOTE above. 592// Script to run after alteration of mailboxes. 593// Parameters: (1) username (2) domain (3) maildir (4) quota 594// $CONF['mailbox_postedit_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postedit.sh'; 595$CONF['mailbox_postedit_script'] = ''; 596 597// Optional: See NOTE above. 598// Script to run after deletion of mailboxes. 599// Parameters: (1) username (2) domain 600// $CONF['mailbox_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postdeletion.sh'; 601$CONF['mailbox_postdeletion_script'] = ''; 602 603// Optional: See NOTE above. 604// Script to run after setting a mailbox password. (New mailbox [old password = empty] or change existing password) 605// Disables changing password without entering old password. 606// Parameters: (1) username (2) domain 607// STDIN: old password + \0 + new password 608// $CONF['mailbox_postpassword_script']='sudo -u dovecot /usr/local/bin/postfixadmin-mailbox-postpassword.sh'; 609$CONF['mailbox_postpassword_script'] = ''; 610 611// Optional: See NOTE above. 612// Script to run after creation of domains. 613// Parameters: (1) domain 614//$CONF['domain_postcreation_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postcreation.sh'; 615$CONF['domain_postcreation_script'] = ''; 616 617// Optional: See NOTE above. 618// Script to run after alteation of domains. 619// Parameters: (1) domain 620//$CONF['domain_postedit_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postedit.sh'; 621$CONF['domain_postedit_script'] = ''; 622 623// Optional: See NOTE above. 624// Script to run after deletion of domains. 625// Parameters: (1) domain 626// $CONF['domain_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postdeletion.sh'; 627$CONF['domain_postdeletion_script'] = ''; 628 629// Optional: 630// Sub-folders which should automatically be created for new users. 631// The sub-folders will also be subscribed to automatically. 632// Will only work with IMAP server which implement sub-folders. 633// Will not work with POP3. 634// If you define create_mailbox_subdirs, then the 635// create_mailbox_subdirs_host must also be defined. 636// Note: requires imap extension within PHP 637// $CONF['create_mailbox_subdirs']=array('Spam'); 638$CONF['create_mailbox_subdirs'] = array(); 639$CONF['create_mailbox_subdirs_host']='localhost'; 640// 641// Specify '' for Dovecot and 'INBOX.' for Courier. 642$CONF['create_mailbox_subdirs_prefix']='INBOX.'; 643 644// Optional: 645// Show used quotas from Dovecot dictionary backend in virtual 646// mailbox listing. 647// See: DOCUMENTATION/DOVECOT.txt 648// http://wiki.dovecot.org/Quota/Dict 649// 650$CONF['used_quotas'] = 'NO'; 651 652// if you use dovecot >= 1.2, set this to yes. 653// Note about dovecot config: table "quota" is for 1.0 & 1.1, table "quota2" is for dovecot 1.2 and newer 654$CONF['new_quota_table'] = 'YES'; 655 656// 657// Normally, the TCP port number does not have to be specified. 658// $CONF['create_mailbox_subdirs_hostport']=143; 659// 660// If you have trouble connecting to the IMAP-server, then specify 661// a value for $CONF['create_mailbox_subdirs_hostoptions']. These 662// are some examples to experiment with: 663// $CONF['create_mailbox_subdirs_hostoptions']=array('notls'); 664// $CONF['create_mailbox_subdirs_hostoptions']=array('novalidate-cert','norsh'); 665// See also the "Optional flags for names" table at 666// http://www.php.net/manual/en/function.imap-open.php 667$CONF['create_mailbox_subdirs_hostoptions'] = array(); 668 669// Optional: 670// Allows a user to reset his forgotten password with a code sent by email/SMS 671$CONF['forgotten_user_password_reset'] = true; 672// Allows an admin to reset his forgotten password with a code sent by email/SMS 673$CONF['forgotten_admin_password_reset'] = false; 674 675// Name of the function to send a SMS 676// Please use a name that begins with "x_" to prevent collisions 677// This function must accept 2 parameters: phone number and message, 678// and return true on success or false on failure 679// Note: if no sms_send_function is defined, the input field for the mobile 680// number won't be displayed 681$CONF['sms_send_function'] = ''; 682 683/* 684// Example of send SMS function using Clickatell HTTP API 685function x_send_sms_clickatell($to, $message) { 686 687 $clickatell_api_id = 'CHANGEME'; 688 $clickatell_user = 'CHANGEME'; 689 $clickatell_password = 'CHANGEME'; 690 $clickatell_sender = 'CHANGEME'; 691 692 $url = 'https://api.clickatell.com/http/sendmsg?api_id=%s&user=%s&password=%s&to=%s&from=%s&text=%s'; 693 694 $url = sprintf($url, $clickatell_api_id, $clickatell_user, $clickatell_password, $to, $clickatell_sender, urlencode($message)); 695 696 $result = file_get_contents($url); 697 698 return $result !== false; 699} 700*/ 701 702// Theme Config 703$CONF['theme'] = 'default'; 704// Specify your own favicon, logo and CSS file 705$CONF['theme_favicon'] = 'images/favicon.ico'; 706$CONF['theme_logo'] = 'images/logo-default.png'; 707$CONF['theme_css'] = 'css/bootstrap.css'; 708// If you want to customize some styles without editing the $CONF['theme_css'] file, 709// you can add a custom CSS file. It will be included after $CONF['theme_css']. 710$CONF['theme_custom_css'] = ''; 711 712// XMLRPC Interface. 713// This should be only of use if you wish to use e.g the 714// Postfixadmin-Squirrelmail package 715// change to boolean true to enable xmlrpc 716$CONF['xmlrpc_enabled'] = false; 717 718//Account expiration info 719//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. 720//More details in Password_Expiration.md 721$CONF['password_expiration'] = 'YES'; 722 723// If defined, use this rather than trying to construct it from $_SERVER parameters. 724// used in (at least) password-recover.php. 725$CONF['site_url'] = null; 726 727$CONF['version'] = '3.4-dev'; 728 729// If you want to keep most settings at default values and/or want to ensure 730// that future updates work without problems, you can use a separate config 731// file (config.local.php) instead of editing this file and override some 732// settings there. 733if (file_exists(dirname(__FILE__) . '/config.local.php')) { 734 require_once(dirname(__FILE__) . '/config.local.php'); 735} 736 737// 738// END OF CONFIG FILE 739// 740/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */ 741