Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kevin
ISPConfig 3
Commits
73ec731b
Commit
73ec731b
authored
Mar 07, 2011
by
tbrehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: FS#1510 - Maildirsize, unlimited
parent
d8f64480
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
server/plugins-available/mail_plugin.inc.php
server/plugins-available/mail_plugin.inc.php
+18
-6
No files found.
server/plugins-available/mail_plugin.inc.php
View file @
73ec731b
...
@@ -152,8 +152,10 @@ class mail_plugin {
...
@@ -152,8 +152,10 @@ class mail_plugin {
//* Set the maildir quota
//* Set the maildir quota
if
(
is_dir
(
$data
[
'new'
][
'maildir'
]
.
'/new'
)
&&
$mail_config
[
'pop3_imap_daemon'
]
!=
'dovecot'
)
{
if
(
is_dir
(
$data
[
'new'
][
'maildir'
]
.
'/new'
)
&&
$mail_config
[
'pop3_imap_daemon'
]
!=
'dovecot'
)
{
exec
(
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$data
[
'new'
][
'maildir'
])
.
"' "
.
$mail_config
[
'mailuser_name'
]);
if
(
$data
[
'new'
][
'quota'
]
>
0
)
{
$app
->
log
(
'Set Maildir quota: '
.
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$data
[
'new'
][
'maildir'
])
.
"' "
.
$mail_config
[
'mailuser_name'
],
LOGLEVEL_DEBUG
);
exec
(
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$data
[
'new'
][
'maildir'
])
.
"' "
.
$mail_config
[
'mailuser_name'
]);
$app
->
log
(
'Set Maildir quota: '
.
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$data
[
'new'
][
'maildir'
])
.
"' "
.
$mail_config
[
'mailuser_name'
],
LOGLEVEL_DEBUG
);
}
}
}
}
}
...
@@ -212,8 +214,13 @@ class mail_plugin {
...
@@ -212,8 +214,13 @@ class mail_plugin {
$app
->
log
(
'Set ownership on '
.
escapeshellcmd
(
$data
[
'new'
][
'maildir'
]),
LOGLEVEL_DEBUG
);
$app
->
log
(
'Set ownership on '
.
escapeshellcmd
(
$data
[
'new'
][
'maildir'
]),
LOGLEVEL_DEBUG
);
//* This is to fix the maildrop quota not being rebuilt after the quota is changed.
//* This is to fix the maildrop quota not being rebuilt after the quota is changed.
if
(
$mail_config
[
'pop3_imap_daemon'
]
!=
'dovecot'
)
{
if
(
$mail_config
[
'pop3_imap_daemon'
]
!=
'dovecot'
)
{
exec
(
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$maildomain_path
)
.
"' "
.
$mail_config
[
'mailuser_name'
]);
// Avoid maildirmake quota bug, see debian bug #214911
if
(
$data
[
'new'
][
'quota'
]
>
0
)
{
$app
->
log
(
'Updated Maildir quota: '
.
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$maildomain_path
)
.
"' "
.
$mail_config
[
'mailuser_name'
],
LOGLEVEL_DEBUG
);
exec
(
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$maildomain_path
)
.
"' "
.
$mail_config
[
'mailuser_name'
]);
// Avoid maildirmake quota bug, see debian bug #214911
$app
->
log
(
'Updated Maildir quota: '
.
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$maildomain_path
)
.
"' "
.
$mail_config
[
'mailuser_name'
],
LOGLEVEL_DEBUG
);
}
else
{
if
(
file_exists
(
$data
[
'new'
][
'maildir'
]
.
'/maildirsize'
))
unlink
(
$data
[
'new'
][
'maildir'
]
.
'/maildirsize'
);
$app
->
log
(
'Set Maildir quota to unlimited.'
,
LOGLEVEL_DEBUG
);
}
}
}
}
}
...
@@ -253,8 +260,13 @@ class mail_plugin {
...
@@ -253,8 +260,13 @@ class mail_plugin {
//This is to fix the maildrop quota not being rebuilt after the quota is changed.
//This is to fix the maildrop quota not being rebuilt after the quota is changed.
// Courier Layout
// Courier Layout
if
(
is_dir
(
$data
[
'new'
][
'maildir'
]
.
'/new'
)
&&
$mail_config
[
'pop3_imap_daemon'
]
!=
'dovecot'
)
{
if
(
is_dir
(
$data
[
'new'
][
'maildir'
]
.
'/new'
)
&&
$mail_config
[
'pop3_imap_daemon'
]
!=
'dovecot'
)
{
exec
(
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$data
[
'new'
][
'maildir'
])
.
"' "
.
$mail_config
[
'mailuser_name'
]);
if
(
$data
[
'new'
][
'quota'
]
>
0
)
{
$app
->
log
(
'Updated Maildir quota: '
.
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$data
[
'new'
][
'maildir'
])
.
"' "
.
$mail_config
[
'mailuser_name'
],
LOGLEVEL_DEBUG
);
exec
(
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$data
[
'new'
][
'maildir'
])
.
"' "
.
$mail_config
[
'mailuser_name'
]);
$app
->
log
(
'Updated Maildir quota: '
.
"su -c 'maildirmake -q "
.
$data
[
'new'
][
'quota'
]
.
"S "
.
escapeshellcmd
(
$data
[
'new'
][
'maildir'
])
.
"' "
.
$mail_config
[
'mailuser_name'
],
LOGLEVEL_DEBUG
);
}
else
{
if
(
file_exists
(
$data
[
'new'
][
'maildir'
]
.
'/maildirsize'
))
unlink
(
$data
[
'new'
][
'maildir'
]
.
'/maildirsize'
);
$app
->
log
(
'Set Maildir quota to unlimited.'
,
LOGLEVEL_DEBUG
);
}
}
}
}
}
...
...
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