Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
d2212dda
Commit
d2212dda
authored
Sep 19, 2010
by
tbrehm
Browse files
Fixed bug in maildirmake function:
http://www.howtoforge.com/forums/showthread.php?t=48890
parent
6fc833c0
Changes
1
Show whitespace changes
Inline
Side-by-side
server/lib/classes/system.inc.php
View file @
d2212dda
...
...
@@ -1187,13 +1187,13 @@ class system{
global
$app
;
if
(
$subfolder
!=
''
)
{
$dir
=
escapeshell
arg
(
$maildir_path
.
'/.'
.
$subfolder
);
$dir
=
escapeshell
cmd
(
$maildir_path
.
'/.'
.
$subfolder
);
}
else
{
$dir
=
escapeshell
arg
(
$maildir_path
);
$dir
=
escapeshell
cmd
(
$maildir_path
);
}
if
(
$user
!=
''
&&
$user
!=
'root'
&&
$this
->
is_user
(
$user
))
{
$user
=
escapeshell
arg
(
$user
);
$user
=
escapeshell
cmd
(
$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
);
...
...
@@ -1214,18 +1214,20 @@ class system{
chmod
(
$dir
,
0700
);
/*
if($user != '' && $this->is_user($user) && $user != 'root') {
$user
=
escapeshell
arg
(
$user
);
$user = escapeshell
cmd
($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;
exec("chown $user:$group $dir $dir_cur $dir_new $dir_tmp");
}
*/
//* Add the subfolder to the subscriptions and courierimapsubscribed files
if
(
$subfolder
!=
''
)
{
// Courier
if
(
!
is_file
(
$maildir_path
.
'/courierimapsubscribed'
))
{
$tmp_file
=
escapeshell
arg
(
$maildir_path
.
'/courierimapsubscribed'
);
$tmp_file
=
escapeshell
cmd
(
$maildir_path
.
'/courierimapsubscribed'
);
touch
(
$tmp_file
);
chmod
(
$tmp_file
,
0744
);
chown
(
$tmp_file
,
'vmail'
);
...
...
@@ -1235,7 +1237,7 @@ class system{
// Dovecot
if
(
!
is_file
(
$maildir_path
.
'/subscriptions'
))
{
$tmp_file
=
escapeshell
arg
(
$maildir_path
.
'/subscriptions'
);
$tmp_file
=
escapeshell
cmd
(
$maildir_path
.
'/subscriptions'
);
touch
(
$tmp_file
);
chmod
(
$tmp_file
,
0744
);
chown
(
$tmp_file
,
'vmail'
);
...
...
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