Skip to content
Snippets Groups Projects
Commit 52bbc896 authored by Florian Schaal's avatar Florian Schaal
Browse files

postfix server-plugin (check your changes before restarting postfix)

parent f8bc88f0
No related branches found
No related tags found
No related merge requests found
...@@ -161,27 +161,29 @@ class postfix_server_plugin { ...@@ -161,27 +161,29 @@ class postfix_server_plugin {
exec('postfix reload'); exec('postfix reload');
} }
if ($mail_config["mailbox_virtual_uidgid_maps"] == 'y') { if($app->system->is_installed('dovecot')) {
// If dovecot switch to lmtp if ($mail_config["mailbox_virtual_uidgid_maps"] == 'y') {
if($app->system->is_installed('dovecot')) { $temp = exec("postconf -n virtual_transport", $out);
exec("postconf -e 'virtual_transport = lmtp:unix:private/dovecot-lmtp'"); // If dovecot switch to lmtp
exec('postfix reload'); if($out[0] != "virtual_transport = lmtp:unix:private/dovecot-lmtp" {
$app->system->replaceLine("/etc/dovecot/dovecot.conf", "protocols = imap pop3", "protocols = imap pop3 lmtp"); exec("postconf -e 'virtual_transport = lmtp:unix:private/dovecot-lmtp'");
exec($conf['init_scripts'] . '/' . 'dovecot restart'); 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 } else {
if($app->system->is_installed('dovecot')) { // If dovecot switch to dovecot
exec("postconf -e 'virtual_transport = dovecot'"); if($out[0] != "virtual_transport = dovecot" {
exec('postfix reload'); exec("postconf -e 'virtual_transport = dovecot'");
$app->system->replaceLine("/etc/dovecot/dovecot.conf", "protocols = imap pop3 lmtp", "protocols = imap pop3"); exec('postfix reload');
exec($conf['init_scripts'] . '/' . 'dovecot restart'); $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 '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)."'"); exec("postconf -e 'message_size_limit = ".intval($mail_config['message_size_limit']*1024*1024)."'"); //TODO : no reload?
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment