mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-12-13 09:56:01 +00:00
dovecot: replace solr fts with flatcurve (xapian) (#5680)
* fts-flatcurve: inital implementation * fts: removed solr from compose.yml * flatcurve: added heap and proc logic to dovecot * added logic for update.sh & generate for Flatcurve * delete old iteration of fts-flatcurve.conf * updated default fts.conf * updated .gitignore to exclude fts.conf for further git updates * Remove autogeneration of fts.conf (disable override) * cleanup all left solr stuff * renamed SKIP_FLATCURVE to SKIP_FTS * cleanup leftovers solr in lang files * moved lazy_expunge plugin only to mail_plugins * added fts timeout value * compose: remove dev image of dovecot * updated japanese translation
This commit is contained in:
@@ -5434,25 +5434,6 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
'msg' => 'Could not move maildir to garbage collector: variables local_part and/or domain empty'
|
||||
);
|
||||
}
|
||||
if (strtolower(getenv('SKIP_SOLR')) == 'n' && strtolower(getenv('FLATCURVE_EXPERIMENTAL')) != 'y') {
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, 'http://solr:8983/solr/dovecot-fts/update?commit=true');
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER,array('Content-Type: text/xml'));
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, '<delete><query>user:' . $username . '</query></delete>');
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
|
||||
$response = curl_exec($curl);
|
||||
if ($response === false) {
|
||||
$err = curl_error($curl);
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'warning',
|
||||
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||
'msg' => 'Could not remove Solr index: ' . print_r($err, true)
|
||||
);
|
||||
}
|
||||
curl_close($curl);
|
||||
}
|
||||
$stmt = $pdo->prepare("DELETE FROM `alias` WHERE `goto` = :username");
|
||||
$stmt->execute(array(
|
||||
':username' => $username
|
||||
|
||||
Reference in New Issue
Block a user