Skip to content
Commits on Source (184)
# Which code branch to use
# Contributing to ISPConfig
ISPConfig is a open source project and community contributions are very welcome. To contribute, please stick to the guidelines.
The master branch is used for code (mostly new features) that shall go into the next major release (e.g. 3.2, 3.3 and so on). The stable branch (e.g. stable-3.1, stable-3.2) is the branch for the current intermediate and bugfix releases. Bugfixes shall be committed to the current stable branch and not the master branch. The stable branch is merged to the master automatically from time to time, please do not submit bugfixes a second time against the master.
This document is under development and will be continuously improved.
# Issues
* Before opening a new issue, use the search function to check if there isn't a bug report / feature request already.
* If you are reporting a bug, please share your OS and PHP (CLI) version.
* If you want to report several bugs or request several features, open a separate issue for each one of them.
# Branches
* Please create an issue for each contribution you want to make.
* Do not put multiple contributions into a single branch and merge request. Each contribution should have it's own branch.
* Do not use the develop branch in your forked project for your contribution. Create a separate branch for each issue.
* Give your branch a name, e. g. `6049-update-the-contributing-doc ` where 6049 is the issue number.
# Merge requests
Please give your merge request a description that shortly states what it is about. Merge requests without a good title or with missing description will get delayed because it is more effort for us to check the meaning of the changes made.
Once again: Do not put multiple things into a single merge request. If you for example fix two issues where one affects apache and one mail users, use separate issues and separate merge requests.
You can group multiple issues in a single merge request if they have the same specific topic, e. g. if you have one issue stating that a language entry in mail users is missing and a second issue that a language entry for server config is missing, you can put both issues into a single branch and merge request. Be sure to include all issue ids (if multiple) into the merge request's description in this case.
* Open a issue for the bug you want to fix / the feature you want to implement
* After opening the issue, commit your changes to your branch
* Note the issue # in every commit
* Update the documentation (New devs will not have access to this. Please send a email to docs@ispconfig.org)
* Add translations for every language
* Use a short title
* Write a clear description - for example, when updating the contributing guidelines with issue #6049: \
"Update of our contributing guidelines \
Closes #6049"
* Please be aware that we are not able to accept merge request that do not stick to the coding guidelines. We need to insist on that to keep the code clean and maintainable.
# Some guidelines for web development with php.
-----------------------------------------------------
* Unix Line Breaks Only, NO windows breaks please.
* Tabs to indent lines, NO spaces
* no accidental _<?php space before, within or after a file
* every PHP file starts and end with <?php ?> no spaces before or after
* error_reporting(E_ALL|E_STRICT), yep PHP 5
* Magic quotes is gone, get used to it now. config = magic_quotes_gpc() Everything must be quoted
* Don't use ereg, split and other old function -> gone in PHP 5.4
* Don't use features that are not supported in PHP 5.3, for compatibility with LTS OS releases, ISPConfig must support PHP 5.3+
* Don't use shorttags. A Shorttag is <? and that is confusing with <?xml -> always use <?php
* Don't use features that are not supported in PHP 5.4, for compatibility with LTS OS releases, ISPConfig must support PHP 5.4+
* Don't use shorttags. A Shorttag is `<?` and that is confusing with `<?xml` -> always use `<?php`
* Don't use namespaces
* Column names in database tables and database table names are in lowercase
* Classes for the interface are located in interface/lib/classes/ and loaded with $app->uses() or $app->load() functions.
* Classes for the server are located in server/lib/classes/ and loaded with $app->uses() or $app->load() functions.
* please mark any section that need review or work on with /* TODO: short description */
* Make function / var names on the following way, first word lower, next word(s) first letter upper like. getFirstResult();
* always a space but NO newline before opening braces, e. g.
```
class abc {
public function cde() {
if($a == $b) {
return false;
}
}
### Indentations
Indentations are always done with tabs. Do **not** use spaces.
It is recommended to set your IDE to display tabs with a width of 4 spaces.
### Variable and method / function names
Methods and functions should always be written in camel-case. Variables and properties should always be lowercase instead.
**Correct:**
```php
class MyClass {
private $issue_list = [];
private function getMyValue() {
}
}
```
* no spaces after function/method or control names, e. g.
```
function abc($x, $y) {
if($condition == true) {
$x = 2;
}
**Wrong:**
```php
class my_class {
private $IssueList = [];
private function get_my_value() {
}
}
```
and NOT
### Blocks
#### Curly braces
Opening curly braces always have to be in the same line as the preceding condition. They are separated by a single space from the closing paranthesis.
Closing curly braces are always on a separate line after the last statement in the block. The only exception is a do-while block where the logic is inverted.
Curly braces are **always** to be used. Do not leave them out, even if there is only a single statement in the corresponding block.
**Correct:**
```php
if($variable === true) {
}
while($condition) {
}
do {
} while($condition);
```
function abc ($x, $y) {
if ( $condition == true ) {
}
**Wrong:**
```php
if($variable === true){
}
if($variable === true)
{
}
if($variable === true)
$x = 'no braces';
while($condition) { }
```
# Commenting style
#### Short style
The short style of conditional assignments is allowed to be used, but it must not affect readability, e. g. they shall not be nested.
**Allowed:**
```php
$a = 0;
if($condition === true) {
$a = 1;
}
The comments break down into the following types
$a = ($condition === true ? 1 : 0);
```
// is uses for removing lines and debug dev etc
/*
is used to comment out blocks
*/
/** is used to create documentaion
* thats over
* lines
*/
**Disallowed:**
```php
$x = ($condition === true ? ($further == 'foo' ? true : false) : true);
```
If you need to block out a section then use
#### Spaces and paranthesis
The rules for using spaces are:
- no space after `if`/`while` etc. and the following opening paranthesis
- single space after closing paranthesis and before opening curly brace
- no spaces at the end of a line
- no spaces after opening paranthesis and before closing paranthesis
- single space before and after comparators
**Correct:**
```php
if($variable === $condition) {
}
while(($condition !== false || $condition2 === true) && $n <= 15) {
$n++;
}
```
/*
function redundant_code(){
something here
**Wrong:**
```php
if ($variable===$condition) {
}
while(($condition!==false||$condition2===true))&&$n<=15){
}
*/
```
To block out single lines use // and all // are assumed to be redundant test code and NOT comments
// print_r($foo);
#### Newlines inside of conditions
Breaking up conditions into separate lines can be done if it positively affects readability.
```php
if($condition === true && ($state === 'completed' || $state === 'pending') && ($processed_by !== null || $process_time < time())) {
Do not use the phpdoc on every function, eg
}
```
/**
* Login a user
* @param string user username
* @param string password of user
*/
function login($user, $pass){
can also be written as
```php
if($condition === true
&& ($state === 'completed' || $state === 'pending')
&& ($processed_by !== null || $process_time < time())
) {
}
```
as this function is self-explaining, the following clean code will suffice
This must not be abused, e. g. the following is not allowed:
```php
if($a == 1
|| $b == 2) {
}
```
function login($user, $pass){
}
### Arrays
#### Short syntax
Please **do** use short array syntax. We have deprecated the old-style array syntax.
**Correct**:
```php
$var = [];
$var2 = [
'conf' => [
'setting1' => 'value1'
]
];
```
# Where to store custom settings
**Wrong:**
```php
$var = array();
## Interface settings
$var2 = array(
'conf' => array(
'setting1' => 'value1'
)
);
```
#### Spaces and newlines
When defining an empty array, both brackets shall be on the same line. When defining an array with values, the style depends on the values you are going to assign.
##### List of values
When defining an array with a list of values, e. g. numbers or names, they should be on the same line as the brackets without using new lines, as long as the line does not exceed a total number of characters of about 90. After each comma there has to be a single space.
##### Nested array
When defining a nested array onle the opening bracket is to be on the same line. The closing bracket has to be on a separate line indented by `tabs * level of array`.
##### Examples
```php
// empty array
$a = [];
// array with list of values
$array = [4, 3, 76, 12];
// array with long list of values
$array = [
'This is one entry', 'This is a second one', 'Another one', 'Further entries', 'foo', 'bar', 34, 42, $variable, // newline here for better readability
'Next entry', 'the last entry'
];
// nested array
$array = [
'conf' => [
'level' => 1,
'settings' => [
'window' => 'open',
'door' => 'closed
]
]
];
```
**Not-to-dos:**
```php
$array=[
];
$array = [
1,
4,
35,
23,
345,
11,
221,
'further',
'...'
];
$array=['conf'=>['settings'=>['window' => 'open', 'door' => 'closed]]];
```
### Strings
Whenever possible use single quotes `'` instead of double qoutes `"`. Try not to embedd variables in string. Concatenate them instead.
**Correct:**
```php
// simple text
$var = 'This is a text';
// array index
$array['index'] = 'value';
// text with variables
$var = 'This is a text with ' . $value . ' values inside and at the end: ' . $sum_value;
// dynamic array index
$idx = 'index' . $key;
$value = $array[$idx];
```
**Wrong:**
```php
// simple text
$var = "This is a text";
// array index
$array["index"] = 'value';
// text with variables
$var = "This is a text with $value values inside and at the end: {$sum_value}";
// dynamic array index
$value = $array['index' . $key];
$value = $array["index{$key}"];
```
# Where to store custom settings
## Interface settings
The recommended place to store global interface settings is the ini style global config system
(see system.ini.master file in install/tpl/ to set defaults). The settings file
gets stored inside the ispconfig database. Settings can be accessed with the function:
......@@ -109,7 +328,6 @@ fields to the file interface/web/admin/form/system_config.tform.php and the corr
tempalte file in the templates subfolder of the admin module.
## Server settings
Server settings are stored in the ini style server config system (see server.ini.master template file)
The settings file gets stored inside the ispconfig database in the server table. Settings can be
accessed with the function $app->getconf->get_server_config(....)
......
# ISPConfig - Hosting Control Panel
![alt text](https://www.ispconfig.org/wp-content/themes/ispconfig/images/ispconfig_logo.png "") \
Development branch: [![pipeline status](https://git.ispconfig.org/ispconfig/ispconfig3/badges/develop/pipeline.svg)](https://git.ispconfig.org/ispconfig/ispconfig3/commits/develop)
## Functions
- Manage multiple servers from one control panel
- Web server management (Apache2 and nginx)
- Mail server management (with virtual mail users)
- DNS server management (BIND and MyDNS)
- Single server, multiserver and mirrored clusters.
- Webserver management (Apache2 and nginx)
- Mailserver management
- DNS server management (BIND and PowerDNS)
- Virtualization (OpenVZ)
- Administrator, reseller and client login
- Configuration mirroring and clusters
- Administrator, reseller, client and mailuser login
- Open Source software (BSD license)
## Supported daemons
- HTTP: Apache2 and nginx
- HTTP stats: Webalizer, GoAccess and AWStats
- Let's Encrypt: Acme.sh and certbot
- SMTP: Postfix
- POP3/IMAP: Dovecot
- Spamfilter: Rspamd and Amavis
- FTP: PureFTPD
- DNS: BIND9 and PowerDNS
- Database: MariaDB and MySQL
## Supported operating systems
- Debian 9, 10, and testing
- Ubuntu 16.04 - 20.04
- CentOS 7 and 8
## Auto-install script
You can install ISPConfig with our official autoinstaller: https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller/-/blob/master/README.md
## Migration tool
The Migration Tool helps you to import data from other control panels (currently ISPConfig 2 and 3 – 3.2, Plesk 10 – 12.5, Plesk Onyx, CPanel** and Confixx 3). For more information, see https://www.ispconfig.org/add-ons/ispconfig-migration-tool/
** The Migration Toolkit contains now beta support for migrating CPanel to ISPConfig.
## Documentation
You can support ISPConfig development by buying the manual: https://www.ispconfig.org/documentation/
## Contributing
If you like to contribute to the ISPConfig development, please send an email to: dev [at] ispconfig [dot] org.
......@@ -57,58 +57,12 @@ class installer_dist extends installer_base {
$this->error("The postfix configuration directory '$config_dir' does not exist.");
}
//* mysql-virtual_domains.cf
$this->process_postfix_config('mysql-virtual_domains.cf');
//* mysql-virtual_forwardings.cf
$this->process_postfix_config('mysql-virtual_forwardings.cf');
//* mysql-virtual_alias_domains.cf
$this->process_postfix_config('mysql-virtual_alias_domains.cf');
//* mysql-virtual_alias_maps.cf
$this->process_postfix_config('mysql-virtual_alias_maps.cf');
//* mysql-virtual_mailboxes.cf
$this->process_postfix_config('mysql-virtual_mailboxes.cf');
//* mysql-virtual_email2email.cf
$this->process_postfix_config('mysql-virtual_email2email.cf');
//* mysql-virtual_transports.cf
$this->process_postfix_config('mysql-virtual_transports.cf');
//* mysql-virtual_recipient.cf
$this->process_postfix_config('mysql-virtual_recipient.cf');
//* mysql-virtual_sender.cf
$this->process_postfix_config('mysql-virtual_sender.cf');
//* mysql-virtual_sender_login_maps.cf
$this->process_postfix_config('mysql-virtual_sender_login_maps.cf');
//* mysql-virtual_client.cf
$this->process_postfix_config('mysql-virtual_client.cf');
//* mysql-virtual_relaydomains.cf
$this->process_postfix_config('mysql-virtual_relaydomains.cf');
//* mysql-virtual_relayrecipientmaps.cf
$this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf');
//* mysql-virtual_outgoing_bcc.cf
$this->process_postfix_config('mysql-virtual_outgoing_bcc.cf');
//* mysql-virtual_policy_greylist.cf
$this->process_postfix_config('mysql-virtual_policy_greylist.cf');
//* mysql-virtual_gids.cf.master
$this->process_postfix_config('mysql-virtual_gids.cf');
//* mysql-virtual_uids.cf
$this->process_postfix_config('mysql-virtual_uids.cf');
//* Install virtual mappings
foreach (glob('tpl/mysql-virtual_*.master') as $filename) {
$this->process_postfix_config( basename($filename, '.master') );
}
//* mysql-virtual_alias_domains.cf
//* mysql-verify_recipients.cf
$this->process_postfix_config('mysql-verify_recipients.cf');
//* postfix-dkim
......@@ -208,6 +162,7 @@ class installer_dist extends installer_base {
touch($config_dir.'/mime_header_checks');
touch($config_dir.'/nested_header_checks');
touch($config_dir.'/body_checks');
touch($config_dir.'/sasl_passwd');
//* Create the mailman files
if(!is_dir('/var/lib/mailman/data')) exec('mkdir -p /var/lib/mailman/data');
......
......@@ -63,6 +63,9 @@ class installer extends installer_base
$this->process_postfix_config( basename($filename, '.master') );
}
//* mysql-verify_recipients.cf
$this->process_postfix_config('mysql-verify_recipients.cf');
//* Changing mode and group of the new created config files.
caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null',
__FILE__, __LINE__, 'chmod on mysql-virtual_*.cf*', 'chmod on mysql-virtual_*.cf* failed');
......@@ -157,6 +160,7 @@ class installer extends installer_base
touch($config_dir.'/mime_header_checks');
touch($config_dir.'/nested_header_checks');
touch($config_dir.'/body_checks');
touch($config_dir.'/sasl_passwd');
//* Create auxillary postfix conf files
$configfile = 'helo_access';
......
......@@ -57,55 +57,12 @@ class installer_dist extends installer_base {
$this->error("The postfix configuration directory '$config_dir' does not exist.");
}
//* mysql-virtual_domains.cf
$this->process_postfix_config('mysql-virtual_domains.cf');
//* mysql-virtual_forwardings.cf
$this->process_postfix_config('mysql-virtual_forwardings.cf');
//* mysql-virtual_alias_domains.cf
$this->process_postfix_config('mysql-virtual_alias_domains.cf');
//* mysql-virtual_alias_maps.cf
$this->process_postfix_config('mysql-virtual_alias_maps.cf');
//* mysql-virtual_mailboxes.cf
$this->process_postfix_config('mysql-virtual_mailboxes.cf');
//* mysql-virtual_email2email.cf
$this->process_postfix_config('mysql-virtual_email2email.cf');
//* mysql-virtual_transports.cf
$this->process_postfix_config('mysql-virtual_transports.cf');
//* mysql-virtual_recipient.cf
$this->process_postfix_config('mysql-virtual_recipient.cf');
//* mysql-virtual_sender.cf
$this->process_postfix_config('mysql-virtual_sender.cf');
//* mysql-virtual_sender_login_maps.cf
$this->process_postfix_config('mysql-virtual_sender_login_maps.cf');
//* mysql-virtual_client.cf
$this->process_postfix_config('mysql-virtual_client.cf');
//* mysql-virtual_relaydomains.cf
$this->process_postfix_config('mysql-virtual_relaydomains.cf');
//* mysql-virtual_relayrecipientmaps.cf
$this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf');
//* mysql-virtual_policy_greylist.cf
$this->process_postfix_config('mysql-virtual_policy_greylist.cf');
//* mysql-virtual_gids.cf.master
$this->process_postfix_config('mysql-virtual_gids.cf');
//* mysql-virtual_uids.cf
$this->process_postfix_config('mysql-virtual_uids.cf');
//* Install virtual mappings
foreach (glob('tpl/mysql-virtual_*.master') as $filename) {
$this->process_postfix_config( basename($filename, '.master') );
}
//* mysql-virtual_alias_domains.cf
//* mysql-verify_recipients.cf
$this->process_postfix_config('mysql-verify_recipients.cf');
//* postfix-dkim
......@@ -219,6 +176,7 @@ class installer_dist extends installer_base {
touch($config_dir.'/mime_header_checks');
touch($config_dir.'/nested_header_checks');
touch($config_dir.'/body_checks');
touch($config_dir.'/sasl_passwd');
//* Create the mailman files
if(!is_dir('/var/lib/mailman/data')) exec('mkdir -p /var/lib/mailman/data');
......
......@@ -146,7 +146,6 @@ include_once 'dist/conf/'.$dist['confid'].'.conf.php';
//** Installer Interface
//****************************************************************************************************
$inst = new installer();
if (!$inst->get_php_version()) die('ISPConfig requires PHP '.$inst->min_php."\n");
$retval=shell_exec("which which");
if (empty($retval)) die ("ISPConfig requires which \n");
......
......@@ -882,9 +882,8 @@ function get_apps_vhost_port_number() {
}
/*
* Get the port number of the ISPConfig controlpanel vhost
*/
* Check if SSL is anabled in the ISPConfig controlpanel vhost.
*/
function is_ispconfig_ssl_enabled() {
global $conf;
$ispconfig_vhost_file = $conf['apache']['vhost_conf_dir'].'/ispconfig.vhost';
......
This diff is collapsed.
......@@ -473,12 +473,22 @@ function checkAndRenameCustomTemplates($default_prompt='no') {
'/usr/local/ispconfig/server/conf-custom/install',
);
$override_templates = array(
'postfix_custom.conf.master',
'dovecot_custom.conf.master',
);
$found_templates = array();
$found_override_templates = array();
foreach ($template_directories as $dir) {
if (!is_dir($dir)) { continue; }
foreach (glob("$dir/*.master") as $f) {
if (is_file($f)) {
$found_templates[] = $f;
if (in_array( basename($f), $override_templates )) {
$found_override_templates[] = $f;
} else {
$found_templates[] = $f;
}
}
}
}
......@@ -501,6 +511,11 @@ function checkAndRenameCustomTemplates($default_prompt='no') {
}
}
if (count($found_override_templates) > 0) {
echo "The following local config override templates were found, be sure to incorporate upstream changes if needed:\n\n";
echo implode("\n", $found_override_templates) . "\n\n";
}
return $ret;
}
......
ALTER TABLE `remote_user` MODIFY `remote_password` VARCHAR(200) NOT NULL DEFAULT '';
ALTER TABLE `client` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
ALTER TABLE `client_template` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
ALTER TABLE mail_access DROP CONSTRAINT `server_id`;
SET SESSION old_alter_table=1;
ALTER IGNORE TABLE mail_access ADD UNIQUE KEY `unique_source` (`server_id`,`source`,`type`);
SET SESSION old_alter_table=0;
ALTER TABLE mail_domain ADD COLUMN `relay_host` varchar(255) NOT NULL default '' AFTER `dkim_public`,
ADD COLUMN `relay_user` varchar(255) NOT NULL default '' AFTER `relay_host`,
ADD COLUMN `relay_pass` varchar(255) NOT NULL default '' AFTER `relay_user`;
-- Purge apps & addons installer (#5795)
DROP TABLE 'software_package';
DROP TABLE 'software_repo';
DROP TABLE 'software_update';
DROP TABLE 'software_update_inst';
-- Brexit
UPDATE `country` SET `eu` = 'n' WHERE `iso` = 'GB';
-- Add limit for per domain relaying
ALTER TABLE `client` ADD `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_spamfilter_policy`;
ALTER TABLE `client_template` ADD `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_spamfilter_policy`;
ALTER TABLE `remote_user` MODIFY `remote_password` VARCHAR(200) NOT NULL DEFAULT '';
ALTER TABLE `client` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
ALTER TABLE `client_template` ADD COLUMN `limit_mail_wblist` INT(11) NOT NULL DEFAULT '0' AFTER `limit_mailrouting`;
ALTER TABLE mail_access DROP CONSTRAINT `server_id`;
SET SESSION old_alter_table=1;
ALTER IGNORE TABLE mail_access ADD UNIQUE KEY `unique_source` (`server_id`,`source`,`type`);
SET SESSION old_alter_table=0;
ALTER TABLE mail_domain ADD COLUMN `relay_host` varchar(255) NOT NULL default '' AFTER `dkim_public`,
ADD COLUMN `relay_user` varchar(255) NOT NULL default '' AFTER `relay_host`,
ADD COLUMN `relay_pass` varchar(255) NOT NULL default '' AFTER `relay_user`;
-- Purge apps & addons installer (#5795)
DROP TABLE 'software_package';
DROP TABLE 'software_repo';
DROP TABLE 'software_update';
DROP TABLE 'software_update_inst';
-- Brexit
UPDATE `country` SET `eu` = 'n' WHERE `iso` = 'GB';
-- Add limit for per domain relaying
ALTER TABLE `client` ADD `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_spamfilter_policy`;
ALTER TABLE `client_template` ADD `limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_spamfilter_policy`;
......@@ -178,12 +178,14 @@ CREATE TABLE `client` (
`limit_mailforward` int(11) NOT NULL DEFAULT '-1',
`limit_mailcatchall` int(11) NOT NULL DEFAULT '-1',
`limit_mailrouting` int(11) NOT NULL DEFAULT '0',
`limit_mail_wblist` int(11) NOT NULL DEFAULT '0',
`limit_mailfilter` int(11) NOT NULL DEFAULT '-1',
`limit_fetchmail` int(11) NOT NULL DEFAULT '-1',
`limit_mailquota` int(11) NOT NULL DEFAULT '-1',
`limit_spamfilter_wblist` int(11) NOT NULL DEFAULT '0',
`limit_spamfilter_user` int(11) NOT NULL DEFAULT '0',
`limit_spamfilter_policy` int(11) NOT NULL DEFAULT '0',
`limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n',
`default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1',
`xmpp_servers` text,
`limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1',
......@@ -309,12 +311,14 @@ CREATE TABLE `client_template` (
`limit_mailforward` int(11) NOT NULL default '-1',
`limit_mailcatchall` int(11) NOT NULL default '-1',
`limit_mailrouting` int(11) NOT NULL default '0',
`limit_mail_wblist` int(11) NOT NULL default '0',
`limit_mailfilter` int(11) NOT NULL default '-1',
`limit_fetchmail` int(11) NOT NULL default '-1',
`limit_mailquota` int(11) NOT NULL default '-1',
`limit_spamfilter_wblist` int(11) NOT NULL default '0',
`limit_spamfilter_user` int(11) NOT NULL default '0',
`limit_spamfilter_policy` int(11) NOT NULL default '0',
`limit_relayhost` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n',
`default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1',
`xmpp_servers` text,
`limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1',
......@@ -820,7 +824,7 @@ CREATE TABLE `mail_access` (
`type` set('recipient','sender','client') NOT NULL DEFAULT 'recipient',
`active` enum('n','y') NOT NULL default 'y',
PRIMARY KEY (`access_id`),
KEY `server_id` (`server_id`,`source`)
UNIQUE KEY `unique_source` (`server_id`,`source`,`type`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -882,6 +886,9 @@ CREATE TABLE `mail_domain` (
`dkim_selector` varchar(63) NOT NULL DEFAULT 'default',
`dkim_private` mediumtext NULL,
`dkim_public` mediumtext NULL,
`relay_host` varchar(255) NOT NULL DEFAULT '',
`relay_user` varchar(255) NOT NULL DEFAULT '',
`relay_pass` varchar(255) NOT NULL DEFAULT '',
`active` enum('n','y') NOT NULL DEFAULT 'n',
PRIMARY KEY (`domain_id`),
KEY `server_id` (`server_id`,`domain`),
......@@ -1325,7 +1332,7 @@ CREATE TABLE `remote_user` (
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`remote_username` varchar(64) NOT NULL DEFAULT '',
`remote_password` varchar(64) NOT NULL DEFAULT '',
`remote_password` varchar(200) NOT NULL DEFAULT '',
`remote_access` enum('y','n') NOT NULL DEFAULT 'y',
`remote_ips` TEXT,
`remote_functions` text,
......@@ -1462,88 +1469,6 @@ CREATE TABLE `shell_user` (
-- --------------------------------------------------------
--
-- Table structure for table `software_package`
--
CREATE TABLE `software_package` (
`package_id` int(11) unsigned NOT NULL auto_increment,
`software_repo_id` int(11) unsigned NOT NULL DEFAULT '0',
`package_name` varchar(64) NOT NULL DEFAULT '',
`package_title` varchar(64) NOT NULL DEFAULT '',
`package_description` text,
`package_version` varchar(8) default NULL,
`package_type` enum('ispconfig','app','web') NOT NULL default 'app',
`package_installable` enum('yes','no','key') NOT NULL default 'yes',
`package_requires_db` enum('no','mysql') NOT NULL default 'no',
`package_remote_functions` text,
`package_key` varchar(255) NOT NULL DEFAULT '',
`package_config` text,
PRIMARY KEY (`package_id`),
UNIQUE KEY `package_name` (`package_name`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `software_repo`
--
CREATE TABLE `software_repo` (
`software_repo_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`repo_name` varchar(64) default NULL,
`repo_url` varchar(255) default NULL,
`repo_username` varchar(64) default NULL,
`repo_password` varchar(64) default NULL,
`active` enum('n','y') NOT NULL default 'y',
PRIMARY KEY (`software_repo_id`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `software_update`
--
CREATE TABLE `software_update` (
`software_update_id` int(11) unsigned NOT NULL auto_increment,
`software_repo_id` int(11) unsigned NOT NULL DEFAULT '0',
`package_name` varchar(64) NOT NULL DEFAULT '',
`update_url` varchar(255) NOT NULL DEFAULT '',
`update_md5` varchar(255) NOT NULL DEFAULT '',
`update_dependencies` varchar(255) NOT NULL DEFAULT '',
`update_title` varchar(64) NOT NULL DEFAULT '',
`v1` tinyint(1) NOT NULL default '0',
`v2` tinyint(1) NOT NULL default '0',
`v3` tinyint(1) NOT NULL default '0',
`v4` tinyint(1) NOT NULL default '0',
`type` enum('full','update') NOT NULL default 'full',
PRIMARY KEY (`software_update_id`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `software_update_inst`
--
CREATE TABLE `software_update_inst` (
`software_update_inst_id` int(11) unsigned NOT NULL auto_increment,
`software_update_id` int(11) unsigned NOT NULL default '0',
`package_name` varchar(64) NOT NULL DEFAULT '',
`server_id` int(11) unsigned NOT NULL DEFAULT '0',
`status` enum('none','installing','installed','deleting','deleted','failed') NOT NULL default 'none',
PRIMARY KEY (`software_update_inst_id`),
UNIQUE KEY `software_update_id` (`software_update_id`,`package_name`,`server_id`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `spamfilter_policy`
--
......@@ -2485,7 +2410,7 @@ INSERT INTO `country` (`iso`, `name`, `printable_name`, `iso3`, `numcode`, `eu`)
('UG', 'UGANDA', 'Uganda', 'UGA', 800, 'n'),
('UA', 'UKRAINE', 'Ukraine', 'UKR', 804, 'n'),
('AE', 'UNITED ARAB EMIRATES', 'United Arab Emirates', 'ARE', 784, 'n'),
('GB', 'UNITED KINGDOM', 'United Kingdom', 'GBR', 826, 'y'),
('GB', 'UNITED KINGDOM', 'United Kingdom', 'GBR', 826, 'n'),
('US', 'UNITED STATES', 'United States', 'USA', 840, 'n'),
('UM', 'UNITED STATES MINOR OUTLYING ISLANDS', 'United States Minor Outlying Islands', NULL, NULL, 'n'),
('UY', 'URUGUAY', 'Uruguay', 'URY', 858, 'n'),
......@@ -2529,14 +2454,6 @@ INSERT INTO `help_faq_sections` VALUES (1,'General',0,NULL,NULL,NULL,NULL,NULL);
-- --------------------------------------------------------
--
-- Dumping data for table `software_repo`
--
INSERT INTO `software_repo` (`software_repo_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `repo_name`, `repo_url`, `repo_username`, `repo_password`, `active`) VALUES (1, 1, 1, 'riud', 'riud', '', 'ISPConfig Addons', 'http://repo.ispconfig.org/addons/', '', '', 'n');
-- --------------------------------------------------------
--
-- Dumping data for table `spamfilter_policy`
--
......
......@@ -3,6 +3,7 @@
################################################
ServerTokens ProductOnly
ServerSignature Off
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm standard_index.html
################################################
# ISPConfig Logfile configuration for vlogger
......
......@@ -33,11 +33,11 @@ if( !empty($_SERVER['DOCUMENT_ROOT']) ) {
Header("Pragma: no-cache");
Header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
Header("Content-Type: text/html; charset=utf-8");
//** Set a few php.ini values
ini_set('register_globals',0);
ini_set('magic_quotes_gpc', 0);
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS']) || isset($_REQUEST['s']) || isset($_REQUEST['s_old']) || isset($_REQUEST['conf'])) {
die('Internal Error: var override attempt detected');
exit;
......@@ -127,8 +127,8 @@ $conf['init_scripts'] = '/etc/init.d';
$conf['interface_modules_enabled'] = 'dashboard,mail,sites,dns,tools,help';
//** Demo mode
/* The demo mode is an option to restrict certain actions in the interface like
* changing the password of users with sys_userid < 3 etc. to be
/* The demo mode is an option to restrict certain actions in the interface like
* changing the password of users with sys_userid < 3 etc. to be
* able to run the ISPConfig interface as online demo. It does not
* affect the server part. The demo mode should be always set to false
* on every normal installation
......@@ -141,10 +141,6 @@ $conf['log_file'] = $conf['ispconfig_log_dir'].$conf['fs_div'].'ispconfig.log';
$conf['log_priority'] = {ispconfig_log_priority}; // 0 = Debug, 1 = Warning, 2 = Error
//** Allow software package installations
$conf['software_updates_enabled'] = false;
//** Themes
$conf['theme'] = '{theme}';
$conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
......
# Do not change this file, as changes will be overwritten by any ISPConfig update.
# Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master.
# To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force)
listen = *,[::]
protocols = imap pop3
auth_mechanisms = plain login
......@@ -88,7 +91,7 @@ protocol lmtp {
#2.3+ group = vmail
#2.3+ mode = 0660
#2.3+ }
#2.3+
#2.3+
#2.3+ unix_listener stats-writer {
#2.3+ user = vmail
#2.3+ group = vmail
......@@ -111,7 +114,7 @@ plugin {
quota_status_overquota = "552 5.2.2 Mailbox is full"
}
imap_capability=+SEPCIAL-USE XLIST
imap_capability=+SPECIAL-USE XLIST
namespace inbox {
inbox = yes
separator = .
......@@ -131,3 +134,4 @@ namespace inbox {
special_use = \Trash
}
}
!include_try conf.d/99-ispconfig-custom-config.conf
# Do not change this file, as changes will be overwritten by any ISPConfig update.
# Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master.
# To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force)
listen = *,[::]
protocols = imap pop3
auth_mechanisms = plain login
......@@ -86,7 +89,7 @@ protocol lmtp {
#2.3+ group = vmail
#2.3+ mode = 0660
#2.3+ }
#2.3+
#2.3+
#2.3+ unix_listener stats-writer {
#2.3+ user = vmail
#2.3+ group = vmail
......@@ -108,3 +111,4 @@ plugin {
quota_status_nouser = DUNNO
quota_status_overquota = "552 5.2.2 Mailbox is full"
}
!include_try conf.d/99-ispconfig-custom-config.conf
......@@ -24,11 +24,11 @@ transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{conf
relay_domains = proxy:mysql:{config_dir}/mysql-virtual_relaydomains.cf
relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions $smtp_sasl_password_maps $sender_dependent_relayhost_maps
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
smtpd_reject_unlisted_sender = yes
smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
smtpd_sender_restrictions = check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf, {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
smtpd_reject_unlisted_sender = no
smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
smtpd_etrn_restrictions = permit_mynetworks, reject
smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
......@@ -53,3 +53,9 @@ tls_preempt_cipherlist = yes
address_verify_negative_refresh_time=60s
# needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
enable_original_recipient = yes
sender_dependent_relayhost_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayhost.cf
smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, texthash:{config_dir}/sasl_passwd
smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous, noplaintext
smtp_sasl_tls_security_options = noanonymous
# You can use this file for custom Dovecot settings. The used settings will overrule the settings set by ISPConfig.
# Use with caution!
# Put this file in /usr/local/ispconfig/server/conf-custom/install/ and make your changes there.
# Do not change this file, as changes will be overwritten by any ISPConfig update.
# Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master.
# To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force)
listen = *,[::]
protocols = imap pop3
auth_mechanisms = plain login
......@@ -82,7 +85,7 @@ protocol lmtp {
#2.3+ group = vmail
#2.3+ mode = 0660
#2.3+ }
#2.3+
#2.3+
#2.3+ unix_listener stats-writer {
#2.3+ user = vmail
#2.3+ group = vmail
......@@ -105,7 +108,7 @@ plugin {
quota_status_overquota = "552 5.2.2 Mailbox is full"
}
imap_capability=+SEPCIAL-USE XLIST
imap_capability=+SPECIAL-USE XLIST
namespace inbox {
inbox = yes
separator = .
......@@ -125,3 +128,4 @@ namespace inbox {
special_use = \Trash
}
}
!include_try conf.d/99-ispconfig-custom-config.conf
......@@ -20,11 +20,11 @@ transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{conf
relay_domains = proxy:mysql:{config_dir}/mysql-virtual_relaydomains.cf
relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions $smtp_sasl_password_maps $sender_dependent_relayhost_maps
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
smtpd_sender_restrictions = {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re, check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf
smtpd_reject_unlisted_sender = yes
smtpd_helo_restrictions = permit_mynetworks, check_helo_access regexp:{config_dir}/helo_access, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access regexp:{config_dir}/blacklist_helo, {reject_unknown_helo_hostname}, permit
smtpd_sender_restrictions = check_sender_access proxy:mysql:{config_dir}/mysql-virtual_sender.cf, {reject_aslm} check_sender_access regexp:{config_dir}/tag_as_originating.re, permit_mynetworks{reject_slm}, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:{config_dir}/tag_as_foreign.re
smtpd_reject_unlisted_sender = no
smtpd_client_restrictions = check_client_access proxy:mysql:{config_dir}/mysql-virtual_client.cf, permit_inet_interfaces, permit_mynetworks, permit_sasl_authenticated{rbl_list}, reject_unauth_pipelining {reject_unknown_client_hostname}, permit
smtpd_etrn_restrictions = permit_mynetworks, reject
smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
......@@ -49,3 +49,9 @@ tls_preempt_cipherlist = yes
address_verify_negative_refresh_time=60s
# needed for postfix < 3.3 when using reject_unverified_recipient (lmtp):
enable_original_recipient = yes
sender_dependent_relayhost_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayhost.cf
smtp_sasl_password_maps = proxy:mysql:{config_dir}/mysql-virtual_sender-relayauth.cf, texthash:{config_dir}/sasl_passwd
smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous, noplaintext
smtp_sasl_tls_security_options = noanonymous