Commit 812da3d9 authored by Florian Schaal's avatar Florian Schaal
Browse files

dovecot2 - enable iterate_query

parent c878bd41
......@@ -461,6 +461,10 @@ class installer_dist extends installer_base {
$content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content);
$content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content);
$content = str_replace('{server_id}', $conf['server_id'], $content);
# enable iteratq_query for dovecot2
if(version_compare($dovecot_version,2, '>=')) {
$content = str_replace('# iterate_query', 'iterate_query', $content);
}
wf("$config_dir/$configfile", $content);
exec("chmod 600 $config_dir/$configfile");
......
......@@ -341,6 +341,10 @@ class installer extends installer_base
//* dovecot-sql.conf
$configfile = $config_dir.'/dovecot-sql.conf';
$content = $this->get_template_file('debian_dovecot-sql.conf', true, true);
# enable iteratq_query for dovecot2
if(version_compare($dovecot_version,2, '>=')) {
$content = str_replace('# iterate_query', 'iterate_query', $content);
}
$this->write_config_file($configfile, $content);
}
......
......@@ -471,6 +471,10 @@ class installer_dist extends installer_base {
$content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content);
$content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content);
$content = str_replace('{server_id}', $conf['server_id'], $content);
# enable iteratq_query for dovecot2
if(version_compare($dovecot_version,2, '>=')) {
$content = str_replace('# iterate_query', 'iterate_query', $content);
}
wf("$config_dir/$configfile", $content);
exec("chmod 600 $config_dir/$configfile");
......
......@@ -1277,6 +1277,10 @@ class installer_base {
$content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content);
$content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content);
$content = str_replace('{server_id}', $conf['server_id'], $content);
# enable iteratq_query for dovecot2
if(version_compare($dovecot_version,2, '>=')) {
$content = str_replace('# iterate_query', 'iterate_query', $content);
}
wf($config_dir.'/'.$configfile, $content);
chmod($config_dir.'/'.$configfile, 0600);
......
......@@ -19,4 +19,4 @@ user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':',
# The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
# Do not enable it on Dovecot 1.x servers
# iterate_query = SELECT email as user FROM mail_user
# iterate_query = SELECT email as user FROM mail_user WHERE server_id = '{server_id}'
......@@ -126,5 +126,5 @@ user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':',
# The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
# Do not enable it on Dovecot 1.x servers
# iterate_query = SELECT email as user FROM mail_user
# iterate_query = SELECT email as user FROM mail_user WHERE server_id = '{server_id}'
......@@ -63,3 +63,4 @@ protocol lmtp {
postmaster_address = webmaster@localhost
mail_plugins = quota sieve
}
mail_plugins = $mail_plugins quota
......@@ -139,4 +139,4 @@ user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':',
# The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
# Do not enable it on Dovecot 1.x servers
# iterate_query = SELECT email as user FROM mail_user
\ No newline at end of file
# iterate_query = SELECT email as user FROM mail_user WHERE server_id = '{server_id}'
......@@ -61,3 +61,4 @@ protocol lmtp {
postmaster_address = webmaster@localhost
mail_plugins = quota sieve
}
mail_plugins = $mail_plugins quota
......@@ -139,4 +139,4 @@ user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':',
# The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
# Do not enable it on Dovecot 1.x servers
# iterate_query = SELECT email as user FROM mail_user
# iterate_query = SELECT email as user FROM mail_user WHERE server_id = '{server_id}'
......@@ -60,3 +60,4 @@ protocol lmtp {
postmaster_address = webmaster@localhost
mail_plugins = quota sieve
}
mail_plugins = $mail_plugins quota
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