Commit 374226ae authored by Marius Cramer's avatar Marius Cramer

Merge branch 'master' into 'master'

Master

See merge request !208
parents c755f813 401e1451
......@@ -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
}
......@@ -53,8 +53,8 @@ class cronjob_purge_mailboxes extends cronjob {
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){
......
......@@ -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,6 +175,8 @@ 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');
}
}
......
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