Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
2ebadd76
Commit
2ebadd76
authored
Sep 18, 2010
by
jwarnier
Browse files
improve maildirmake and remove yet other execs
parent
ea4f7ad0
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/lib/classes/system.inc.php
View file @
2ebadd76
...
...
@@ -1188,18 +1188,31 @@ class system{
if
(
$subfolder
!=
''
)
{
$dir
=
escapeshellarg
(
$maildir_path
.
'/.'
.
$subfolder
);
$dir_cur
=
escapeshellarg
(
$maildir_path
.
'/.'
.
$subfolder
.
'/cur'
);
$dir_new
=
escapeshellarg
(
$maildir_path
.
'/.'
.
$subfolder
.
'/new'
);
$dir_tmp
=
escapeshellarg
(
$maildir_path
.
'/.'
.
$subfolder
.
'/tmp'
);
}
else
{
$dir
=
escapeshellarg
(
$maildir_path
);
$dir_cur
=
escapeshellarg
(
$maildir_path
.
'/cur'
);
$dir_new
=
escapeshellarg
(
$maildir_path
.
'/new'
);
$dir_tmp
=
escapeshellarg
(
$maildir_path
.
'/tmp'
);
}
if
(
$user
!=
''
&&
$user
!=
'root'
&&
$this
->
is_user
(
$user
))
{
$user
=
escapeshellarg
(
$user
);
// I assume that the name of the (vmail group) is the same as the name of the mail user in ISPConfig 3
$group
=
$user
;
chown
(
$dir
,
$user
);
chgrp
(
$dir
,
$group
);
$chown_mdsub
=
true
;
}
exec
(
"mkdir -p
$dir_cur
$dir_new
$dir_tmp
"
);
exec
(
"chmod 0700
$dir
$dir_cur
$dir_new
$dir_tmp
"
);
$maildirsubs
=
array
(
'cur'
,
'new'
,
'tmp'
);
foreach
(
$maildirsubs
as
$mdsub
)
{
mkdir
(
$dir
.
'/'
.
$mdsub
,
0700
,
true
);
if
(
$chown_mdsub
)
{
chown
(
$dir
.
'/'
.
$mdsub
,
$user
);
chgrp
(
$dir
.
'/'
.
$mdsub
,
$group
);
}
}
chmod
(
$dir
,
0700
);
if
(
$user
!=
''
&&
$this
->
is_user
(
$user
)
&&
$user
!=
'root'
)
{
$user
=
escapeshellarg
(
$user
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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