Skip to content

Commit 9fbc4aa

Browse files
committed
Merge branch 'develop' into nginx_TLSv1.3_detection
2 parents 0fa67c4 + 35aa8f8 commit 9fbc4aa

Some content is hidden

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

54 files changed

+321
-92
lines changed

install/dist/conf/centos72.conf.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@
9696
$conf['web']['apps_vhost_user'] = 'ispapps';
9797
$conf['web']['apps_vhost_group'] = 'ispapps';
9898

99+
//* AWStats settings
100+
$conf['awstats']['pl'] = '/usr/share/awstats/wwwroot/cgi-bin/awstats.pl';
101+
99102
//* Fastcgi
100103
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
101104
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';

install/dist/conf/centos80.conf.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@
9696
$conf['web']['apps_vhost_user'] = 'ispapps';
9797
$conf['web']['apps_vhost_group'] = 'ispapps';
9898

99+
//* AWStats settings
100+
$conf['awstats']['pl'] = '/usr/share/awstats/wwwroot/cgi-bin/awstats.pl';
101+
99102
//* Fastcgi
100103
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
101104
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';

install/dist/lib/debian60.lib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function configure_dovecot()
3939
$configure_lmtp = false;
4040

4141
// use lmtp if installed
42-
if($configure_lmtp = is_file('/usr/lib/dovecot/lmtp')) {
42+
if($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) {
4343
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
4444
}
4545

@@ -168,7 +168,7 @@ public function configure_dovecot()
168168
}
169169

170170
//* dovecot-managesieved
171-
if(is_file('/usr/lib/dovecot/managesieve')) {
171+
if(is_file('/usr/lib/dovecot/managesieve') || is_file('/usr/libexec/dovecot/managesieve')) {
172172
$dovecot_protocols .= ' sieve';
173173
}
174174

install/dist/lib/fedora.lib.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,19 @@ function configure_postfix($options = '')
163163
$stress_adaptive_placeholder = '#{stress_adaptive} ';
164164
$stress_adaptive = (isset($server_ini_array['mail']['stress_adaptive']) && ($server_ini_array['mail']['stress_adaptive'] == 'y')) ? '' : $stress_adaptive_placeholder;
165165

166+
$reject_unknown_client_hostname='';
167+
if (isset($server_ini_array['mail']['reject_unknown']) && ($server_ini_array['mail']['reject_unknown'] == 'client' || $server_ini_array['mail']['reject_unknown'] == 'client_helo')) {
168+
$reject_unknown_client_hostname=',reject_unknown_client_hostname';
169+
}
170+
$reject_unknown_helo_hostname='';
171+
if ((!isset($server_ini_array['mail']['reject_unknown'])) || $server_ini_array['mail']['reject_unknown'] == 'helo' || $server_ini_array['mail']['reject_unknown'] == 'client_helo') {
172+
$reject_unknown_helo_hostname=',reject_unknown_helo_hostname';
173+
}
174+
166175
unset($server_ini_array);
167176

177+
$myhostname = str_replace('.','\.',$conf['hostname']);
178+
168179
$postconf_placeholders = array('{config_dir}' => $config_dir,
169180
'{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
170181
'{vmail_userid}' => $cf['vmail_userid'],
@@ -173,7 +184,10 @@ function configure_postfix($options = '')
173184
'{greylisting}' => $greylisting,
174185
'{reject_slm}' => $reject_sender_login_mismatch,
175186
'{reject_aslm}' => $reject_authenticated_sender_login_mismatch,
187+
'{myhostname}' => $myhostname,
176188
$stress_adaptive_placeholder => $stress_adaptive,
189+
'{reject_unknown_client_hostname}' => $reject_unknown_client_hostname,
190+
'{reject_unknown_helo_hostname}' => $reject_unknown_helo_hostname,
177191
);
178192

179193
$postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_postfix.conf.master', 'tpl/fedora_postfix.conf.master');
@@ -381,6 +395,11 @@ public function configure_dovecot()
381395

382396
$configure_lmtp = false;
383397

398+
// use lmtp if installed
399+
if($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) {
400+
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
401+
}
402+
384403
// check if virtual_transport must be changed
385404
if ($this->is_update) {
386405
$tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']);

install/dist/lib/gentoo.lib.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,19 @@ public function configure_postfix($options = '')
112112
$stress_adaptive_placeholder = '#{stress_adaptive} ';
113113
$stress_adaptive = (isset($server_ini_array['mail']['stress_adaptive']) && ($server_ini_array['mail']['stress_adaptive'] == 'y')) ? '' : $stress_adaptive_placeholder;
114114

115+
$reject_unknown_client_hostname='';
116+
if (isset($server_ini_array['mail']['reject_unknown']) && ($server_ini_array['mail']['reject_unknown'] == 'client' || $server_ini_array['mail']['reject_unknown'] == 'client_helo')) {
117+
$reject_unknown_client_hostname=',reject_unknown_client_hostname';
118+
}
119+
$reject_unknown_helo_hostname='';
120+
if ((!isset($server_ini_array['mail']['reject_unknown'])) || $server_ini_array['mail']['reject_unknown'] == 'helo' || $server_ini_array['mail']['reject_unknown'] == 'client_helo') {
121+
$reject_unknown_helo_hostname=',reject_unknown_helo_hostname';
122+
}
123+
115124
unset($server_ini_array);
116125

126+
$myhostname = str_replace('.','\.',$conf['hostname']);
127+
117128
$postconf_placeholders = array('{config_dir}' => $config_dir,
118129
'{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
119130
'{vmail_userid}' => $cf['vmail_userid'],
@@ -122,7 +133,10 @@ public function configure_postfix($options = '')
122133
'{greylisting}' => $greylisting,
123134
'{reject_slm}' => $reject_sender_login_mismatch,
124135
'{reject_aslm}' => $reject_authenticated_sender_login_mismatch,
136+
'{myhostname}' => $myhostname,
125137
$stress_adaptive_placeholder => $stress_adaptive,
138+
'{reject_unknown_client_hostname}' => $reject_unknown_client_hostname,
139+
'{reject_unknown_helo_hostname}' => $reject_unknown_helo_hostname,
126140
);
127141

128142
$postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/gentoo_postfix.conf.master', 'tpl/gentoo_postfix.conf.master');

install/dist/lib/opensuse.lib.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,19 @@ function configure_postfix($options = '')
174174
$stress_adaptive_placeholder = '#{stress_adaptive} ';
175175
$stress_adaptive = (isset($server_ini_array['mail']['stress_adaptive']) && ($server_ini_array['mail']['stress_adaptive'] == 'y')) ? '' : $stress_adaptive_placeholder;
176176

177+
$reject_unknown_client_hostname='';
178+
if (isset($server_ini_array['mail']['reject_unknown']) && ($server_ini_array['mail']['reject_unknown'] == 'client' || $server_ini_array['mail']['reject_unknown'] == 'client_helo')) {
179+
$reject_unknown_client_hostname=',reject_unknown_client_hostname';
180+
}
181+
$reject_unknown_helo_hostname='';
182+
if ((!isset($server_ini_array['mail']['reject_unknown'])) || $server_ini_array['mail']['reject_unknown'] == 'helo' || $server_ini_array['mail']['reject_unknown'] == 'client_helo') {
183+
$reject_unknown_helo_hostname=',reject_unknown_helo_hostname';
184+
}
185+
177186
unset($server_ini_array);
178187

188+
$myhostname = str_replace('.','\.',$conf['hostname']);
189+
179190
$postconf_placeholders = array('{config_dir}' => $config_dir,
180191
'{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
181192
'{vmail_userid}' => $cf['vmail_userid'],
@@ -184,7 +195,10 @@ function configure_postfix($options = '')
184195
'{greylisting}' => $greylisting,
185196
'{reject_slm}' => $reject_sender_login_mismatch,
186197
'{reject_aslm}' => $reject_authenticated_sender_login_mismatch,
198+
'{myhostname}' => $myhostname,
187199
$stress_adaptive_placeholder => $stress_adaptive,
200+
'{reject_unknown_client_hostname}' => $reject_unknown_client_hostname,
201+
'{reject_unknown_helo_hostname}' => $reject_unknown_helo_hostname,
188202
);
189203

190204
$postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_postfix.conf.master', 'tpl/opensuse_postfix.conf.master');

install/lib/installer_base.lib.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,13 +774,28 @@ public function process_postfix_config($configfile) {
774774
chmod($config_dir.$configfile.'~',0600);
775775
}
776776

777+
exec('postconf -h recipient_delimiter 2>/dev/null', $out);
778+
if (strlen($out[0]) > 0) {
779+
// build string like: CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX('%u', '%%', 1), '+', 1), '@%d')
780+
$addr_cleanup = "'%u'";
781+
foreach (str_split($out[0]) as $delim) {
782+
$recipient_delimiter = $this->db->escape( str_replace('%', '%%', $delim) );
783+
$addr_cleanup = "SUBSTRING_INDEX(${addr_cleanup}, '${recipient_delimiter}', 1)";
784+
}
785+
$no_addr_extension = "CONCAT(${addr_cleanup}, '@%d')";
786+
} else {
787+
$no_addr_extension = "''";
788+
}
789+
unset($out);
790+
777791
//* Replace variables in config file template
778792
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
779793
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
780794
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
781795
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
782796
$content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
783797
$content = str_replace('{server_id}', $conf['server_id'], $content);
798+
$content = str_replace('{address_without_extension}', $no_addr_extension, $content);
784799
wf($full_file_name, $content);
785800

786801
//* Changing mode and group of the new created config file
@@ -1418,7 +1433,7 @@ public function configure_dovecot() {
14181433
$configure_lmtp = false;
14191434

14201435
// use lmtp if installed
1421-
if($configure_lmtp = is_file('/usr/lib/dovecot/lmtp')) {
1436+
if($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) {
14221437
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
14231438
}
14241439

@@ -1577,7 +1592,7 @@ public function configure_dovecot() {
15771592
}
15781593

15791594
//* dovecot-managesieved
1580-
if(is_file('/usr/lib/dovecot/managesieve')) {
1595+
if(is_file('/usr/lib/dovecot/managesieve') || is_file('/usr/libexec/dovecot/managesieve')) {
15811596
$dovecot_protocols .= ' sieve';
15821597
}
15831598

install/tpl/debian6_dovecot2.conf.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ protocol lmtp {
8888
#2.3+ group = vmail
8989
#2.3+ mode = 0660
9090
#2.3+ }
91-
#2.3+
91+
#2.3+
9292
#2.3+ unix_listener stats-writer {
9393
#2.3+ user = vmail
9494
#2.3+ group = vmail

install/tpl/debian_dovecot2.conf.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ssl_min_protocol = TLSv1.2
1212
ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
1313
ssl_prefer_server_ciphers = no
1414
mail_max_userip_connections = 100
15-
mail_plugins = $mail_plugins quota
15+
mail_plugins = quota
1616
passdb {
1717
args = /etc/dovecot/dovecot-sql.conf
1818
driver = sql
@@ -86,7 +86,7 @@ protocol lmtp {
8686
#2.3+ group = vmail
8787
#2.3+ mode = 0660
8888
#2.3+ }
89-
#2.3+
89+
#2.3+
9090
#2.3+ unix_listener stats-writer {
9191
#2.3+ user = vmail
9292
#2.3+ group = vmail

install/tpl/fedora_dovecot2.conf.master

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,13 @@ protocol lmtp {
7676
mail_plugins = quota sieve
7777
}
7878

79-
mail_plugins = $mail_plugins quota
80-
8179
#2.3+ service stats {
8280
#2.3+ unix_listener stats-reader {
8381
#2.3+ user = vmail
8482
#2.3+ group = vmail
8583
#2.3+ mode = 0660
8684
#2.3+ }
87-
#2.3+
85+
#2.3+
8886
#2.3+ unix_listener stats-writer {
8987
#2.3+ user = vmail
9088
#2.3+ group = vmail

0 commit comments

Comments
 (0)