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
ISPConfig
ISPConfig 3
Commits
52bbc896
Commit
52bbc896
authored
Nov 15, 2015
by
Florian Schaal
Browse files
postfix server-plugin (check your changes before restarting postfix)
parent
f8bc88f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/postfix_server_plugin.inc.php
View file @
52bbc896
...
...
@@ -161,27 +161,29 @@ class postfix_server_plugin {
exec
(
'postfix reload'
);
}
if
(
$mail_config
[
"mailbox_virtual_uidgid_maps"
]
==
'y'
)
{
// If dovecot switch to lmtp
if
(
$app
->
system
->
is_installed
(
'dovecot'
))
{
exec
(
"postconf -e 'virtual_transport = lmtp:unix:private/dovecot-lmtp'"
);
exec
(
'postfix reload'
);
$app
->
system
->
replaceLine
(
"/etc/dovecot/dovecot.conf"
,
"protocols = imap pop3"
,
"protocols = imap pop3 lmtp"
);
exec
(
$conf
[
'init_scripts'
]
.
'/'
.
'dovecot restart'
);
}
}
else
{
// If dovecot switch to dovecot
if
(
$app
->
system
->
is_installed
(
'dovecot'
))
{
exec
(
"postconf -e 'virtual_transport = dovecot'"
);
exec
(
'postfix reload'
);
$app
->
system
->
replaceLine
(
"/etc/dovecot/dovecot.conf"
,
"protocols = imap pop3 lmtp"
,
"protocols = imap pop3"
);
exec
(
$conf
[
'init_scripts'
]
.
'/'
.
'dovecot restart'
);
if
(
$app
->
system
->
is_installed
(
'dovecot'
))
{
if
(
$mail_config
[
"mailbox_virtual_uidgid_maps"
]
==
'y'
)
{
$temp
=
exec
(
"postconf -n virtual_transport"
,
$out
);
// If dovecot switch to lmtp
if
(
$out
[
0
]
!=
"virtual_transport = lmtp:unix:private/dovecot-lmtp"
{
exec
(
"postconf -e 'virtual_transport = lmtp:unix:private/dovecot-lmtp'"
);
exec
(
'postfix reload'
);
$app
->
system
->
replaceLine
(
"/etc/dovecot/dovecot.conf"
,
"protocols = imap pop3"
,
"protocols = imap pop3 lmtp"
);
exec
(
$conf
[
'init_scripts'
]
.
'/'
.
'dovecot restart'
);
}
}
else
{
// If dovecot switch to dovecot
if
(
$out
[
0
]
!=
"virtual_transport = dovecot"
{
exec
(
"postconf -e 'virtual_transport = dovecot'"
);
exec
(
'postfix reload'
);
$app
->
system
->
replaceLine
(
"/etc/dovecot/dovecot.conf"
,
"protocols = imap pop3 lmtp"
,
"protocols = imap pop3"
);
exec
(
$conf
[
'init_scripts'
]
.
'/'
.
'dovecot restart'
);
}
}
exec
(
"postconf -e 'mailbox_size_limit = "
.
intval
(
$mail_config
[
'mailbox_size_limit'
]
*
1024
*
1024
)
.
"'"
);
exec
(
"postconf -e 'message_size_limit = "
.
intval
(
$mail_config
[
'message_size_limit'
]
*
1024
*
1024
)
.
"'"
);
exec
(
"postconf -e 'mailbox_size_limit = "
.
intval
(
$mail_config
[
'mailbox_size_limit'
]
*
1024
*
1024
)
.
"'"
);
//TODO : no reload?
exec
(
"postconf -e 'message_size_limit = "
.
intval
(
$mail_config
[
'message_size_limit'
]
*
1024
*
1024
)
.
"'"
);
//TODO : no reload?
}
...
...
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