PostfixAdmin - web based virtual user administration interface for Postfix mail servers https://postfixadmin.github.io/postfixadmin/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

358 lines
13 KiB

  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 :
  10. * http://www.postfixadmin.com or http://postfixadmin.sf.net
  11. *
  12. * @version $Id$
  13. * @license GNU GPL v2 or later.
  14. *
  15. * File: config.inc.php
  16. * Contains configuration options.
  17. */
  18. if (ereg ("config.inc.php", $_SERVER['PHP_SELF']))
  19. {
  20. header ("Location: login.php");
  21. exit;
  22. }
  23. /*****************************************************************
  24. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  25. * The following line needs commenting out or removing before the
  26. * application will run!
  27. * Doing this implies you have changed this file as required.
  28. */
  29. $CONF['configured'] = false;
  30. // Postfix Admin Path
  31. // Set the location of your Postfix Admin installation here.
  32. // YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin
  33. $CONF['postfix_admin_url'] = '';
  34. // shouldn't need changing.
  35. $CONF['postfix_admin_path'] = dirname(__FILE__);
  36. // Language config
  37. // Language files are located in './languages', change as required..
  38. $CONF['default_language'] = 'en';
  39. // Database Config
  40. // mysql = MySQL 3.23 and 4.0, 4.1 or 5
  41. // mysqli = MySQL 4.1+
  42. // pgsql = PostgreSQL
  43. $CONF['database_type'] = 'mysql';
  44. $CONF['database_host'] = 'localhost';
  45. $CONF['database_user'] = 'postfix';
  46. $CONF['database_password'] = 'postfixadmin';
  47. $CONF['database_name'] = 'postfix';
  48. $CONF['database_prefix'] = '';
  49. // Here, if you need, you can customize table names.
  50. $CONF['database_prefix'] = '';
  51. $CONF['database_tables'] = array (
  52. 'admin' => 'admin',
  53. 'alias' => 'alias',
  54. 'alias_domain' => 'alias_domain',
  55. 'config' => 'config',
  56. 'domain' => 'domain',
  57. 'domain_admins' => 'domain_admins',
  58. 'fetchmail' => 'fetchmail',
  59. 'log' => 'log',
  60. 'mailbox' => 'mailbox',
  61. 'vacation' => 'vacation',
  62. 'vacation_notification' => 'vacation_notification',
  63. );
  64. // Site Admin
  65. // Define the Site Admins email address below.
  66. // This will be used to send emails from to create mailboxes.
  67. $CONF['admin_email'] = 'postmaster@change-this-to-your.domain.tld';
  68. // Mail Server
  69. // Hostname (FQDN) of your mail server.
  70. // This is used to send email to Postfix in order to create mailboxes.
  71. $CONF['smtp_server'] = 'localhost';
  72. $CONF['smtp_port'] = '25';
  73. // Encrypt
  74. // In what way do you want the passwords to be crypted?
  75. // md5crypt = internal postfix admin md5
  76. // md5 = md5 sum of the password
  77. // system = whatever you have set as your PHP system default
  78. // cleartext = clear text passwords (ouch!)
  79. $CONF['encrypt'] = 'md5crypt';
  80. // Minimum length required for passwords. Postfixadmin will not
  81. // allow users to set passwords which are shorter than this value.
  82. $CONF['min_password_length'] = 5;
  83. // Generate Password
  84. // Generate a random password for a mailbox or admin and display it.
  85. // If you want to automagically generate paswords set this to 'YES'.
  86. $CONF['generate_password'] = 'NO';
  87. // Show Password
  88. // Always show password after adding a mailbox or admin.
  89. // If you want to always see what password was set set this to 'YES'.
  90. $CONF['show_password'] = 'NO';
  91. // Page Size
  92. // Set the number of entries that you would like to see
  93. // in one page.
  94. $CONF['page_size'] = '10';
  95. // Default Aliases
  96. // The default aliases that need to be created for all domains.
  97. $CONF['default_aliases'] = array (
  98. 'abuse' => 'abuse@change-this-to-your.domain.tld',
  99. 'hostmaster' => 'hostmaster@change-this-to-your.domain.tld',
  100. 'postmaster' => 'postmaster@change-this-to-your.domain.tld',
  101. 'webmaster' => 'webmaster@change-this-to-your.domain.tld'
  102. );
  103. // Mailboxes
  104. // If you want to store the mailboxes per domain set this to 'YES'.
  105. // Examples:
  106. // YES: /usr/local/virtual/domain.tld/username@domain.tld
  107. // NO: /usr/local/virtual/username@domain.tld
  108. $CONF['domain_path'] = 'NO';
  109. // If you don't want to have the domain in your mailbox set this to 'NO'.
  110. // Examples:
  111. // YES: /usr/local/virtual/domain.tld/username@domain.tld
  112. // NO: /usr/local/virtual/domain.tld/username
  113. // Note: If $CONF['domain_path'] is set to NO, this setting will be forced to YES.
  114. $CONF['domain_in_mailbox'] = 'YES';
  115. // Default Domain Values
  116. // Specify your default values below. Quota in MB.
  117. $CONF['aliases'] = '10';
  118. $CONF['mailboxes'] = '10';
  119. $CONF['maxquota'] = '10';
  120. // Quota
  121. // When you want to enforce quota for your mailbox users set this to 'YES'.
  122. $CONF['quota'] = 'NO';
  123. // You can either use '1024000' or '1048576'
  124. $CONF['quota_multiplier'] = '1024000';
  125. // Transport
  126. // If you want to define additional transport options for a domain set this to 'YES'.
  127. // Read the transport file of the Postfix documentation.
  128. $CONF['transport'] = 'NO';
  129. // Transport options
  130. // If you want to define additional transport options put them in array below.
  131. $CONF['transport_options'] = array (
  132. 'virtual', // for virtual accounts
  133. 'local', // for system accounts
  134. 'relay' // for backup mx
  135. );
  136. // Transport default
  137. // You should define default transport. It must be in array above.
  138. $CONF['transport_default'] = 'virtual';
  139. // Virtual Vacation
  140. // If you want to use virtual vacation for you mailbox users set this to 'YES'.
  141. // NOTE: Make sure that you install the vacation module. http://high5.net/postfixadmin/
  142. $CONF['vacation'] = 'NO';
  143. // This is the autoreply domain that you will need to set in your Postfix
  144. // transport maps to handle virtual vacations. It does not need to be a
  145. // real domain (i.e. you don't need to setup DNS for it).
  146. $CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld';
  147. // Vacation Control
  148. // If you want users to take control of vacation set this to 'YES'.
  149. $CONF['vacation_control'] ='YES';
  150. // Vacation Control for admins
  151. // Set to 'YES' if your domain admins should be able to edit user vacation.
  152. $CONF['vacation_control_admin'] = 'YES';
  153. // Alias Control
  154. // Postfix Admin inserts an alias in the alias table for every mailbox it creates.
  155. // The reason for this is that when you want catch-all and normal mailboxes
  156. // to work you need to have the mailbox replicated in the alias table.
  157. // If you want to take control of these aliases as well set this to 'YES'.
  158. $CONF['alias_control'] = 'NO';
  159. // Alias Control for admins
  160. // Set to 'NO' if your domain admins shouldn't be able to edit user aliases.
  161. $CONF['alias_control_admin'] = 'NO';
  162. // Special Alias Control
  163. // Set to 'NO' if your domain admins shouldn't be able to edit default aliases.
  164. $CONF['special_alias_control'] = 'NO';
  165. // Alias Goto Field Limit
  166. // Set the max number of entries that you would like to see
  167. // in one 'goto' field in overview, the rest will be hidden and "[and X more...]" will be added.
  168. // '0' means no limits.
  169. $CONF['alias_goto_limit'] = '0';
  170. // Alias Domains
  171. // Alias domains allow to "mirror" aliases and mailboxes to another domain. This makes
  172. // configuration easier if you need the same set of aliases on multiple domains, but
  173. // also requires postfix to do more database queries.
  174. // Note: If you update from 2.2.x or earlier, you will have to update your postfix configuration.
  175. // Set to 'NO' to disable alias domains.
  176. $CONF['alias_domain'] = 'YES';
  177. // Backup
  178. // If you don't want backup tab set this to 'NO';
  179. $CONF['backup'] = 'YES';
  180. // Send Mail
  181. // If you don't want sendmail tab set this to 'NO';
  182. $CONF['sendmail'] = 'YES';
  183. // Logging
  184. // If you don't want logging set this to 'NO';
  185. $CONF['logging'] = 'YES';
  186. // Fetchmail
  187. // If you don't want fetchmail tab set this to 'NO';
  188. $CONF['fetchmail'] = 'YES';
  189. // fetchmail_extra_options allows users to specify any fetchmail options and any MDA
  190. // (it will even accept 'rm -rf /' as MDA!)
  191. // This should be set to NO, except if you *really* trust *all* your users.
  192. $CONF['fetchmail_extra_options'] = 'NO';
  193. // Header
  194. $CONF['show_header_text'] = 'NO';
  195. $CONF['header_text'] = ':: Postfix Admin ::';
  196. // link to display under 'Main' menu when logged in as a user.
  197. $CONF['user_footer_link'] = "http://change-this-to-your.domain.tld/main";
  198. // Footer
  199. // Below information will be on all pages.
  200. // If you don't want the footer information to appear set this to 'NO'.
  201. $CONF['show_footer_text'] = 'YES';
  202. $CONF['footer_text'] = 'Return to change-this-to-your.domain.tld';
  203. $CONF['footer_link'] = 'http://change-this-to-your.domain.tld';
  204. // Welcome Message
  205. // This message is send to every newly created mailbox.
  206. // Change the text between EOM.
  207. $CONF['welcome_text'] = <<<EOM
  208. Hi,
  209. Welcome to your new account.
  210. EOM;
  211. // When creating mailboxes or aliases, check that the domain-part of the
  212. // address is legal by performing a name server look-up.
  213. $CONF['emailcheck_resolve_domain']='YES';
  214. // Optional:
  215. // Analyze alias gotos and display a colored block in the first column
  216. // indicating if an alias or mailbox appears to deliver to a non-existent
  217. // account. Also, display indications, for POP/IMAP mailboxes and
  218. // for custom destinations (such as mailboxes that forward to a UNIX shell
  219. // account or mail that is sent to a MS exchange server, or any other
  220. // domain or subdomain you use)
  221. // See http://www.w3schools.com/html/html_colornames.asp for a list of
  222. // color names available on most browsers
  223. //set to YES to enable this feature
  224. $CONF['show_status']='NO';
  225. //display a guide to what these colors mean
  226. $CONF['show_status_key']='NO';
  227. // 'show_status_text' will be displayed with the background colors
  228. // associated with each status, you can customize it here
  229. $CONF['show_status_text']='&nbsp;&nbsp;';
  230. // show_undeliverable is useful if most accounts are delivered to this
  231. // postfix system. If many aliases and mailboxes are forwarded
  232. // elsewhere, you will probably want to disable this.
  233. $CONF['show_undeliverable']='NO';
  234. $CONF['show_undeliverable_color']='tomato';
  235. // mails to these domains will never be flagged as undeliverable
  236. $CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext","gmail.com");
  237. $CONF['show_popimap']='NO';
  238. $CONF['show_popimap_color']='darkgrey';
  239. // you can assign special colors to some domains. To do this,
  240. // - add the domain to show_custom_domains
  241. // - add the corresponding color to show_custom_colors
  242. $CONF['show_custom_domains']=array("subdomain.domain.ext","domain2.ext");
  243. $CONF['show_custom_colors']=array("lightgreen","lightblue");
  244. // Optional:
  245. // Script to run after creation of mailboxes.
  246. // Note that this may fail if PHP is run in "safe mode", or if
  247. // operating system features (such as SELinux) or limitations
  248. // prevent the web-server from executing external scripts.
  249. // $CONF['mailbox_postcreation_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postcreation.sh';
  250. // Optional:
  251. // Script to run after alteration of mailboxes.
  252. // Note that this may fail if PHP is run in "safe mode", or if
  253. // operating system features (such as SELinux) or limitations
  254. // prevent the web-server from executing external scripts.
  255. // $CONF['mailbox_postedit_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postedit.sh';
  256. // Optional:
  257. // Script to run after deletion of mailboxes.
  258. // Note that this may fail if PHP is run in "safe mode", or if
  259. // operating system features (such as SELinux) or limitations
  260. // prevent the web-server from executing external scripts.
  261. // $CONF['mailbox_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-mailbox-postdeletion.sh';
  262. // Optional:
  263. // Script to run after deletion of domains.
  264. // Note that this may fail if PHP is run in "safe mode", or if
  265. // operating system features (such as SELinux) or limitations
  266. // prevent the web-server from executing external scripts.
  267. // $CONF['domain_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postdeletion.sh';
  268. // Optional:
  269. // Sub-folders which should automatically be created for new users.
  270. // The sub-folders will also be subscribed to automatically.
  271. // Will only work with IMAP server which implement sub-folders.
  272. // Will not work with POP3.
  273. // If you define create_mailbox_subdirs, then the
  274. // create_mailbox_subdirs_host must also be defined.
  275. //
  276. // $CONF['create_mailbox_subdirs']=array('Spam');
  277. // $CONF['create_mailbox_subdirs_host']='localhost';
  278. //
  279. // Specify '' for Dovecot and 'INBOX.' for Courier.
  280. $CONF['create_mailbox_subdirs_prefix']='INBOX.';
  281. //
  282. // Normally, the TCP port number does not have to be specified.
  283. // $CONF['create_mailbox_subdirs_hostport']=143;
  284. //
  285. // If you have trouble connecting to the IMAP-server, then specify
  286. // a value for $CONF['create_mailbox_subdirs_hostoptions']. These
  287. // are some examples to experiment with:
  288. // $CONF['create_mailbox_subdirs_hostoptions']=array('notls');
  289. // $CONF['create_mailbox_subdirs_hostoptions']=array('novalidate-cert','norsh');
  290. // See also the "Optional flags for names" table at
  291. // http://www.php.net/manual/en/function.imap-open.php
  292. // Theme Config
  293. // Specify your own logo and CSS file
  294. $CONF['theme_logo'] = 'images/logo-default.png';
  295. $CONF['theme_css'] = 'css/default.css';
  296. // If you want to keep most settings at default values and/or want to ensure
  297. // that future updates work without problems, you can use a separate config
  298. // file (config.local.php) instead of editing this file and override some
  299. // settings there.
  300. if (file_exists(dirname(__FILE__) . '/config.local.php')) { # for /
  301. include(dirname(__FILE__) . '/config.local.php');
  302. }
  303. //
  304. // END OF CONFIG FILE
  305. //
  306. /* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */