Commit 8b23f827 authored by Florian Schaal's avatar Florian Schaal

moved dovecot-lmtpd from install/update to server-plugin to prevented...

moved dovecot-lmtpd from install/update to server-plugin to prevented dovecot-errors when using dovecot without dovecot-lmtpd
parent 66885975
......@@ -35,6 +35,8 @@ class installer extends installer_base {
global $conf;
$virtual_transport = 'dovecot';
$configure_lmtp = false;
// check if virtual_transport must be changed
if ($this->is_update) {
......@@ -44,6 +46,7 @@ class installer extends installer_base {
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
$configure_lmtp = true;
}
}
......@@ -114,7 +117,10 @@ class installer extends installer_base {
}
}
//* dovecot-lmtpd
if($configure_lmtp) {
replaceLine($config_dir.'/'.$configfile, 'protocols = imap pop3', 'protocols = imap pop3 lmtp', 1, 0);
}
//* dovecot-sql.conf
$configfile = 'dovecot-sql.conf';
......
......@@ -334,6 +334,8 @@ class installer_dist extends installer_base {
global $conf;
$virtual_transport = 'dovecot';
$configure_lmtp = false;
// check if virtual_transport must be changed
if ($this->is_update) {
......@@ -343,6 +345,7 @@ class installer_dist extends installer_base {
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
$configure_lmtp = true;
}
}
......@@ -415,6 +418,11 @@ class installer_dist extends installer_base {
}
}
//* dovecot-lmtpd
if($configure_lmtp) {
replaceLine($config_dir.'/'.$configfile, 'protocols = imap pop3', 'protocols = imap pop3 lmtp', 1, 0);
}
//* dovecot-sql.conf
$configfile = 'dovecot-sql.conf';
if(is_file("$config_dir/$configfile")){
......
......@@ -255,6 +255,8 @@ class installer extends installer_base
global $conf;
$virtual_transport = 'dovecot';
$configure_lmtp = false;
// check if virtual_transport must be changed
if ($this->is_update) {
......@@ -264,6 +266,7 @@ class installer extends installer_base
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
$configure_lmtp = true;
}
}
......@@ -312,6 +315,11 @@ class installer extends installer_base
$content = $this->get_template_file('dovecot.conf', true);
$this->write_config_file($configfile, $content);
//* dovecot-lmtpd
if($configure_lmtp) {
replaceLine($config_dir.'/'.$configfile, 'protocols = imap pop3', 'protocols = imap pop3 lmtp', 1, 0);
}
//* dovecot-sql.conf
$configfile = $config_dir.'/dovecot-sql.conf';
$content = $this->get_template_file('debian_dovecot-sql.conf', true, true);
......
......@@ -342,6 +342,8 @@ class installer_dist extends installer_base {
global $conf;
$virtual_transport = 'dovecot';
$configure_lmtp = false;
// check if virtual_transport must be changed
if ($this->is_update) {
......@@ -351,6 +353,7 @@ class installer_dist extends installer_base {
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
$configure_lmtp = true;
}
}
......@@ -419,6 +422,11 @@ class installer_dist extends installer_base {
}
}
//* dovecot-lmtpd
if($configure_lmtp) {
replaceLine($config_dir.'/'.$configfile, 'protocols = imap pop3', 'protocols = imap pop3 lmtp', 1, 0);
}
//* dovecot-sql.conf
$configfile = 'dovecot-sql.conf';
if(is_file("$config_dir/$configfile")){
......
......@@ -999,6 +999,8 @@ class installer_base {
global $conf;
$virtual_transport = 'dovecot';
$configure_lmtp = false;
// check if virtual_transport must be changed
if ($this->is_update) {
......@@ -1008,6 +1010,7 @@ class installer_base {
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
$configure_lmtp = true;
}
}
......@@ -1078,6 +1081,11 @@ class installer_base {
}
}
//* dovecot-lmtpd
if($configure_lmtp) {
replaceLine($config_dir.'/'.$configfile, 'protocols = imap pop3', 'protocols = imap pop3 lmtp', 1, 0);
}
//* dovecot-sql.conf
$configfile = 'dovecot-sql.conf';
if(is_file($config_dir.'/'.$configfile)) {
......
listen = *,[::]
protocols = imap pop3 lmtp
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
......@@ -61,4 +61,4 @@ protocol lda {
protocol lmtp {
postmaster_address = webmaster@localhost
mail_plugins = quota sieve
}
\ No newline at end of file
}
listen = *,[::]
protocols = imap pop3 lmtp
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
......@@ -62,4 +62,4 @@ protocol lda {
protocol lmtp {
postmaster_address = webmaster@localhost
mail_plugins = quota sieve
}
\ No newline at end of file
}
listen = *,[::]
protocols = imap pop3 lmtp
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
......
listen = *,[::]
protocols = imap pop3 lmtp
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
......@@ -59,4 +59,4 @@ protocol lda {
protocol lmtp {
postmaster_address = webmaster@localhost
mail_plugins = quota sieve
}
\ No newline at end of file
}
......@@ -166,6 +166,8 @@ class postfix_server_plugin {
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 {
......@@ -173,8 +175,11 @@ class postfix_server_plugin {
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');
}
}
print_r($mail_config);
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)."'");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment