Re: Inaccurate results while searching for a phrase in subject (fts-flatcurve)

2023-05-25 Thread Michael Slusarz via dovecot
See below.

> On 05/23/2023 2:14 AM MDT s...@fea.st wrote:
> 
> I had been using the lucene FTS plugin since a decade now and it has done me 
> well. Thought of upgrading to the new & current stuff and came across the 
> flatcurve plugin which seems very promising (xapian on the other hand was 
> creating indexes larger than my mailboxes themselves). I am using following 
> configuration in dovecot.conf:
> 
> fts = flatcurve
> fts_filters_en = lowercase english-possessive stopwords
> fts_languages = en
> fts_tokenizers = generic email-address

^^^ FTS input is being tokenized, so the phrase "/home/johndoe/render.php" will 
be indexed not as a full string but instead separately as "home", "johndoe", 
"render", and "php".

See: 
https://doc.dovecot.org/settings/plugin/fts-plugin/#plugin_setting-fts-fts_tokenizers

This has nothing to do with flatcurve (or any FTS driver) - Dovecot will never 
send the full "/home/johndoe/render.php" to the driver to be indexed.


> fts_autoindex = no
> fts_enforced = yes
> 
> A search command like this:
> 
> doveadm -D search -u j...@doe.com mailbox INBOX SUBJECT 
> "/home/johndoe/render.php"
> 
> should show the messages with subject: "CRON: /home/johndoe/render.php OK" 
> but produces a lot of extra undesired results and I think the second line in 
> this debug output indicates the reason:
> 
> May 23 07:44:13 doveadm(j...@doe.com): Debug: fts-flatcurve(INBOX): Query 
> (hdr_subject:/home/johndoe/render.php*) matches=0 uids=

This is correct, since "/home/johndoe/render.php" was not indexed so there 
should be zero results.


> May 23 07:44:13 doveadm(j...@doe.com): Debug: fts-flatcurve(INBOX): Query 
> (hdr_subject:php* AND hdr_subject:render* AND hdr_subject:johndoe* AND 
> hdr_subject:home*) matches=272 

And this is also correct, as the search phrase is attempted by searching both 
its full string and also all of its tokenized components.  (Both the original 
text and all search terms are processed through the tokenizer before passing to 
a FTS driver.)


> I tried rebuilding the indexes with "fts_flatcurve_substring_search = yes" 
> too but that didn't change anything. It works as expected with lucene plugin 
> because in that case header search is performed via dovecot indexes instead 
> of FTS. May be I am not doing something right in configuring this new FTS? 

I'm not a lucene expert... but with the old lucene plugin, you were almost 
certainly using it without Dovecot tokenization support, since the plugin 
predates it (I think) - using Dovecot tokenization would have required 
'use_libfts' to be present in the fts_lucene setting (which I doubt was ever 
documented).  I believe Dovecot was just doing simple white-space tokenization 
instead, so lucene code/library was likely receiving the full string and doing 
internal tokenization.

michael
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: bug report: fd-util.c: line 102 (fd_set_nonblock): assertion failed: (fd > -1)

2023-05-25 Thread Aki Tuomi via dovecot


> On 24/05/2023 17:23 EEST Moritz Orbach via dovecot  
> wrote:
> 
>  
> Hi Aki,
> 
> I'm willing to spend some time on this. Is there something more I could
> do to help find the cause? 
> 
> Best regards,
> Moritz
> 
> -- 

I would need some way to reproduce this, as the crash happens way too late. I 
can try looking around the core file next week to see if it gives any good 
insight.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: configuring Dovecot submission service

2023-05-25 Thread Aki Tuomi via dovecot


> On 25/05/2023 02:01 EEST Computerisms Corporation  
> wrote:
> 
>  
> Hi Dovecot Gurus,
> 
> I have been playing around with the submission service.  I have managed 
> to get all the things working that I want working with two exceptions. 
> I have not found (or possibly I have overlooked) solutions in the 
> documentation or discussions on the 'net.
> 
> First; I would like to be able to authenticate against my backend MTA 
> using the user-supplied credentials.  I have tried setting 
> submission_relay_user as %u and submission_relay_password as %w, but 
> these seem to be passed through as literal strings, and of course my 
> backend MTA has no idea who %u is.
> 
> I found a post from 2019 that indicates passing the 
> submission_relay_user/password to the backend is not a supported 
> function, but hoping that maybe that is outdated info.
> 
> I also found:
> 
> https://doc.dovecot.org/3.0/configuration_manual/authentication/proxies/
> 
> Which seems to indicate it could pass credentials to a non-Dovecot MTA 
> backend, but I am not really clear from the docs on how to set that up, 
> and I did not find any relevant examples to work from.  Seems like it 
> would be setting up a Director service, maybe?  I have done that before 
> and I do manage multiple email servers, but none of them is clustered or 
> configured to be interoperable, so not sure if this is a viable approach.
> 
> Second; I am wondering about the possibility of having multiple 
> submission_relay_host entries.  For example if I have dovecot submission 
> services running on my standard port 587 and 465 connect to a relay on 
> the same box through localhost, but could I have another submission 
> service running on another port, say 5587, and relay all traffic 
> received on that port through a completely different host?
> 
> I am thinking I could set that up by running a separate instance of 
> dovecot for just that service, but maybe there is a more suitable way? 
> I don't have a solid use-case for this in mind at the moment, but given 
> that I do manage multiple email servers, I am thinking that if this is 
> possible it might provide some useful corner-case configurations down 
> the road.
> 
> Thank you for reading my post, any thoughts, information, or pointers to 
> relevant documentation would be most appreciated.
> 
> -- 
> Bob Miller
> 867-334-7117
> www.computerisms.ca

Hi!

Which version of Dovecot are you running? The /3.0/ documentation is for 
unreleased version of Dovecot.

Also, since you are already authenticating the user on the submission service, 
why not use submission xclient to pass the user etc. information to the backend 
MTA instead of re-authenticating the user?

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


subscriptions via master user

2023-05-25 Thread Przemysław Kwiatkowski via dovecot

Hello,

When I impersonate an regular user using master user (log in to 
Roundcube as "user*masteruser") - there are user's subscriptions 
missing. I can see all folders, but have to manually enable visibility 
in settings.


Is this normal? Can I fix it?


passdb {
  driver = passwd-file
  master = yes
  args = /filepath
  pass = yes
}

passdb {
  driver = passwd-file
  args = /filepath
}

userdb {
  driver = passwd-file
  args = /filepath
  default_fields = uid=vmail gid=vmail system_groups_user=vmail 
home=/srv/vmail/%d/%n master_user=%u

}


--
Przemyslaw Kwiatkowski


___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org