ISPConfig 3 issueshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues2024-03-28T10:51:33Zhttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6671Pending queue query does not take active state of servers into account2024-03-28T10:51:33ZTill BrehmPending queue query does not take active state of servers into accounthttps://forum.howtoforge.com/threads/queue-stack.92103/#post-455034https://forum.howtoforge.com/threads/queue-stack.92103/#post-4550343.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6658The spamfilter of all users (that used it) is rewritten although only the pol...2024-03-01T07:43:05ZHannesThe spamfilter of all users (that used it) is rewritten although only the policy name has been changed## Summary
The spamfilter is rewritten although only the policy name has been changed.
Is not a big problem at all but if there are a lot of users than the system rewrites a lot of config files.
## Steps to reproduce
1. change only t...## Summary
The spamfilter is rewritten although only the policy name has been changed.
Is not a big problem at all but if there are a lot of users than the system rewrites a lot of config files.
## Steps to reproduce
1. change only the name of a spamfilter policy than all spamfilter users of this filter get new config
## Correct behaviour
don't rewrite the spamfilter config of every user of this spamfilter policy if only policy_name got changed.
I don't think the policy_name is used anywhere on the server side - only in the interface.
## Environment
Server OS + version: (Ubu 22.04) \
ISPConfig version: (3.2.11p2)
## Proposed fix
```
diff --git a/interface/web/mail/spamfilter_policy_edit.php b/interface/web/mail/spamfilter_policy_edit.php
--- a/interface/web/mail/spamfilter_policy_edit.php
+++ b/interface/web/mail/spamfilter_policy_edit.php (date 1709230118549)
@@ -93,7 +93,9 @@
function onAfterUpdate() {
$this->record_has_changed = false;
foreach($this->dataRecord as $key => $val) {
+ if ($key == 'policy_name') { continue; } // Don't trigger update of all spamfilter users if only policy_name is changed
if(isset($this->oldDataRecord[$key]) && @$this->oldDataRecord[$key] != $val) {
// Record has changed
$this->record_has_changed = true;
}
```
i ll send a MRhttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6656Spamfilter white/blacklist entries can not be added by the client2024-02-26T15:18:03ZTill BrehmSpamfilter white/blacklist entries can not be added by the clienthttps://forum.howtoforge.com/threads/filters.91847/https://forum.howtoforge.com/threads/filters.91847/3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6654Rspamd R_DUMMY Symbol is missing on some systems2024-02-26T09:21:45ZTill BrehmRspamd R_DUMMY Symbol is missing on some systemshttps://forum.howtoforge.com/threads/rspamd-whitelist.84552/
https://forum.howtoforge.com/threads/spamfilter-blacklist-does-not-work.91946/https://forum.howtoforge.com/threads/rspamd-whitelist.84552/
https://forum.howtoforge.com/threads/spamfilter-blacklist-does-not-work.91946/3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6653Disable message function does not work2024-02-26T11:31:55ZHairyDisable message function does not work## Summary
ISPConfig ALMOST allows you to disable showing the message function, effectively disabling support messages.
Navigation to the setting:
System->Main config->Misc->Show message function in help module
After you disable showing...## Summary
ISPConfig ALMOST allows you to disable showing the message function, effectively disabling support messages.
Navigation to the setting:
System->Main config->Misc->Show message function in help module
After you disable showing the message function, ISPConfig still shows the message function to resellers and clients.
When the admin navigates to the Help tab,
In the right view the ISPConfig version is shown.
In the left navigation pane there is no longer an option for message functions.
When the reseller or client navigates to the Help tab,
In the right view the message function is still shown.
In the left navigation pane there is no longer an option for message functions.
## Proposed fix
I can fix this by showing the ISPConfig version in the default admin, reseller and client views by editing the files:
help/version.php
help/lib/module.conf.php
## Secondary issue
This brings us to a secondary issue.
A previous developer considered the ISPConfig version top secret information that should be kept secret from everyone except the admin.
If anyone can give a rational explanation why the version number should be kept top secret from everyone, please let me know so I can change my fix.
## Related log entries
issue-fix-message-function-disablinghttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6614Spamfilter configuration is not updated when changing the policy through API2023-12-02T10:15:00ZThomSpamfilter configuration is not updated when changing the policy through API<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug,...<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug, post a thread on the forum: https://www.howtoforge.com/community/#ispconfig-3.23
- Make sure to remove any content from the description that you did not add. For example, if there are no related log entries, remove the whole "Related log entries" part.
-->
## Summary
<!-- What is happening and what is wrong with that? -->
When updating a spam policy through the API with mail_policy_update, there is no trigger to update the config files that are based on this policy.
## Steps to reproduce
1. Send POST request to remote/json.php?mail_policy_update
## Correct behaviour
<!-- What should happen instead? -->
The configuration should be updated. This does happen when making a change to the policy through the UI:
```
function onAfterDatalogSave($insert = false) {
global $app;
if(!$insert && $this->record_has_changed){
$spamfilter_users = $app->db->queryAllRecords("SELECT * FROM spamfilter_users WHERE policy_id = ?", intval($this->id));
if(is_array($spamfilter_users) && !empty($spamfilter_users)){
foreach($spamfilter_users as $spamfilter_user){
$app->db->datalogUpdate('spamfilter_users', $spamfilter_user, 'id', $spamfilter_user["id"], true);
// check if this is an email domain
if(substr($spamfilter_user['email'],0,1) == '@') {
$domain = substr($spamfilter_user['email'],1);
// Nothing special to do for a domain
}
}
}
}
}
```
## Environment
ISPConfig version: 3.2.11
<!-- _you can use `grep 'ISPC_APP_VERSION' /usr/local/ispconfig/server/lib/config.inc.php` to get it from the command line_ -->
## References
https://forum.howtoforge.com/threads/rspamd-spamfilter-policy-conf-file-not-update-on-spamfilter-policy-score-update-via-api.91491/#post-4521193.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6612as Client -> new website - php handler default set to system default even if ...2023-11-24T07:23:04ZHannesas Client -> new website - php handler default set to system default even if in client limit the option is disabled## Summary
as Client -\> new website - php handler default set to system default even if in client limit the option is disabled
If global setting (system-\>server config-\>web-\>php) Default PHP Handler is Fast-CGI than customer can ch...## Summary
as Client -\> new website - php handler default set to system default even if in client limit the option is disabled
If global setting (system-\>server config-\>web-\>php) Default PHP Handler is Fast-CGI than customer can choose fast cgi (in the \<select\>) even if in client limit the option is disabled
## Steps to reproduce
1. create client template with the only php handler option "Disabled" and add it to an client
2. if global setting (system-\>server config-\>web-\>php) Default PHP Handler is Fast-CGI than customer can choose fast cgi on new websites
3. create a website as user
## Environment
Ubuntu 22.04 ISPConfig 3.2.11p1
## Proposed fix
maybe there is an better option/possibility somewhere in the form definition to set the dynamic default values
my change would be
```plaintext
diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php
--- a/interface/web/sites/web_vhost_domain_edit.php
+++ b/interface/web/sites/web_vhost_domain_edit.php
@@ -117,19 +117,31 @@
$server_id = $web_servers[0];
$app->tpl->setVar("server_id_value", $server_id, true);
unset($web_servers);
- } else {
+ // Set the default php handler on new form for the client
+ $client = $app->db->queryOneRecord("SELECT client.web_php_options FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+ $allowedPHPHandler = explode(',', $client['web_php_options']);
+ $web_config = $app->getconf->get_server_config($server_id, 'web'); //Get default php handler
+ if (in_array($web_config['php_handler'],$allowedPHPHandler)) { //if default php handler is in allowed php handler of client
+ $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = $web_config['php_handler'];
+ } elseif(in_array('no',$allowedPHPHandler)) { //check if "Disabled" is allowed in template - if yes set it as default
+ $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = 'no';
+ } elseif (count($allowedPHPHandler) > 0 && $allowedPHPHandler != "") { // else set the first allowed in the list if there is an element
+ $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = $allowedPHPHandler[0];
+ } else { //set it to disabled if no other option is available (changes in templates of existing websites bypass the checks in client limits)
+ $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = 'no';
+ }
+ }else {
$settings = $app->getconf->get_global_config('sites');
$server_id = intval($settings['default_webserver']);
$app->tform->formDef['tabs']['domain']['fields']['server_id']['default'] = $server_id;
+ $web_config = $app->getconf->get_server_config($server_id, 'web');
+ $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = $web_config['php_handler'];
}
if(!$server_id){
$default_web_server = $app->db->queryOneRecord("SELECT server_id FROM server WHERE web_server = ? ORDER BY server_id LIMIT 0,1", 1);
$server_id = $default_web_server['server_id'];
}
- $web_config = $app->getconf->get_server_config($server_id, 'web');
- $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = $web_config['php_handler'];
$app->tform->formDef['tabs']['domain']['readonly'] = false;
-
$app->tpl->setVar('vhostdomain_type', $this->_vhostdomain_type, true);
parent::onShowNew();
}
```
##3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6610manually added DKIM key creates empty DNS RR2023-12-09T20:45:19ZMatus Uhlarmanually added DKIM key creates empty DNS RR<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug,...<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug, post a thread on the forum: https://www.howtoforge.com/community/#ispconfig-3.23
- Make sure to remove any content from the description that you did not add. For example, if there are no related log entries, remove the whole "Related log entries" part.
-->
## Summary
<!-- What is happening and what is wrong with that? -->
Adding existing DKIM key for a domain by pasting the it into "DKIM Private-key:" textbox (instead of using "Generate DKIM Private-key" button) and saving it adds dummy TXT record (empty "p=") to DNS zone.
## Steps to reproduce
1. Enter Email / Mail Domain in ISPConfig interface
2. Expand DKIM options by clicking "Domain Keys Identifid Mail (DKIM)" button
3. click the "enable DKIM:" text box
4. paste existing DKIM key to the "DKIM Private-key:"
5. click the "Save" button
6. the new TXT records without public key gets added to the domain.
## Correct behaviour
<!-- What should happen instead? -->
The DKIM TXT Record should be only added to DNS if the public key is known
(and does not alredy exist)
## Environment
Server OS + version: Debian GNU/Linux 10 (buster)
ISPConfig version: 3.2.11
Software version of the related software:
```
Server version: Apache/2.4.38 (Debian)
Server built: 2023-04-21T22:01:00
```
```
PHP 7.3.33-14+0~20230902.114+debian10~1.gbp764b27 (cli) (built: Sep 2 2023 07:11:20) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.33-14+0~20230902.114+debian10~1.gbp764b27, Copyright (c) 1999-2018, by Zend Technologies
```
## References
https://forum.howtoforge.com/threads/creating-domain-with-manually-addded-dkim-key.91432/3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6603Warnings due to the use of PHP 8.2 in server.php logs2024-03-01T07:45:03ZMladen B.Warnings due to the use of PHP 8.2 in server.php logs<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug,...<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug, post a thread on the forum: https://www.howtoforge.com/community/#ispconfig-3.23
- Make sure to remove any content from the description that you did not add. For example, if there are no related log entries, remove the whole "Related log entries" part.
-->
## Summary
Hi,
I'm getting the following errors in `/var/log/ispconfig/cron.log`:
```
Sun Nov 12 10:20:01 AM CET 2023 PHP Warning: Undefined array key "db_flags" in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 671
Sun Nov 12 10:20:03 AM CET 2023 PHP Warning: Undefined array key 1 in /usr/local/ispconfig/server/lib/classes/cron.d/100-monitor_mem_usage.inc.php on line 79
Sun Nov 12 10:20:03 AM CET 2023 PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/local/ispconfig/server/lib/classes/cron.d/100-monitor_mem_usage.inc.php on line 79
Sun Nov 12 10:21:01 AM CET 2023 finished server.php.
```
I've looked into `server/lib/classes/db_mysql.inc.php`, line 671:
```
$clientdb_flags = ($conf['db_flags'] !== NULL) ? $conf['db_flags'] : NULL;
```
which looks like the cause for the emitting of the 1st warning above, since I don't see 'db_flags' nowhere in any config file(s) defined, under `/usr/local/ispconfig`. It seems there should be an error control operator for suppressing errors/warnings (@) on that line, if we wanted to ignore the warning or the check should be written in a different way, to avoid having warning emitted in the first place (e.g. using `array_key_exists()` or so). I haven't created any PR for this since I'm not sure which way you guys want this to be solved (if at all).
The 2nd warning seems to have the same traits as the 1st one.
The 3rd warning is just an obsoletion warning, which could have slipped under your radar, I guess.
Btw, thanks again for creating this great software :) :beers:
Cheers.
## Steps to reproduce
1. Open the log at /var/log/ispconfig/cron.log
2. Inspect the log
## Correct behaviour
There should be no errors/warnings in the log.
## Environment
Server OS + version: **Debian GNU/Linux 12 (bookworm)** / ISPConfig version: **3.2.11p1**
Software version of the related software:
```
Apache/2.4.57
PHP 8.2.7
```
## Related log entries
```
Sun Nov 12 10:20:01 AM CET 2023 PHP Warning: Undefined array key "db_flags" in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 671
Sun Nov 12 10:20:03 AM CET 2023 PHP Warning: Undefined array key 1 in /usr/local/ispconfig/server/lib/classes/cron.d/100-monitor_mem_usage.inc.php on line 79
Sun Nov 12 10:20:03 AM CET 2023 PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/local/ispconfig/server/lib/classes/cron.d/100-monitor_mem_usage.inc.php on line 79
Sun Nov 12 10:21:01 AM CET 2023 finished server.php.
```3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6592Website edit - after an validations error (example write xxx into Quota and ...2023-12-02T10:22:10ZHannesWebsite edit - after an validations error (example write xxx into Quota and save) than document_root is empty## Summary
Edit a Website \[Tab Domian\] - trigger an error (example write xxx into Quota and save) than document_root is empty (and maybe other)
(Maybe it is only "cosmetic" but not sure - there a lot of variables/code is this form)
...## Summary
Edit a Website \[Tab Domian\] - trigger an error (example write xxx into Quota and save) than document_root is empty (and maybe other)
(Maybe it is only "cosmetic" but not sure - there a lot of variables/code is this form)
## Steps to reproduce
1. Edit a Website
2. trigger an validations error (example write xxx into Quota)
$this-\>dataRecords contains (web_vhost_domain_edit)
`Array ( [domain_id] => 1 [sys_userid] => 1 [sys_groupid] => 2 [sys_perm_user] => riud [sys_perm_group] => ru [sys_perm_other] => [server_id] => 1 [ip_address] => * [ipv6_address] => [domain] => testdom.xx [type] => vhost [parent_domain_id] => 0 [vhost_type] => name [document_root] => /var/www/clients/client1/web1 [web_folder] => [system_user] => web1 [system_group] => client1 [hd_quota] => 44 [traffic_quota] => -1 [cgi] => n [ssi] => n [suexec] => y [errordocs] => 1 [is_subdomainwww] => 1 [subdomain] => www [php] => no [ruby] => n [python] => n [perl] => n [redirect_type] => [redirect_path] => [seo_redirect] => [rewrite_to_https] => n [ssl] => n [ssl_letsencrypt] => n [ssl_letsencrypt_exclude] => n [ssl_state] => [ssl_locality] => [ssl_organisation] => [ssl_organisation_unit] => [ssl_country] => [ssl_domain] => [ssl_request] => [ssl_cert] => [ssl_bundle] => [ssl_key] => [ssl_action] => [stats_password] => [stats_type] => awstats [allow_override] => All [apache_directives] => [nginx_directives] => [php_fpm_use_socket] => y [php_fpm_chroot] => n [pm] => ondemand [pm_max_children] => 10 [pm_start_servers] => 2 [pm_min_spare_servers] => 1 [pm_max_spare_servers] => 5 [pm_process_idle_timeout] => 10 [pm_max_requests] => 0 [php_open_basedir] => /var/www/clients/client1/web1/web:/var/www/clients/client1/web1/private:/var/www/clients/client1/web1/tmp:/var/www/testdom.xx/web:/srv/www/testdom.xx/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom [custom_php_ini] => [backup_interval] => none [backup_copies] => 1 [backup_format_web] => default [backup_format_db] => gzip [backup_encrypt] => n [backup_password] => [backup_excludes] => [active] => y [traffic_quota_lock] => n [proxy_directives] => [last_quota_notification] => [rewrite_rules] => [added_date] => 2023-10-19 [added_by] => admin [directive_snippets_id] => 0 [enable_pagespeed] => n [http_port] => 80 [https_port] => 443 [folder_directive_snippets] => [log_retention] => 10 [proxy_protocol] => n [server_php_id] => 0 [jailkit_chroot_app_sections] => [jailkit_chroot_app_programs] => [delete_unused_jailkit] => n [last_jailkit_update] => 2023-10-19 [last_jailkit_hash] => )`
$this-\>dataRecords after an Error
`Array ( [server_id] => 1 [ip_address] => * [ipv6_address] => [domain] => testdom.xx [type] => vhost [parent_domain_id] => 0 [vhost_type] => name [hd_quota] => 0 [traffic_quota] => -1 [cgi] => n [ssi] => n [suexec] => y [errordocs] => 1 [subdomain] => www [ssl] => n [ssl_letsencrypt] => n [php] => no [server_php_id] => 0 [perl] => n [ruby] => n [python] => n [enable_pagespeed] => [active] => y [web_folder] => )`
## Environment
Ubuntu 22.04 ISPConfig version: 3.2.113.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6586Allow for disable web backup2023-10-09T17:34:36ZXaver MaierhoferAllow for disable web backup## Summary
Widcard (`*`) will throw an error
## Steps to reproduce
1. Add a backup with `*` as exclude path
2. Look into logs
## Correct behaviour
Tries to backup with complete excluded directory and will throw an error into logs
#...## Summary
Widcard (`*`) will throw an error
## Steps to reproduce
1. Add a backup with `*` as exclude path
2. Look into logs
## Correct behaviour
Tries to backup with complete excluded directory and will throw an error into logs
## Proposed fix
Skip web backup with `*`. Web is done with a tool that supports deduplication. Larger web and few changing file will result in massive backups.https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6573[installer] All ISPConfig files have execute bit set after installation.2023-09-16T14:53:19ZDr. Yves Kreis[installer] All ISPConfig files have execute bit set after installation.All ISPConfig files have execute bit set after installation. This is unnecessary and confusing.
However /usr/local/ispconfig/server/scripts/<ispconfig_patch|vlogger> need execute bit.
Besides /usr/local/ispconfig/interface/lib/config.in...All ISPConfig files have execute bit set after installation. This is unnecessary and confusing.
However /usr/local/ispconfig/server/scripts/<ispconfig_patch|vlogger> need execute bit.
Besides /usr/local/ispconfig/interface/lib/config.inc.php~ isn't protected.3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6561Database user permissions are not returned as they should be.2023-09-16T14:50:57ZAlexandre Pereira BühlerDatabase user permissions are not returned as they should be.MariaDB 10.3. Debian buster. ISPConfig 3.2.11.
Steps to reproduce.
1) Create a database and user.
2) Create a table.
3) Overflow the database quota.
4) The next day when we increase the database quota.
The user's permissions are not corr...MariaDB 10.3. Debian buster. ISPConfig 3.2.11.
Steps to reproduce.
1) Create a database and user.
2) Create a table.
3) Overflow the database quota.
4) The next day when we increase the database quota.
The user's permissions are not corrected.
They remain the same as when the quota was exceeded.
They look like in the image with the number 2.
![beforequotaexceeded](/uploads/e43065b1c9809d9db19e15afe111ceae/beforequotaexceeded.PNG)
![afterquotaexceeded](/uploads/975ecb97081cdcf10a644cbcdf3d9f9b/afterquotaexceeded.PNG)https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6560client info is showing the data of all clients2023-09-16T14:51:06ZAlexandre Pereira Bühlerclient info is showing the data of all clientsGood morning,
In the clients grid, when you click on a client, the client info is showing the data of all the clients.
Shouldn't it only show the data of the selected customer?
Thank youGood morning,
In the clients grid, when you click on a client, the client info is showing the data of all the clients.
Shouldn't it only show the data of the selected customer?
Thank you3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6558Add better default values when adding a new spamfilter policy.2023-08-18T14:32:54ZTill BrehmAdd better default values when adding a new spamfilter policy.https://forum.howtoforge.com/threads/error-creating-new-email-spamfilter-policy.90997/https://forum.howtoforge.com/threads/error-creating-new-email-spamfilter-policy.90997/3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6543mysqldump command has been renamed to mariadb-dump in latest versions2023-12-04T14:34:35ZTill Brehmmysqldump command has been renamed to mariadb-dump in latest versionshttps://forum.howtoforge.com/threads/how-to-upgrade-mariadb-with-ispconfig.89509/#post-447776https://forum.howtoforge.com/threads/how-to-upgrade-mariadb-with-ispconfig.89509/#post-4477763.2.13https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6540PHP Warnings and issues with character set in MySQL 82023-09-24T11:03:56ZTill BrehmPHP Warnings and issues with character set in MySQL 8https://forum.howtoforge.com/threads/migrate-mysql-to-mariadb.90840/#post-447639https://forum.howtoforge.com/threads/migrate-mysql-to-mariadb.90840/#post-447639https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6535mail alias on domain alias does not work2023-09-16T14:50:17Zdoekiamail alias on domain alias does not work## Summary
email to an aliased email on an aliased domain does not work
## Steps to reproduce
1. have an email alice@example.com
2. have an email alias bob@example.com => alice@example.com
3. have a domain alias @alternate.com => @examp...## Summary
email to an aliased email on an aliased domain does not work
## Steps to reproduce
1. have an email alice@example.com
2. have an email alias bob@example.com => alice@example.com
3. have a domain alias @alternate.com => @example.com
4. Try to send an email to bob@alternate.com
5. 550 5.1.1 <bob@alternate.com>: Recipient address rejected: User unknown in virtual alias table;
## Correct behaviour
Mail to be send to alice@example.com
## Environment
Debian 11
ISPConfig Version: 3.2.9p1
Apache2.4
## Proposed fix
See the patched query entry in /etc/postfix/mysql-virtual_forwardings.cf
#> postmap -q "bob@alternate.com" mysql:/etc/postfix/mysql-virtual_forwardings.cf
alice@example.com
```
query = SELECT s.destination AS target FROM mail_forwarding AS s
WHERE (s.source = '%s' OR s.source = CONCAT(SUBSTRING_INDEX('%u', '+', 1), '@%d'))
AND s.type IN ('alias', 'forward') AND s.active = 'y' AND s.server_id = 1
UNION
SELECT s.destination AS target FROM mail_forwarding AS s
WHERE s.source = '@%d' AND s.type = 'catchall'
AND s.active = 'y' AND s.server_id = 1
AND NOT EXISTS (
SELECT email FROM mail_user
WHERE (email = '%s' OR email = CONCAT(SUBSTRING_INDEX('%u', '+', 1), '@%d'))
AND EXISTS (
SELECT domain_id FROM mail_domain
WHERE domain = SUBSTRING_INDEX('%s', '@', -1)
AND active = 'y' AND server_id = 1
)
AND server_id = 1
)
AND NOT EXISTS (
SELECT source FROM mail_forwarding
WHERE (source = '%s' OR source = CONCAT(SUBSTRING_INDEX('%u', '+', 1), '@%d'))
AND active = 'y' AND server_id = 1
)
UNION
SELECT s.destination AS target FROM mail_forwarding AS s
INNER JOIN mail_forwarding AS s2
ON ( s2.source = '@%d'
AND s2.type = 'aliasdomain'
AND s2.active = 'y'
AND s2.server_id = 1)
WHERE (s.source = CONCAT(SUBSTRING_INDEX('%u', '+', 1), s2.destination))
AND s.type IN ('alias', 'forward')
AND s.active = 'y'
AND s.server_id = 1
```
PS: This settings (multiple alias) was working under ISPConfig Version: 3.1.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6530PowerDNS MySQL schema update2023-09-16T14:49:03ZArtur YakupovPowerDNS MySQL schema update
## Summary
Updated MySQL schema for PowerDNS prevents correct work.
/usr/share/pdns-backend-mysql/schema# cat ./4.1.0_to_4.2.0_schema.mysql.sql
ALTER TABLE domains MODIFY notified_serial INT UNSIGNED DEFAULT NULL;
ALTER TABLE records D...
## Summary
Updated MySQL schema for PowerDNS prevents correct work.
/usr/share/pdns-backend-mysql/schema# cat ./4.1.0_to_4.2.0_schema.mysql.sql
ALTER TABLE domains MODIFY notified_serial INT UNSIGNED DEFAULT NULL;
ALTER TABLE records DROP COLUMN change_date;
## Steps to reproduce
Implement PowerDNS with MySQL schema starting from 4.2.0 version of PowerDNS.
## Correct behaviour
Schemas should be compatible
## Environment
Server OS + version: Debian 10 and up
ISPConfig version: 3.9.0 and up
Software version of the related software: PowerDNS 4.2.0 and up
## Proposed fix to ispconfig/server/plugins-available/powerdns_plugin.inc.php
```
58d57
< `change_date` int(11) default NULL,
150c149
< $app->db->query("INSERT INTO powerdns.records (domain_id, name, type, content, ttl, prio, change_date, ispconfig_id) VALUES (?, ?, 'SOA', ?, ?, 0, UNIX_TIMESTAMP(), ?)", $zone_id, $origin, $content, $ttl, $ispconfig_id);
---
> $app->db->query("INSERT INTO powerdns.records (domain_id, name, type, content, ttl, prio, ispconfig_id) VALUES (?, ?, 'SOA', ?, ?, 0, ?)", $zone_id, $origin, $content, $ttl, $ispconfig_id);
184c183
< $app->db->query("UPDATE powerdns.records SET name = ?, content = ?, ttl = ?, change_date = UNIX_TIMESTAMP() WHERE ispconfig_id = ? AND type = 'SOA'", $origin, $content, $ttl, $data["new"]["id"]);
---
> $app->db->query("UPDATE powerdns.records SET name = ?, content = ?, ttl = ? WHERE ispconfig_id = ? AND type = 'SOA'", $origin, $content, $ttl, $data["new"]["id"]);
328d326
< $change_date = time();
331c329
< $app->db->query("INSERT INTO powerdns.records (domain_id, name, type, content, ttl, prio, change_date, ispconfig_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", $zone_id, $name, $type, $content, $ttl, $prio, $change_date, $ispconfig_id);
---
> $app->db->query("INSERT INTO powerdns.records (domain_id, name, type, content, ttl, prio, ispconfig_id) VALUES (?, ?, ?, ?, ?, ?, ?)", $zone_id, $name, $type, $content, $ttl, $prio, $ispconfig_id);
394d391
< $change_date = time();
396c393
< $app->db->query("UPDATE powerdns.records SET name = ?, type = ?, content = ?, ttl = ?, prio = ?, change_date = UNIX_TIMESTAMP() WHERE ispconfig_id = ? AND type != 'SOA'", $name, $type, $content, $ttl, $prio, $ispconfig_id);
---
> $app->db->query("UPDATE powerdns.records SET name = ?, type = ?, content = ?, ttl = ?, prio = ? WHERE ispconfig_id = ? AND type != 'SOA'", $name, $type, $content, $ttl, $prio, $ispconfig_id);
```
## Related log entries
16.06.2023-09:46 - WARNING - Falsche Anfrage / Wrong QuerySQL-Query = INSERT INTO powerdns.records (domain_id, name, type, content, ttl, prio, change_date, ispconfig_id) VALUES ('143', '***', 'A', '*****', '3600', '0', 1686897961, '4950') -> 1054 (Unknown column 'change_date' in 'field list')https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6525php error if function formatBytes get calles with some non numeric value2023-06-10T05:19:08ZHannesphp error if function formatBytes get calles with some non numeric valueOnly happens if something goes wrong somewhere.<br>
Example if email backup has no size written back into DB than if you click on Email Backup Tab the following error occurs<br>
<pre>
[Fri Jun 09 19:44:32.274647 2023] [fcgid:warn] [pi...Only happens if something goes wrong somewhere.<br>
Example if email backup has no size written back into DB than if you click on Email Backup Tab the following error occurs<br>
<pre>
[Fri Jun 09 19:44:32.274647 2023] [fcgid:warn] [pid 1425757:tid 139802577917504] mod_fcgid: stderr: PHP Fatal error: Uncaught TypeError: log(): Argument #1 ($num) must be of type float, string given in /usr/local/ispconfig/interface/lib/classes/functions.inc.php:290
</pre>
Could happens in other (non standard) conditions too.<br><br>
A is_numeric() check or something like this would be useful to make it more failsafe.<br>
<pre>
public function formatBytes($size, $precision = 2) {
if (!is_numeric($size)) {
global $app;
$app->log('Function formatBytes got non nummeric value - check it', LOGLEVEL_ERROR);
return '';
}
$base=log($size)/log(1024);
$suffixes=array('', ' kB', ' MB', ' GB', ' TB');
return round(pow(1024, $base-floor($base)), $precision).$suffixes[floor($base)];
}
</pre>