megodin at inboxalias.com
2014-Jan-07 18:49 UTC
[Dovecot] BUG report: doveadm HEADER <field> <pattern> when concatenating with another Search key
Hey there, I'm pretty sure I've found a bug with doveadm when concatenating with another search key. While doveadm HEADER <field pattern> works fine when not using additional search keys, it doesn't work properly when concatenating with other serarch keys - it then simply seems to ignore the additional HEADER <field pattern> search key. It's reproduceable, also with different user accounts on 2 different productive systems. Testing it on latest dovecot-ee 2.2.9.2 and 2.2.5.5. I think it's best explained with showing some examples: doveadm search -u exampleuser SUBJECT Silvester (outputs correctly 10 matches) 5a09f50926daef51b50e000025ab05f8 1106 5a09f50926daef51b50e000025ab05f8 1107 5a09f50926daef51b50e000025ab05f8 1579 5a09f50926daef51b50e000025ab05f8 4092 5a09f50926daef51b50e000025ab05f8 5330 5a09f50926daef51b50e000025ab05f8 9773 5a09f50926daef51b50e000025ab05f8 11460 5a09f50926daef51b50e000025ab05f8 12718 5a09f50926daef51b50e000025ab05f8 15653 5a09f50926daef51b50e000025ab05f8 15697 doveadm search -u exampleuser SUBJECT Silvester HEADER Return-Path someuser at example.com (gives exactly the same output - but this is WRONG, as the given Subject AND Return-Path is really only found in 1 Message - uid 15697) 5a09f50926daef51b50e000025ab05f8 1106 5a09f50926daef51b50e000025ab05f8 1107 5a09f50926daef51b50e000025ab05f8 1579 5a09f50926daef51b50e000025ab05f8 4092 5a09f50926daef51b50e000025ab05f8 5330 5a09f50926daef51b50e000025ab05f8 9773 5a09f50926daef51b50e000025ab05f8 11460 5a09f50926daef51b50e000025ab05f8 12718 5a09f50926daef51b50e000025ab05f8 15653 5a09f50926daef51b50e000025ab05f8 15697 doveadm search -u exampleuser HEADER Return-Path someuser at example.com (showing that Return-Path as standalone search key is working fine - note that message uid 15697 with subject "Silvester" is also found of course. I manually checked all Mails showing up here, they all contained the Return-Path "someuser at example.com" as they should): 5a09f50926daef51b50e000025ab05f8 14080 5a09f50926daef51b50e000025ab05f8 14814 5a09f50926daef51b50e000025ab05f8 14815 5a09f50926daef51b50e000025ab05f8 14820 5a09f50926daef51b50e000025ab05f8 14825 5a09f50926daef51b50e000025ab05f8 14830 5a09f50926daef51b50e000025ab05f8 14832 5a09f50926daef51b50e000025ab05f8 14833 5a09f50926daef51b50e000025ab05f8 15427 5a09f50926daef51b50e000025ab05f8 15428 5a09f50926daef51b50e000025ab05f8 15430 5a09f50926daef51b50e000025ab05f8 15431 5a09f50926daef51b50e000025ab05f8 15697 Further testing with: doveadm search -u exampleuser HEADER Return-Path completegarbageforsurenotinheaders (Correctly no output was given.) doveadm search -u exampleuser SUBJECT Silvester HEADER Return-Path completegarbageforsurenotinheaders (again ignoring the additional HEADER and showing all uids which just match the SUBJECT) 5a09f50926daef51b50e000025ab05f8 1106 5a09f50926daef51b50e000025ab05f8 1107 5a09f50926daef51b50e000025ab05f8 1579 5a09f50926daef51b50e000025ab05f8 4092 5a09f50926daef51b50e000025ab05f8 5330 5a09f50926daef51b50e000025ab05f8 9773 5a09f50926daef51b50e000025ab05f8 11460 5a09f50926daef51b50e000025ab05f8 12718 5a09f50926daef51b50e000025ab05f8 15653 5a09f50926daef51b50e000025ab05f8 15697 Moreove, when playing with HEADER Reply-To it shows some strange behaviour, note the differences with the ":" : doveadm search -u exampleuser SUBJECT blubbs HEADER Reply-to kacke at example.com f64cf50926daef51b50e000025ab05f8 2231 f64cf50926daef51b50e000025ab05f8 2781 5a09f50926daef51b50e000025ab05f8 13620 5a09f50926daef51b50e000025ab05f8 15763 doveadm search -u exampleuser SUBJECT blubbs HEADER Reply-to: kacke at example.com f64cf50926daef51b50e000025ab05f8 2231 5a09f50926daef51b50e000025ab05f8 13620 Can you please have a look at this and fix it? Thanks in advance, Megodin -- mailstorage @ NFS with nfsvers=3 (NetApp) # 2.2.5.5 (e5350245ad9b): /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-358.23.2.el6.x86_64 x86_64 Red Hat Enterprise Linux Server release 6.4 (Santiago) nfs import_environment = TZ DEBUG_OUTOFMEM DOVECOT_HOSTDOMAIN # 2.2.9.2 (8d71ef248a6e): /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-358.23.2.el6.x86_64 x86_64 CentOS release 6.5 (Final) nfs _________________________________________________________________ Send and receive anonymous emails to your inbox with InboxAlias. http://www.inboxalias.com
Timo Sirainen
2014-May-07 16:39 UTC
[Dovecot] BUG report: doveadm HEADER <field> <pattern> when concatenating with another Search key
On 7.1.2014, at 20.49, megodin at inboxalias.com wrote:> I'm pretty sure I've found a bug with doveadm when concatenating with > another search key. > > While doveadm HEADER <field pattern> works fine when not using additional > search keys, it doesn't work properly when concatenating with other > serarch keys - it then simply seems to ignore the additional HEADER <field > pattern> search key. > > It's reproduceable, also with different user accounts on 2 different > productive systems. Testing it on latest dovecot-ee 2.2.9.2 and 2.2.5.5.Finally fixed, happened only with fts-lucene: http://hg.dovecot.org/dovecot-2.2/rev/4b67da0b86a3