Skip to content
Commits on Source (58)
# 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(....)
......
......@@ -1793,15 +1793,19 @@ class installer_base {
}
if(is_user('_rspamd') && is_group('amavis')) {
exec("usermod -G amavis _rspamd");
exec("usermod -a -G amavis _rspamd");
} elseif(is_user('rspamd') && is_group('amavis')) {
exec("usermod -G amavis rspamd");
exec("usermod -a -G amavis rspamd");
}
if(!is_dir('/etc/rspamd/local.d/')){
mkdir('/etc/rspamd/local.d/', 0755, true);
}
if(!is_dir('/etc/rspamd/local.d/maps.d/')){
mkdir('/etc/rspamd/local.d/maps.d/', 0755, true);
}
if(!is_dir('/etc/rspamd/override.d/')){
mkdir('/etc/rspamd/override.d/', 0755, true);
}
......@@ -1810,6 +1814,7 @@ class installer_base {
$mail_config['dkim_path'] = substr($mail_config['dkim_path'], 0, strlen($mail_config['dkim_path'])-1);
}
$dkim_domains = $this->db->queryAllRecords('SELECT `dkim_selector`, `domain` FROM ?? WHERE `dkim` = ? ORDER BY `domain` ASC', $conf['mysql']['database'] . '.mail_domain', 'y');
# should move maps to local.d/maps.d/ ?
$fpp = fopen('/etc/rspamd/local.d/dkim_domains.map', 'w');
$fps = fopen('/etc/rspamd/local.d/dkim_selectors.map', 'w');
foreach($dkim_domains as $dkim_domain) {
......@@ -1820,104 +1825,79 @@ class installer_base {
fclose($fps);
unset($dkim_domains);
# local.d templates with template tags
$tpl = new tpl();
$tpl->newTemplate('rspamd_dkim_signing.conf.master');
$tpl->setVar('dkim_path', $mail_config['dkim_path']);
wf('/etc/rspamd/local.d/dkim_signing.conf', $tpl->grab());
$tpl = new tpl();
$tpl->newTemplate('rspamd_users.conf.master');
$tpl->newTemplate('rspamd_options.inc.master');
$whitelist_ips = array();
$ips = $this->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ?", $conf['server_id']);
$local_addrs = array();
$ips = $this->db->queryAllRecords('SELECT `ip_address`, `ip_type` FROM ?? WHERE `server_id` = ?', $conf['mysql']['database'].'.server_ip', $conf['server_id']);
if(is_array($ips) && !empty($ips)){
foreach($ips as $ip){
$whitelist_ips[] = array('ip' => $ip['ip_address']);
$local_addrs[] = array('quoted_ip' => "\"".$ip['ip_address']."\",\n");
}
}
$tpl->setLoop('local_addrs', $local_addrs);
wf('/etc/rspamd/local.d/options.inc', $tpl->grab());
# local.d templates without template tags
$local_d = array(
'groups.conf',
'antivirus.conf',
'classifier-bayes.conf',
'greylist.conf',
'mx_check.conf',
'redis.conf',
'milter_headers.conf',
'neural.conf',
'neural_group.conf',
'users.conf',
'groups.conf',
);
foreach ($local_d as $f) {
if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/local.d/${f}");
} else {
exec("cp tpl/rspamd_${f}.master /etc/rspamd/local.d/${f}");
}
}
$tpl->setLoop('whitelist_ips', $whitelist_ips);
wf('/etc/rspamd/local.d/users.conf', $tpl->grab());
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_groups.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_groups.conf.master /etc/rspamd/local.d/groups.conf');
} else {
exec('cp tpl/rspamd_groups.conf.master /etc/rspamd/local.d/groups.conf');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_antivirus.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_antivirus.conf.master /etc/rspamd/local.d/antivirus.conf');
} else {
exec('cp tpl/rspamd_antivirus.conf.master /etc/rspamd/local.d/antivirus.conf');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_classifier-bayes.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_classifier-bayes.conf.master /etc/rspamd/local.d/classifier-bayes.conf');
} else {
exec('cp tpl/rspamd_classifier-bayes.conf.master /etc/rspamd/local.d/classifier-bayes.conf');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_greylist.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_greylist.conf.master /etc/rspamd/local.d/greylist.conf');
} else {
exec('cp tpl/rspamd_greylist.conf.master /etc/rspamd/local.d/greylist.conf');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_symbols_antivirus.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_symbols_antivirus.conf.master /etc/rspamd/local.d/antivirus_group.conf');
} else {
exec('cp tpl/rspamd_symbols_antivirus.conf.master /etc/rspamd/local.d/antivirus_group.conf');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_override_rbl.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_override_rbl.conf.master /etc/rspamd/override.d/rbl_group.conf');
} else {
exec('cp tpl/rspamd_override_rbl.conf.master /etc/rspamd/override.d/rbl_group.conf');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_override_surbl.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_override_surbl.conf.master /etc/rspamd/override.d/surbl_group.conf');
} else {
exec('cp tpl/rspamd_override_surbl.conf.master /etc/rspamd/override.d/surbl_group.conf');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_mx_check.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_mx_check.conf.master /etc/rspamd/local.d/mx_check.conf');
} else {
exec('cp tpl/rspamd_mx_check.conf.master /etc/rspamd/local.d/mx_check.conf');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_redis.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_redis.conf.master /etc/rspamd/local.d/redis.conf');
} else {
exec('cp tpl/rspamd_redis.conf.master /etc/rspamd/local.d/redis.conf');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_milter_headers.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_milter_headers.conf.master /etc/rspamd/local.d/milter_headers.conf');
} else {
exec('cp tpl/rspamd_milter_headers.conf.master /etc/rspamd/local.d/milter_headers.conf');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_options.inc.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_options.inc.master /etc/rspamd/local.d/options.inc');
} else {
exec('cp tpl/rspamd_options.inc.master /etc/rspamd/local.d/options.inc');
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_neural.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_neural.conf.master /etc/rspamd/local.d/neural.conf');
} else {
exec('cp tpl/rspamd_neural.conf.master /etc/rspamd/local.d/neural.conf');
# override.d templates without template tags
$override_d = array(
'rbl_group.conf',
'surbl_group.conf',
);
foreach ($override_d as $f) {
if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/override.d/${f}");
} else {
exec("cp tpl/rspamd_${f}.master /etc/rspamd/override.d/${f}");
}
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_neural_group.conf.master')) {
exec('cp '.$conf['ispconfig_install_dir'].'/server/conf-custom/install/rspamd_neural_group.conf.master /etc/rspamd/local.d/neural_group.conf');
} else {
exec('cp tpl/rspamd_neural_group.conf.master /etc/rspamd/local.d/neural_group.conf');
# local.d/maps.d templates without template tags
$maps_d = array(
'dkim_whitelist.inc',
'dmarc_whitelist.inc',
'spf_dkim_whitelist.inc',
'spf_whitelist.inc',
);
foreach ($maps_d as $f) {
if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/local.d/maps.d/${f}");
} else {
exec("cp tpl/rspamd_${f}.master /etc/rspamd/local.d/maps.d/${f}");
}
}
$tpl = new tpl();
$tpl->newTemplate('rspamd_dkim_signing.conf.master');
$tpl->setVar('dkim_path', $mail_config['dkim_path']);
wf('/etc/rspamd/local.d/dkim_signing.conf', $tpl->grab());
exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/override.d/*');
exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/local.d/maps.d/* /etc/rspamd/override.d/*');
# unneccesary, since this was done above?
$command = 'usermod -a -G amavis _rspamd';
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
......
......@@ -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;
}
......
......@@ -19,3 +19,7 @@ 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`;
......@@ -185,6 +185,7 @@ CREATE TABLE `client` (
`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',
......@@ -317,6 +318,7 @@ CREATE TABLE `client_template` (
`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',
......
......@@ -6,11 +6,11 @@
[uidbasics]
comment = common files for all jails that need user/group information
paths = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2, /lib/i386-linux-gnu/libnsl.so.1, /lib/i386-linux-gnu/libnss*.so.2, /lib/x86_64-linux-gnu/libnsl.so.1, /lib/x86_64-linux-gnu/libnss*.so.2, /lib/arm-linux-gnueabihf/libnss*.so.2, /lib/arm-linux-gnueabihf/libnsl*.so.1, /etc/nsswitch.conf, /etc/ld.so.conf
paths = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2, /lib/i386-linux-gnu/libnsl.so.1, /lib/i386-linux-gnu/libnss*.so.2, /lib/x86_64-linux-gnu/libnsl.so.1, /lib/x86_64-linux-gnu/libnss*.so.2, /lib/arm-linux-gnueabihf/libnsl*.so.1, /lib/arm-linux-gnueabihf/libnss*.so.2, /lib/aarch64-linux-gnu/libnsl.so.1, /lib/aarch64-linux-gnu/libnss*.so.2, /etc/nsswitch.conf, /etc/ld.so.conf
[netbasics]
comment = common files for all jails that need any internet connectivity
paths = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2, /lib/libnss_mdns*.so.2, /lib/i386-linux-gnu/libnss_dns.so.2, /lib/x86_64-linux-gnu/libnss_dns.so.2, /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols, /etc/services, /etc/ssl/certs/, /usr/lib/ssl/certs
paths = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2, /lib/libnss_mdns*.so.2, /lib/i386-linux-gnu/libnss_dns.so.2, /lib/x86_64-linux-gnu/libnss_dns.so.2, /lib/arm-linux-gnueabihf/libnss_dns.so.2, /lib/aarch64-linux-gnu/libnss_dns.so.2, /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols, /etc/services, /etc/ssl/certs/, /usr/lib/ssl/certs
[logbasics]
comment = timezone information and log sockets
......@@ -163,7 +163,7 @@ includesections = php, mysql-client
[mysql-client]
comment = mysql client
paths = mysql, mysqldump, mysqlshow, /usr/lib/libmysqlclient.so, /usr/lib/i386-linux-gnu/libmariadb.so.3, /usr/lib/i386-linux-gnu/mariadb19, /usr/lib/x86_64-linux-gnu/libmariadb.so.3, /usr/lib/x86_64-linux-gnu/mariadb19
paths = mysql, mysqldump, mysqlshow, /usr/lib/libmysqlclient.so, /usr/lib/i386-linux-gnu/libmariadb.so.3, /usr/lib/i386-linux-gnu/mariadb19, /usr/lib/x86_64-linux-gnu/libmariadb.so.3, /usr/lib/x86_64-linux-gnu/mariadb19, /usr/lib/arm-linux-gnueabihf/libmariadb.so.3, /usr/lib/arm-linux-gnueabihf/mariadb19, /usr/lib/aarch64-linux-gnu/libmariadb.so.3, /usr/lib/aarch64-linux-gnu/mariadb19
includesections = netbasics
[composer]
......@@ -194,7 +194,7 @@ comment = common php directories and libraries
# or the php config (which includes custom php snippets) from *all*
# sites which use fpm will be copied to *every* jailkit
paths = /usr/bin/php, /usr/lib/php/, /usr/share/php/, /usr/share/zoneinfo/
includesections = env
includesections = env, logbasics, netbasics
[php5_6]
comment = php version 5.6
......@@ -226,6 +226,10 @@ comment = php version 7.4
paths = /usr/bin/php7.4, /usr/lib/php/7.4/, /usr/lib/php/20190902/, /usr/share/php/7.4/, /etc/php/7.4/cli/, /etc/php/7.4/mods-available/
includesections = php_common
[imagemagick]
comment = ImageMagick needed for php-imagemagick extension
paths = /usr/share/ImageMagick-*, /etc/ImageMagick-*, /usr/lib/i386-linux-gnu/ImageMagick-*, /usr/lib/x86_64-linux-gnu/ImageMagick-*, /usr/lib/arm-linux-gnueabihf/ImageMagick-*, /usr/lib/aarch64-linux-gnu/ImageMagick-*
[php8_0]
comment = php version 8.0
paths = /usr/bin/php8.0, /usr/lib/php/8.0/, /usr/lib/php/20200930/, /usr/share/php/8.0/, /etc/php/8.0/cli/, /etc/php/8.0/mods-available/
......
# Domain whitelist via valid DKIM policy
# (Prefer to spf_dkim_whitelist for domains that use both SPF and DKIM.)
ispconfig.org
# Domain whitelist via valid DMARC policy (aligned SPF and/or aligned DKIM)
comodo.com
geotrust.com
geotrusteurope.com
howtoforge.com
ispconfig.org
......@@ -6,5 +6,6 @@ routines {
"X-Spamd-Bar" = 0;
"X-Spam-Level" = 0;
"X-Spam-Status" = 0;
"X-Spam-Flag" = 0;
}
}
local_addrs = "127.0.0.0/8, ::1";
dns {
nameserver = ["127.0.0.1:53:10"];
}
../../server/conf/rspamd_options.inc.master
\ No newline at end of file
# Domain whitelist via valid SPF policy AND valid DKIM policy
# (Prefer to spf_whitelist or dkim_whitelist for domains that use both SPF and DKIM.)
comodo.com
geotrust.com
geotrusteurope.com
# letsencrypt is in rspamd's default spf_dkim_whitelist, only needed if strict:
#letsencrypt.org both:1.0
# Domain whitelist via valid SPF policy
# (Prefer to spf_dkim_whitelist for domains that use both SPF and DKIM.)
howtoforge.com
ispconfig.org
../../server/conf/rspamd_users.conf.master
\ No newline at end of file
settings {
authenticated {
priority = 10;
authenticated = yes;
apply "default" {
symbols_disabled = [];
groups_disabled = ["rbl", "spf"];
}
}
whitelist {
priority = 5;
rcpt = "postmaster";
rcpt = "hostmaster";
rcpt = "abuse";
want_spam = yes;
}
.include(try=true; glob=true) "$LOCAL_CONFDIR/local.d/users/*.conf"
.include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/users.local.conf"
}
../../server/conf/rspamd_users.inc.conf.master
\ No newline at end of file
rules {
"ISPC_WHITELIST_SPF" = {
valid_spf = true;
domains = [
"$LOCAL_CONFDIR/local.d/maps.d/spf_whitelist.inc.ispc"
];
score = -2.0
inverse_symbol = "ISPC_BLACKLIST_SPF";
}
"ISPC_WHITELIST_DKIM" = {
valid_dkim = true;
domains = [
"$LOCAL_CONFDIR/local.d/maps.d/dkim_whitelist.inc.ispc"
];
score = -2.0;
inverse_symbol = "ISPC_BLACKLIST_DKIM";
}
"ISPC_WHITELIST_SPF_DKIM" = {
valid_spf = true;
valid_dkim = true;
domains = [
"$LOCAL_CONFDIR/local.d/maps.d/spf_dkim_whitelist.inc.ispc"
];
score = -4.0;
inverse_symbol = "ISPC_BLACKLIST_SPF_DKIM";
}
"ISPC_WHITELIST_DMARC" = {
valid_dmarc = true;
domains = [
"$LOCAL_CONFDIR/local.d/maps.d/dmarc_whitelist.inc.ispc"
];
score = -7.0;
inverse_symbol = "ISPC_BLACKLIST_DMARC";
}
}