Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
ed38518a
Commit
ed38518a
authored
Feb 01, 2017
by
Florian Schaal
Browse files
postfix-filter requieres postfix reload
parent
2813e94e
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/postfix_filter_plugin.inc.php
View file @
ed38518a
...
...
@@ -79,6 +79,8 @@ class postfix_filter_plugin {
global
$app
,
$conf
;
$type
=
$data
[
"new"
][
"type"
];
$restart
=
false
;
if
(
$type
!=
''
)
{
$sql
=
"SELECT * FROM mail_content_filter WHERE server_id = ? AND type = ? AND active = 'y'"
;
$rules
=
$app
->
db
->
queryAllRecords
(
$sql
,
$conf
[
"server_id"
],
$type
);
...
...
@@ -91,21 +93,25 @@ class postfix_filter_plugin {
if
(
$type
==
'header'
)
{
file_put_contents
(
'/etc/postfix/header_checks'
,
$content
);
$app
->
log
(
"Writing /etc/postfix/header_checks"
,
LOGLEVEL_DEBUG
);
$restart
=
true
;
}
if
(
$type
==
'mime_header'
)
{
file_put_contents
(
'/etc/postfix/mime_header_checks'
,
$content
);
$app
->
log
(
"Writing /etc/postfix/mime_header_checks"
,
LOGLEVEL_DEBUG
);
$restart
=
true
;
}
if
(
$type
==
'nested_header'
)
{
file_put_contents
(
'/etc/postfix/nested_header_checks'
,
$content
);
$app
->
log
(
"Writing /etc/postfix/nested_header_checks"
,
LOGLEVEL_DEBUG
);
$restart
=
true
;
}
if
(
$type
==
'body'
)
{
file_put_contents
(
'/etc/postfix/body_checks'
,
$content
);
$app
->
log
(
"Writing /etc/postfix/body_checks"
,
LOGLEVEL_DEBUG
);
$restart
=
true
;
}
}
...
...
@@ -122,23 +128,28 @@ class postfix_filter_plugin {
if
(
$type
==
'header'
)
{
file_put_contents
(
'/etc/postfix/header_checks'
,
$content
);
$app
->
log
(
"Writing /etc/postfix/header_checks"
,
LOGLEVEL_DEBUG
);
$restart
=
true
;
}
if
(
$type
==
'mime_header'
)
{
file_put_contents
(
'/etc/postfix/mime_header_checks'
,
$content
);
$app
->
log
(
"Writing /etc/postfix/mime_header_checks"
,
LOGLEVEL_DEBUG
);
$restart
=
true
;
}
if
(
$type
==
'nested_header'
)
{
file_put_contents
(
'/etc/postfix/nested_header_checks'
,
$content
);
$app
->
log
(
"Writing /etc/postfix/nested_header_checks"
,
LOGLEVEL_DEBUG
);
$restart
=
true
;
}
if
(
$type
==
'body'
)
{
file_put_contents
(
'/etc/postfix/body_checks'
,
$content
);
$app
->
log
(
"Writing /etc/postfix/body_checks"
,
LOGLEVEL_DEBUG
);
$restart
=
true
;
}
}
if
(
$restart
)
exec
(
'postfix reload'
);
}
function
delete
(
$event_name
,
$data
)
{
...
...
Florian Schaal
@florian030
Mentioned in issue
#4544 (closed)
·
Feb 24, 2017
Mentioned in issue
#4544 (closed)
Mentioned in issue #4544
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment