Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
485
Issues
485
List
Boards
Labels
Service Desk
Milestones
Merge Requests
23
Merge Requests
23
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISPConfig
ISPConfig 3
Commits
be623712
Commit
be623712
authored
Feb 05, 2014
by
Florian Schaal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use regex to check for amavis-related config-lines in postfix master.cf
parent
7883fc57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
install/lib/installer_base.lib.php
install/lib/installer_base.lib.php
+4
-4
No files found.
install/lib/installer_base.lib.php
View file @
be623712
...
...
@@ -1040,19 +1040,19 @@ class installer_base {
if
(
is_file
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
))
copy
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf~'
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
// Only add the content if we had not addded it before
if
(
!
stristr
(
$content
,
'amavis'
))
{
if
(
!
preg_match
(
'/^amavis\s+unix\s+/m'
,
$content
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10025'
))
{
if
(
!
preg_match
(
'/^127.0.0.1:10025\s+/m'
,
$content
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis10025.master'
,
'tpl/master_cf_amavis10025.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10027'
))
{
if
(
!
preg_match
(
'/^127.0.0.1:10027\s+/m'
,
$content
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis10027.master'
,
'tpl/master_cf_amavis10027.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
...
...
@@ -1063,7 +1063,7 @@ class installer_base {
exec
(
'adduser clamav amavis'
);
// Create the director for DKIM-Keys
if
(
!
is_dir
(
'/var/lib/amavis/dkim'
))
mkdir
(
'
-p /var/lib/amavis/dkim'
,
0750
);
if
(
!
is_dir
(
'/var/lib/amavis/dkim'
))
mkdir
(
'
/var/lib/amavis/dkim'
,
0750
,
true
);
// get shell-user for amavis
$amavis_user
=
exec
(
'grep -o "^amavis:\|^vscan:" /etc/passwd'
);
if
(
!
empty
(
$amavis_user
))
{
...
...
Write
Preview
Markdown
is supported
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