Skip to content

Commit 129ef6f

Browse files
committed
Fixed merge
2 parents 3adb456 + a6164cb commit 129ef6f

File tree

165 files changed

+1515
-962
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+1515
-962
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,9 @@ Temporary Items
5858

5959
# Visual Studio IDE cache/options directory
6060
.vs/
61+
62+
# do not version control generated config files
63+
/server/lib/mysql_clientdb.conf
64+
/server/lib/config.inc.php
65+
/server/lib/config.inc.local.php
66+
/interface/lib/config.inc.local.php

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Please do not refactor existing code and do not change the signature or the beha
99
* Before opening a new issue, use the search function to check if there isn't a bug report / feature request already.
1010
* If you are reporting a bug, please share your OS and PHP (CLI) version.
1111
* If you want to report several bugs or request several features, open a separate issue for each one of them.
12+
* Do note re-open issues that were closed by the core dev team unless something new and important that is not mentioned in the original issue needs to be added. Permanently re-opening issues that we commented on and closed will get your account banned. You may add comments to issues without re-opening them though.
1213

1314
# Branches
1415
* If you are a new user, please send an email to: dev [at] ispconfig [dot] org to receive rights to fork the project.

install/dist/conf/gentoo.conf.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
4+
Copyright (c) 2025, Till Brehm, projektfarm Gmbh
55
All rights reserved.
66
77
Redistribution and use in source and binary forms, with or without modification,
@@ -43,6 +43,7 @@
4343
$conf['runlevel'] = '/etc';
4444
$conf['shells'] = '/etc/shells';
4545
$conf['pam'] = '/etc/pam.d';
46+
$conf['default_php'] = "8.2";
4647

4748
//* Services provided by this server, this selection will be overridden by the expert mode
4849
$conf['services']['mail'] = true;
@@ -91,8 +92,8 @@
9192
$conf['apache']['vhost_conf_enabled_dir'] = $conf['apache']['vhost_conf_dir'];
9293
$conf['apache']['vhost_default'] = '00_default_vhost.conf';
9394
$conf['apache']['vhost_port'] = '8080';
94-
$conf['apache']['php_ini_path_apache'] = '/etc/php/apache2-php7.4/php.ini';
95-
$conf['apache']['php_ini_path_cgi'] = '/etc/php/cgi-php7.4/php.ini';
95+
$conf['apache']['php_ini_path_apache'] = '/etc/php/apache2-php8.2/php.ini';
96+
$conf['apache']['php_ini_path_cgi'] = '/etc/php/cgi-php8.2/php.ini';
9697

9798
//* Website base settings
9899
$conf['web']['website_basedir'] = '/var/www';
@@ -113,7 +114,7 @@
113114
$conf['awstats']['buildstaticpages_pl'] = '/usr/bin/awstats_buildstaticpages.pl';
114115

115116
//* Fastcgi
116-
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/cgi-php7.4';
117+
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/cgi-php8.2';
117118
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
118119
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
119120

@@ -167,6 +168,7 @@
167168
//* Amavisd
168169
$conf['amavis']['installed'] = false; // will be detected automatically during installation
169170
$conf['amavis']['config_file'] = '/etc/amavisd.conf';
171+
$conf['amavis']['config_dir'] = '/etc';
170172
$conf['amavis']['init_script'] = 'amavisd';
171173

172174
//* Rspamd
@@ -245,7 +247,7 @@
245247
$conf['vlogger']['config_dir'] = '/etc/vlogger';
246248

247249
//* cron
248-
$conf['cron']['init_script'] = 'vixie-cron';
250+
$conf['cron']['init_script'] = 'cronie';
249251
$conf['cron']['crontab_dir'] = '/etc/cron.d';
250252
$conf['cron']['group'] = 'cron';
251253
$conf['cron']['wget'] = '/usr/bin/wget';
@@ -259,3 +261,4 @@
259261

260262

261263
?>
264+

install/dist/lib/gentoo.lib.php

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -427,15 +427,15 @@ public function configure_dovecot() {
427427
foreach ($options as $value) {
428428
$value = trim($value);
429429
if ($value == '') continue;
430-
if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf|", $value)) {
430+
if (preg_match("|check_recipient_access\s+proxy:mysql:{$quoted_config_dir}/mysql-verify_recipients.cf|", $value)) {
431431
continue;
432432
}
433433
$new_options[] = $value;
434434
}
435-
if ($configure_lmtp && $conf['mail']['content_filter'] === 'amavisd') {
435+
if ($configure_lmtp && (!isset($conf['mail']['content_filter']) || $conf['mail']['content_filter'] === 'amavisd')) {
436436
for ($i = 0; isset($new_options[$i]); $i++) {
437437
if ($new_options[$i] == 'reject_unlisted_recipient') {
438-
array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${config_dir}/mysql-verify_recipients.cf"));
438+
array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:{$config_dir}/mysql-verify_recipients.cf"));
439439
break;
440440
}
441441
}
@@ -502,20 +502,26 @@ public function configure_dovecot() {
502502

503503
// Check if we have a dhparams file and if not, create it
504504
if(!file_exists('/etc/dovecot/dh.pem')) {
505-
swriteln('Creating new DHParams file, this takes several minutes. Do not interrupt the script.');
505+
// Create symlink to ISPConfig dhparam file
506+
swriteln('Creating symlink /etc/dovecot/dh.pem to ISPConfig DHParam file.');
507+
symlink('/usr/local/ispconfig/interface/ssl/dhparam4096.pem', '/etc/dovecot/dh.pem');
508+
509+
/*
510+
swriteln('Creating new DHParams file, this takes several minutes. Do not interrupt the script.');
506511
if(file_exists('/var/lib/dovecot/ssl-parameters.dat')) {
507512
// convert existing ssl parameters file
508513
$command = 'dd if=/var/lib/dovecot/ssl-parameters.dat bs=1 skip=88 | openssl dhparam -inform der > /etc/dovecot/dh.pem';
509514
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
510515
} else {
511-
/*
512-
Create a new dhparams file. We use 2048 bit only as it simply takes too long
513-
on smaller systems to generate a 4096 bit dh file (> 30 minutes). If you need
514-
a 4096 bit file, create it manually before you install ISPConfig
515-
*/
516+
517+
//Create a new dhparams file. We use 2048 bit only as it simply takes too long
518+
//on smaller systems to generate a 4096 bit dh file (> 30 minutes). If you need
519+
// a 4096 bit file, create it manually before you install ISPConfig
520+
516521
$command = 'openssl dhparam -out /etc/dovecot/dh.pem 2048';
517522
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
518523
}
524+
*/
519525
}
520526
//remove #2.3+ comment
521527
$content = file_get_contents($config_dir.'/'.$configfile);

install/dist/tpl/gentoo/amavisd-ispconfig.conf.master

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ $policy_bank{'ORIGINATING'} = {
105105
originating => 1,
106106
smtpd_discard_ehlo_keywords => ['8BITMIME'],
107107
};
108+
$policy_bank{'MYNETS'} = {
109+
originating => 1,
110+
};
108111

109112
# IP-Addresses for internal networks => load policy MYNETS
110113
# - requires -o smtp_send_xforward_command=yes in postfix master.cf

install/install.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@
8585
chdir( realpath(dirname(__FILE__)) );
8686
}
8787

88-
//** Install logfile
89-
define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log');
9088
define('ISPC_INSTALL_ROOT', realpath(dirname(__FILE__).'/../'));
9189

9290
//** Include the templating lib
@@ -156,10 +154,15 @@
156154
swriteln($inst->lng(' Tap in "quit" (without the quotes) to stop the installer.'."\n\n"));
157155

158156
//** Check log file is writable (probably not root or sudo)
159-
if(!is_writable(dirname(ISPC_LOG_FILE))){
160-
die("ERROR: Cannot write to the ".dirname(ISPC_LOG_FILE)." directory. Are you root or sudo ?\n\n");
157+
if(!is_writable(dirname($conf['ispconfig_log_dir']))){
158+
die("ERROR: Cannot write to the ".$conf['ispconfig_log_dir']." directory. Are you root or sudo ?\n\n");
161159
}
162160

161+
if(!is_dir($conf['ispconfig_log_dir'])) {
162+
mkdir($conf['ispconfig_log_dir'], 0755, true);
163+
}
164+
define('ISPC_LOG_FILE', $conf['ispconfig_log_dir'] . '/install.log');
165+
163166
//** Check for ISPConfig 2.x versions
164167
if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) {
165168
if(is_dir('/home/admispconfig')) {

install/lib/installer_base.lib.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,7 @@ public function remove_postfix_service( $service, $type ) {
10721072

10731073
# reduce 3 or more newlines to 2
10741074
$content = rf($conf['postfix']['config_dir'].'/master.cf');
1075+
$content = preg_replace( '/^# Data returning from Amavis .*$/m', '', $content ); # Cleanup comment we generated
10751076
$content = preg_replace( '/(\r?\n){3,}/', '$1$1', $content );
10761077
wf( $conf['postfix']['config_dir'].'/master.cf', $content );
10771078

@@ -2618,24 +2619,25 @@ public function configure_bastille_firewall() {
26182619

26192620
$row = $this->db->queryOneRecord('SELECT * FROM ?? WHERE server_id = ?', $conf["mysql"]["database"] . '.firewall', $conf['server_id']);
26202621

2622+
$tcp_public_services = '21 22 25 53 80 110 143 443 3306 8080 10000';
2623+
$udp_public_services = '53';
2624+
26212625
if (!empty($row)) {
26222626
if(trim($row['tcp_port']) != '' || trim($row['udp_port']) != '') {
26232627
$tcp_public_services = trim(str_replace(',', ' ', $row['tcp_port']));
26242628
$udp_public_services = trim(str_replace(',', ' ', $row['udp_port']));
2625-
} else {
2626-
$tcp_public_services = '21 22 25 53 80 110 143 443 3306 8080 10000';
2627-
$udp_public_services = '53';
26282629
}
26292630

26302631
if(!stristr($tcp_public_services, $conf['apache']['vhost_port'])) {
26312632
$tcp_public_services .= ' '.intval($conf['apache']['vhost_port']);
26322633
if($row['tcp_port'] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ? WHERE server_id = ?", ',' . intval($conf['apache']['vhost_port']), $conf['server_id']);
26332634
}
26342635

2635-
$content = str_replace('{TCP_PUBLIC_SERVICES}', $tcp_public_services, $content);
2636-
$content = str_replace('{UDP_PUBLIC_SERVICES}', $udp_public_services, $content);
26372636
}
26382637

2638+
$content = str_replace('{TCP_PUBLIC_SERVICES}', $tcp_public_services, $content);
2639+
$content = str_replace('{UDP_PUBLIC_SERVICES}', $udp_public_services, $content);
2640+
26392641
wf('/etc/Bastille/bastille-firewall.cfg', $content);
26402642

26412643
if(is_file($dist_init_scripts.'/bastille-firewall')) caselog('mv -f '.$dist_init_scripts.'/bastille-firewall '.$dist_init_scripts.'/bastille-firewall.backup', __FILE__, __LINE__);
@@ -2788,6 +2790,11 @@ public function configure_apps_vhost() {
27882790
$apps_vhost_group = escapeshellcmd($conf['web']['apps_vhost_group']);
27892791
$install_dir = escapeshellcmd($conf['web']['website_basedir'].'/apps');
27902792

2793+
//* Get the apps vhost port
2794+
if($this->is_update == true) {
2795+
$conf['web']['apps_vhost_port'] = get_apps_vhost_port_number();
2796+
}
2797+
27912798
$command = 'groupadd '.$apps_vhost_user;
27922799
if(!is_group($apps_vhost_group)) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
27932800

install/sql/ispconfig3.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,6 +1949,7 @@ CREATE TABLE IF NOT EXISTS `web_database_user` (
19491949
`database_user` varchar(64) DEFAULT NULL,
19501950
`database_user_prefix` varchar(50) NOT NULL default '',
19511951
`database_password` varchar(64) DEFAULT NULL,
1952+
`database_password_sha2` varchar(70) DEFAULT NULL,
19521953
`database_password_mongo` varchar(32) DEFAULT NULL,
19531954
PRIMARY KEY (`database_user_id`)
19541955
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

install/tpl/amavisd_user_config.master

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ $interface_policy{'10026'} = 'ORIGINATING';
8585
$policy_bank{'ORIGINATING'} = {
8686
originating => 1,
8787
};
88+
$policy_bank{'MYNETS'} = {
89+
originating => 1,
90+
};
8891

8992
# IP-Addresses for internal networks => load policy MYNETS
9093
# - requires -o smtp_send_xforward_command=yes in postfix master.cf

install/tpl/debian_postfix.conf.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ relay_recipient_maps = proxy:mysql:{config_dir}/mysql-virtual_relayrecipientmaps
2626
smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf
2727
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
2828
smtpd_helo_required = yes
29-
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
29+
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
3030
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
3131
smtpd_reject_unlisted_sender = no
32-
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
32+
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
3333
smtpd_etrn_restrictions = permit_mynetworks, reject
3434
smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
3535
smtpd_client_message_rate_limit = 100

0 commit comments

Comments
 (0)