From 4fd6d02c1dd3a33bf7748cbd7cfe21f3d7bf250c Mon Sep 17 00:00:00 2001 From: Jesse Norell Date: Thu, 8 Oct 2020 17:34:46 -0600 Subject: [PATCH 1/2] fix stray mail_plugins line in dovecot.conf --- install/tpl/debian6_dovecot2.conf.master | 2 +- install/tpl/debian_dovecot2.conf.master | 4 ++-- install/tpl/fedora_dovecot2.conf.master | 4 +--- install/tpl/opensuse_dovecot2.conf.master | 4 +--- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master index a27728ef69..f933463b0b 100644 --- a/install/tpl/debian6_dovecot2.conf.master +++ b/install/tpl/debian6_dovecot2.conf.master @@ -88,7 +88,7 @@ protocol lmtp { #2.3+ group = vmail #2.3+ mode = 0660 #2.3+ } -#2.3+ +#2.3+ #2.3+ unix_listener stats-writer { #2.3+ user = vmail #2.3+ group = vmail diff --git a/install/tpl/debian_dovecot2.conf.master b/install/tpl/debian_dovecot2.conf.master index 524291c5d8..4a44bfbfc6 100644 --- a/install/tpl/debian_dovecot2.conf.master +++ b/install/tpl/debian_dovecot2.conf.master @@ -12,7 +12,7 @@ ssl_min_protocol = TLSv1.2 ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 ssl_prefer_server_ciphers = no mail_max_userip_connections = 100 -mail_plugins = $mail_plugins quota +mail_plugins = quota passdb { args = /etc/dovecot/dovecot-sql.conf driver = sql @@ -86,7 +86,7 @@ protocol lmtp { #2.3+ group = vmail #2.3+ mode = 0660 #2.3+ } -#2.3+ +#2.3+ #2.3+ unix_listener stats-writer { #2.3+ user = vmail #2.3+ group = vmail diff --git a/install/tpl/fedora_dovecot2.conf.master b/install/tpl/fedora_dovecot2.conf.master index e62fd7289a..a217e28d99 100644 --- a/install/tpl/fedora_dovecot2.conf.master +++ b/install/tpl/fedora_dovecot2.conf.master @@ -76,15 +76,13 @@ protocol lmtp { mail_plugins = quota sieve } -mail_plugins = $mail_plugins quota - #2.3+ service stats { #2.3+ unix_listener stats-reader { #2.3+ user = vmail #2.3+ group = vmail #2.3+ mode = 0660 #2.3+ } -#2.3+ +#2.3+ #2.3+ unix_listener stats-writer { #2.3+ user = vmail #2.3+ group = vmail diff --git a/install/tpl/opensuse_dovecot2.conf.master b/install/tpl/opensuse_dovecot2.conf.master index f7a78c34f2..7dc715ef69 100644 --- a/install/tpl/opensuse_dovecot2.conf.master +++ b/install/tpl/opensuse_dovecot2.conf.master @@ -75,15 +75,13 @@ protocol lmtp { mail_plugins = quota sieve } -mail_plugins = $mail_plugins quota - #2.3+ service stats { #2.3+ unix_listener stats-reader { #2.3+ user = vmail #2.3+ group = vmail #2.3+ mode = 0660 #2.3+ } -#2.3+ +#2.3+ #2.3+ unix_listener stats-writer { #2.3+ user = vmail #2.3+ group = vmail -- GitLab From bb4fc7f7589ed13f91f3a599aa462b87fc5456bc Mon Sep 17 00:00:00 2001 From: Jesse Norell Date: Thu, 8 Oct 2020 17:54:52 -0600 Subject: [PATCH 2/2] check for centos8 dovecot file paths --- install/dist/lib/debian60.lib.php | 4 ++-- install/dist/lib/fedora.lib.php | 5 +++++ install/lib/installer_base.lib.php | 4 ++-- server/plugins-available/postfix_server_plugin.inc.php | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php index a8e90f189b..154c6b99c4 100644 --- a/install/dist/lib/debian60.lib.php +++ b/install/dist/lib/debian60.lib.php @@ -39,7 +39,7 @@ class installer extends installer_base { $configure_lmtp = false; // use lmtp if installed - if($configure_lmtp = is_file('/usr/lib/dovecot/lmtp')) { + if($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) { $virtual_transport = 'lmtp:unix:private/dovecot-lmtp'; } @@ -168,7 +168,7 @@ class installer extends installer_base { } //* dovecot-managesieved - if(is_file('/usr/lib/dovecot/managesieve')) { + if(is_file('/usr/lib/dovecot/managesieve') || is_file('/usr/libexec/dovecot/managesieve')) { $dovecot_protocols .= ' sieve'; } diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 2d31b89bbd..095e99eeae 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -381,6 +381,11 @@ class installer_dist extends installer_base { $configure_lmtp = false; + // use lmtp if installed + if($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) { + $virtual_transport = 'lmtp:unix:private/dovecot-lmtp'; + } + // check if virtual_transport must be changed if ($this->is_update) { $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index c82fd16537..f36997c877 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1418,7 +1418,7 @@ class installer_base { $configure_lmtp = false; // use lmtp if installed - if($configure_lmtp = is_file('/usr/lib/dovecot/lmtp')) { + if($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) { $virtual_transport = 'lmtp:unix:private/dovecot-lmtp'; } @@ -1577,7 +1577,7 @@ class installer_base { } //* dovecot-managesieved - if(is_file('/usr/lib/dovecot/managesieve')) { + if(is_file('/usr/lib/dovecot/managesieve') || is_file('/usr/libexec/dovecot/managesieve')) { $dovecot_protocols .= ' sieve'; } diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php index cf73cf93e7..21a6a404ea 100644 --- a/server/plugins-available/postfix_server_plugin.inc.php +++ b/server/plugins-available/postfix_server_plugin.inc.php @@ -288,7 +288,7 @@ class postfix_server_plugin { $dovecot_protocols = 'imap pop3'; //* dovecot-lmtpd - if( ($configure_lmtp = is_file('/usr/lib/dovecot/lmtp')) || + if( ($configure_lmtp = (is_file('/usr/lib/dovecot/lmtp') || is_file('/usr/libexec/dovecot/lmtp'))) || ($mail_config["mailbox_virtual_uidgid_maps"] == 'y') ) { $virtual_transport = 'lmtp:unix:private/dovecot-lmtp'; @@ -296,7 +296,7 @@ class postfix_server_plugin { } //* dovecot-managesieved - if(is_file('/usr/lib/dovecot/managesieve')) { + if(is_file('/usr/lib/dovecot/managesieve') || is_file('/usr/libexec/dovecot/managesieve')) { $dovecot_protocols .= ' sieve'; } -- GitLab