Ver código fonte

Adds config.inc.php.example as a config template to be copied to config.inc.php

Thomas Leister 9 anos atrás
pai
commit
fa68acc1e4
2 arquivos alterados com 106 adições e 26 exclusões
  1. 7 26
      config/config.inc.php
  2. 99 0
      config/config.inc.php.example

+ 7 - 26
config/config.inc.php

@@ -34,45 +34,26 @@ define("DBC_DOMAINS_DOMAIN", "domain");
 define("DBC_ALIASES_ID", "id");
 define("DBC_ALIASES_SOURCE", "source");
 define("DBC_ALIASES_DESTINATION", "destination");
-// Enable multi source redirects, needs a new column in aliase table with VARCHAR(32)
-//define("DBC_ALIASES_MULTI_SOURCE", "multi_source");	// (Optional, Recommended)
-
-
-/*
- * General options
- */
-// Enable validating that the source addresses are ending with domain from domains
-//define("VALIDATE_ALIASES_SOURCE_DOMAIN_ENABLED", true);	// (Optional, Recommended)
 
 
 /*
  * Frontend paths
  */
 
-define("FRONTEND_BASE_PATH", "http://localhost/webmum/");
-define("SUBDIR", "webmum/");
+define("FRONTEND_BASE_PATH", "http://webmum.localhost.local/");
+define("SUBDIR", "");
 
 
 /*
  * Admin e-mail address
  */
 
-// outdated: define("ADMIN_EMAIL", "admin@domain.tld");
-// new: $admins = array("admin1@server.tld", "admin2@server.tld");
-$admins = array("admin@domain.tld");
-
-
+$admins = array("serveradmin@trashserver.net", "thomas@trashserver.net");
 
 /*
- * Password
- */
- /*
- * Select on of the following schemas (only these are supported)
- * SHA-512, SHA-256, BLOWFISH
+ * Minimal password length
  */
-define("PASS_HASH_SCHEMA", "SHA-512");
- 
-//minimum password length
+
 define("MIN_PASS_LENGTH", 8);
 
 /*
@@ -84,7 +65,8 @@ define("MIN_PASS_LENGTH", 8);
  */
 
 // define("WRITE_LOG", true);
-// define("WRITE_LOG_PATH","/var/www/webmum/log/");
+// define("WRITE_LOG_PATH","/srv/http/webmum/webmum/log/");
+
 
 
 /*
@@ -95,5 +77,4 @@ define("MIN_PASS_LENGTH", 8);
 define("FRONTEND_EMAIL_SEPARATOR_TEXT", ', '); // possible values: ', ' (default), '; ', PHP_EOL (newline)
 define("FRONTEND_EMAIL_SEPARATOR_FORM", ','); // possible values: ',' (default), ';', PHP_EOL (newline)
 
-
 ?>

+ 99 - 0
config/config.inc.php.example

@@ -0,0 +1,99 @@
+<?php
+
+/*
+ * MySQL server and database settings
+ */
+
+define("MYSQL_HOST", "localhost");
+define("MYSQL_USER", "vmail");
+define("MYSQL_PASSWORD", "vmail");
+define("MYSQL_DATABASE", "vmail");
+
+
+/*
+ * Database table names
+ */
+
+// Table names
+define("DBT_USERS", "users");
+define("DBT_DOMAINS", "domains");
+define("DBT_ALIASES", "aliases");
+
+// Users table columns
+define("DBC_USERS_ID", "id");
+define("DBC_USERS_USERNAME", "username");
+define("DBC_USERS_DOMAIN", "domain");
+define("DBC_USERS_PASSWORD", "password");
+// define("DBC_USERS_MAILBOXLIMIT", "mailbox_limit");		// (Optional)
+
+// Domains table columns
+define("DBC_DOMAINS_ID", "id");
+define("DBC_DOMAINS_DOMAIN", "domain");
+
+// Aliases table columns
+define("DBC_ALIASES_ID", "id");
+define("DBC_ALIASES_SOURCE", "source");
+define("DBC_ALIASES_DESTINATION", "destination");
+// Enable multi source redirects, needs a new column in aliase table with VARCHAR(32)
+//define("DBC_ALIASES_MULTI_SOURCE", "multi_source");	// (Optional, Recommended)
+
+
+/*
+ * General options
+ */
+// Enable validating that the source addresses are ending with domain from domains
+//define("VALIDATE_ALIASES_SOURCE_DOMAIN_ENABLED", true);	// (Optional, Recommended)
+
+
+/*
+ * Frontend paths
+ */
+
+define("FRONTEND_BASE_PATH", "http://localhost/webmum/");
+define("SUBDIR", "webmum/");
+
+
+/*
+ * Admin e-mail address
+ */
+
+// outdated: define("ADMIN_EMAIL", "admin@domain.tld");
+// new: $admins = array("admin1@server.tld", "admin2@server.tld");
+$admins = array("admin@domain.tld");
+
+
+
+/*
+ * Password
+ */
+ /*
+ * Select on of the following schemas (only these are supported)
+ * SHA-512, SHA-256, BLOWFISH
+ */
+define("PASS_HASH_SCHEMA", "SHA-512");
+ 
+//minimum password length
+define("MIN_PASS_LENGTH", 8);
+
+/*
+ * Write log file? Failed login attempts will be written to the logfile.
+ * You can mointor the logfile with fail2ban and ban attackers' IP-addresses.
+ * Make sure that PHP has permission to create the log directory and webmum.log (write permissions for php user)
+ *
+ * Default: Do not write logfile
+ */
+
+// define("WRITE_LOG", true);
+// define("WRITE_LOG_PATH","/var/www/webmum/log/");
+
+
+/*
+ * Frontend options
+ */
+
+// Separator for email lists
+define("FRONTEND_EMAIL_SEPARATOR_TEXT", ', '); // possible values: ', ' (default), '; ', PHP_EOL (newline)
+define("FRONTEND_EMAIL_SEPARATOR_FORM", ','); // possible values: ',' (default), ';', PHP_EOL (newline)
+
+
+?>