Search Folder Mail / Search All
It would be nice to have an option to search in more than one only IMAP connected Mailbox.
Agreed, technically its complicated and performance will be an issue when having lots of mailboxes. We'll look into this when refactoring the mail module.
Would also be nice to reduce the amount of clicks to search in all folders, from 4 to 0 (remember the configuration)
Perhaps some kind of workaround could be a virtual all folder in dovecot automatically generated for all users.
Tried this with these two docs https://doc.dovecot.org/configuration_manual/virtual_plugin/ Seems that ox have the virtual/all folder integrated in the webclient. https://documentation.open-xchange.com/7.8.2/middleware/components/search/crossfolder_fts_in_mail.html
The virtual folder looks promising. Did that work out for you?
Kind of, have to do some more testing with dovecot.
But first need to setup a test machine, can't do this on production ;-) Have a busy week so this might take some time. Will report back.
Hows the current state on this? Currently I will switch from OX to groupoffice but the unified mail inbox and the search within this inbox is one of my mostly used features. I have a lot of mail addresses and currently finding a specific mail is in groupoffice a real pain.
Hi,
It's not a Group-Office feature at the moment. But the IMAP server dovecot can make it work by implementing that virtual folder. If you run dovecot you can set this up. See:
https://doc.dovecot.org/configuration_manual/virtual_plugin/
Got it running with the following config and tools for fulltextsearch (Ubuntu 22.04 LTS) Xapian Search Engine and fts-xapian plugin for dovecot (https://github.com/grosjo/fts-xapian).
Be carefull when changing the config files, those are the settings that worked on our installations.
Fulltext search engine
Install packages
apt-get install dovecot-dev libxapian30 dovecot-fts-xapian
Configuration of dovecot
/etc/dovecot/99-groupoffice.conf
mail_plugins = (...) fts fts_xapian
plugin {
fts = xapian fts_xapian = partial=2 full=20 attachments=0 verbose=0
fts_autoindex = yes fts_enforced = yes
fts_autoindex_exclude = \\Trash
}
service indexer-worker {
#Increase vsz_limit to 2GB or above.
#Or 0 if you have rather large memory usable on your server, which is preferred for performance)
vsz_limit = 2G
process_limit = 0
}
}
Restart dovecot.
Reindex all mailboxes with
doveadm index -A -q \*
Virtual All folder Add an virtual all folder, for showing all messages regardless of folders etc.
Create an folder for all users with the settings for the All folder
mkdir -p /var/mail/virtual/Allchown vmail:vmail -R /var/mail/virtual/All- create an file /var/mail/virtual/All/dovecot-virtual with the following content
*
-INBOX/Trash
-INBOX/Trash/*
-INBOX/Spam
-INBOX/Spam/*
all
This will show all mails except those in Trash or Spam, be carefull to add a whitespace before the last all
Configuration of dovecot /etc/dovecot/99-groupoffice.conf
- Add
virtualto mail_plugins - uncomment the lines
mailbox virtual/All {
special_use = \All
}
- Insert the following lines
prefix = virtual/
separator = /
hidden = no
list = yes
subscriptions = no
location = virtual:/var/mail/virtual:INDEX=/var/mail/vhosts/%d/%n/virtual
}
This will add the virtual/all folder to every user and show all emails in their folders.
Nice! Got to get that into the main package.
One thing I encountered today is the following:
- We have an user who uses multiple email mailboxes on different servers. Now our server supports fulltextsearch on our imap server, but on the other mailboxses there is no server-side search on their imap server.
- It would be nice if the mail client in groupoffice could remember the last search option per mailbox or put it back to the default "all fields". Otherwise switching between mailboxes keeps timeouting the client because GO always switches back to search the "whole message"
I've made some progress on implementing this in the groupoffice-mailserver package. I made some changes to your example:
- I've hidden the "virtual/All" folder. When a user chooses to search all folders it will use this folder automatically server side.
- To make the above easier I added the folder option to the submenu:
- I removed the "Full message" option from the menu above. Instead I determine server side to use the FTS when the imap server supports it. I've made this by adding a custom IMAP capability flag "XFTS" when it's enabled. If the flag is enabled or the config.php option "email_allow_body_search" is true then it will use FTS. Otherwise it will use a header search for from, subject, to and cc. This way the user doesn't have to care about choosing "All fields" or "Full message".
- FTS can be enabled per user in the postfixadmin GUI.
In case you're interested in the configuration you can find that here:
https://github.com/Intermesh/docker-groupoffice-mailserver/tree/master/etc/dovecot
All this nice stuff will be available in the next 6.8 release. Thanks for posting your wonderful example.
Best regards, Merijn
Very good solution for the users.
Will try to test it on the weekend on my second server.