Skip to content

Commit 55ad281

Browse files
author
Till Brehm
committed
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
2 parents 1311f10 + 0ae0dab commit 55ad281

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

interface/web/login/password_reset.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
if(isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != '443') $server_domain .= ':' . $_SERVER['SERVER_PORT'];
8686

8787
$app->uses('getconf,ispcmail');
88+
$server_config_array = $app->getconf->get_global_config();
8889
$mail_config = $server_config_array['mail'];
8990
if($mail_config['smtp_enabled'] == 'y') {
9091
$mail_config['use_smtp'] = true;

server/plugins-available/postfix_filter_plugin.inc.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ function update($event_name, $data) {
7979
global $app, $conf;
8080

8181
$type = $data["new"]["type"];
82+
$restart = false;
83+
8284
if($type != '') {
8385
$sql = "SELECT * FROM mail_content_filter WHERE server_id = ? AND type = ? AND active = 'y'";
8486
$rules = $app->db->queryAllRecords($sql, $conf["server_id"], $type);
@@ -91,21 +93,25 @@ function update($event_name, $data) {
9193
if($type == 'header') {
9294
file_put_contents('/etc/postfix/header_checks', $content);
9395
$app->log("Writing /etc/postfix/header_checks", LOGLEVEL_DEBUG);
96+
$restart = true;
9497
}
9598

9699
if($type == 'mime_header') {
97100
file_put_contents('/etc/postfix/mime_header_checks', $content);
98101
$app->log("Writing /etc/postfix/mime_header_checks", LOGLEVEL_DEBUG);
102+
$restart = true;
99103
}
100104

101105
if($type == 'nested_header') {
102106
file_put_contents('/etc/postfix/nested_header_checks', $content);
103107
$app->log("Writing /etc/postfix/nested_header_checks", LOGLEVEL_DEBUG);
108+
$restart = true;
104109
}
105110

106111
if($type == 'body') {
107112
file_put_contents('/etc/postfix/body_checks', $content);
108113
$app->log("Writing /etc/postfix/body_checks", LOGLEVEL_DEBUG);
114+
$restart = true;
109115
}
110116
}
111117

@@ -122,23 +128,28 @@ function update($event_name, $data) {
122128
if($type == 'header') {
123129
file_put_contents('/etc/postfix/header_checks', $content);
124130
$app->log("Writing /etc/postfix/header_checks", LOGLEVEL_DEBUG);
131+
$restart = true;
125132
}
126133

127134
if($type == 'mime_header') {
128135
file_put_contents('/etc/postfix/mime_header_checks', $content);
129136
$app->log("Writing /etc/postfix/mime_header_checks", LOGLEVEL_DEBUG);
137+
$restart = true;
130138
}
131139

132140
if($type == 'nested_header') {
133141
file_put_contents('/etc/postfix/nested_header_checks', $content);
134142
$app->log("Writing /etc/postfix/nested_header_checks", LOGLEVEL_DEBUG);
143+
$restart = true;
135144
}
136145

137146
if($type == 'body') {
138147
file_put_contents('/etc/postfix/body_checks', $content);
139148
$app->log("Writing /etc/postfix/body_checks", LOGLEVEL_DEBUG);
149+
$restart = true;
140150
}
141151
}
152+
if($restart) exec('postfix reload');
142153
}
143154

144155
function delete($event_name, $data) {

0 commit comments

Comments
 (0)