Marius Cramer
2015-07-08 374226ae8d8c90954df425fc029b10f4e05d709e
Merge branch 'master' into 'master'

Master

See merge request !208
11 files modified
62 ■■■■ changed files
install/dist/lib/debian60.lib.php 8 ●●●● patch | view | raw | blame | history
install/dist/lib/fedora.lib.php 8 ●●●●● patch | view | raw | blame | history
install/dist/lib/gentoo.lib.php 8 ●●●●● patch | view | raw | blame | history
install/dist/lib/opensuse.lib.php 8 ●●●●● patch | view | raw | blame | history
install/lib/installer_base.lib.php 8 ●●●●● patch | view | raw | blame | history
install/tpl/debian6_dovecot2.conf.master 4 ●●●● patch | view | raw | blame | history
install/tpl/debian_dovecot2.conf.master 4 ●●●● patch | view | raw | blame | history
install/tpl/fedora_dovecot2.conf.master 2 ●●● patch | view | raw | blame | history
install/tpl/opensuse_dovecot2.conf.master 4 ●●●● patch | view | raw | blame | history
server/lib/classes/cron.d/600-purge_mailboxes.inc.php 4 ●●●● patch | view | raw | blame | history
server/plugins-available/postfix_server_plugin.inc.php 4 ●●●● patch | view | raw | blame | history
install/dist/lib/debian60.lib.php
@@ -35,6 +35,8 @@
        global $conf;
        
        $virtual_transport = 'dovecot';
        $configure_lmtp = false;
        
        // check if virtual_transport must be changed
        if ($this->is_update) {
@@ -44,6 +46,7 @@
            
            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 @@
            }
        }
        
        //* 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';
install/dist/lib/fedora.lib.php
@@ -334,6 +334,8 @@
        global $conf;
        $virtual_transport = 'dovecot';
        $configure_lmtp = false;
        
        // check if virtual_transport must be changed
        if ($this->is_update) {
@@ -343,6 +345,7 @@
            
            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 @@
            }
        }
        //* 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")){
install/dist/lib/gentoo.lib.php
@@ -255,6 +255,8 @@
        global $conf;
        $virtual_transport = 'dovecot';
        $configure_lmtp = false;
        
        // check if virtual_transport must be changed
        if ($this->is_update) {
@@ -264,6 +266,7 @@
            
            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 @@
        $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);
install/dist/lib/opensuse.lib.php
@@ -342,6 +342,8 @@
        global $conf;
        $virtual_transport = 'dovecot';
        $configure_lmtp = false;
        
        // check if virtual_transport must be changed
        if ($this->is_update) {
@@ -351,6 +353,7 @@
            
            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 @@
            }
        }
        //* 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")){
install/lib/installer_base.lib.php
@@ -999,6 +999,8 @@
        global $conf;
        
        $virtual_transport = 'dovecot';
        $configure_lmtp = false;
        
        // check if virtual_transport must be changed
        if ($this->is_update) {
@@ -1008,6 +1010,7 @@
            
            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 @@
            }
        }
        //* 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)) {
install/tpl/debian6_dovecot2.conf.master
@@ -1,5 +1,5 @@
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 lmtp {
  postmaster_address = webmaster@localhost
  mail_plugins = quota sieve
}
}
install/tpl/debian_dovecot2.conf.master
@@ -1,5 +1,5 @@
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 lmtp {
  postmaster_address = webmaster@localhost
  mail_plugins = quota sieve
}
}
install/tpl/fedora_dovecot2.conf.master
@@ -1,5 +1,5 @@
listen = *,[::]
protocols = imap pop3 lmtp
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
install/tpl/opensuse_dovecot2.conf.master
@@ -1,5 +1,5 @@
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 lmtp {
  postmaster_address = webmaster@localhost
  mail_plugins = quota sieve
}
}
server/lib/classes/cron.d/600-purge_mailboxes.inc.php
@@ -53,8 +53,8 @@
    public function onRunJob() {
        global $app, $conf;
        $sql = "SELECT email FROM mail_user WHERE maildir_format = 'mdbox' AND server_id = ".$server_id;
        $records = $app->db->queryAllRecords($sql);
        $sql = "SELECT email FROM mail_user WHERE maildir_format = 'mdbox' AND server_id = ?";
        $records = $app->db->queryAllRecords($sql, $server_id);
        
        if(is_array($records)) {
            foreach($records as $rec){
server/plugins-available/postfix_server_plugin.inc.php
@@ -166,6 +166,8 @@
            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,6 +175,8 @@
            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');
            }
        }