Re: [Dovecot] Doveadm search in public namespaces

2011-01-04 Thread Timo Sirainen
On Thu, 2010-12-30 at 14:13 +0100, Thomas Leuxner wrote:

  The mailbox GUID isn't generated until it's requested for the first
  time. Only dsync and doveadm request it.
 
 It gets rewritten on every search in my setup. As I did searches before it 
 should have a GUID, right?

Bug, fixed: http://hg.dovecot.org/dovecot-2.0/rev/af5903102d38



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Doveadm search in public namespaces

2010-12-30 Thread Thomas Leuxner
Am 30.12.2010 um 11:41 schrieb Timo Sirainen:

 On Sun, 2010-12-26 at 14:58 +0100, Thomas Leuxner wrote:
 
 Say I want to create a script to perform some 'doveadm' tasks. Is there any 
 particular reason why mailbox-guids would not work for public namespaces? 
 
 Fixed: http://hg.dovecot.org/dovecot-2.0/rev/15c32384817b

Did some tests with the fix, not sure it works correct/as expected:

$ time doveadm fetch -u u...@domain.tld hdr mailbox 
Public/Mailing-Lists/Dovecot uid 1039
real0m0.053s

$ time doveadm fetch -u u...@domain.tld hdr mailbox-guid 
adeffe1c8b7ba64bb377a998a2df uid 1039
real0m0.418s

It takes considerably longer when using 'mailbox-guid' compared to mailbox 
name, wonder why that is…

I'm also not sure why it would recursively mangle all 'dovecot-uidlist' files 
within the namespace (it does in a public maildir namespace). This is really 
dangerous when missing the proper -u parameter. Say you run it as 'root' and it 
should be run by 'vmail' really, then effectively all 'dovecot-uidlist' files 
will be owned by the wrong user afterwards… (root vs. vmail).

Regards
Thomas

PGP.sig
Description: Signierter Teil der Nachricht


Re: [Dovecot] Doveadm search in public namespaces

2010-12-30 Thread Timo Sirainen
On Thu, 2010-12-30 at 13:56 +0100, Thomas Leuxner wrote:
  It's because there is no easy way to access mailbox GUIDs, so it has to
  open each mailbox and get its GUID.
 
 Right. I wanted to use the GUIDs because they are spit out on searches. Guess 
 will have to use names then if faster.

Maybe some day mailbox list indexes are created and they offer fast
access to GUIDs.

  The mailbox GUID is stored in dovecot-uidlist file. If the mailbox
  doesn't already have a GUID, it's added there.
 
 So if the mailbox would have a current index it would not rebuild it? In 
 other words: Wouldn't the Dovecot Mailing-List be current as it gets updated 
 on every new post presumably? It was also rebuilt...

The mailbox GUID isn't generated until it's requested for the first
time. Only dsync and doveadm request it.



signature.asc
Description: This is a digitally signed message part


[Dovecot] Doveadm search in public namespaces

2010-12-26 Thread Thomas Leuxner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Say I want to create a script to perform some 'doveadm' tasks. Is there any 
particular reason why mailbox-guids would not work for public namespaces? 

Let's search something to play with:

$ doveadm search sentbefore 01-jan-2011 mailbox Public/Mailing-Lists/Dovecot
adeffe1c8b7ba64bb377a998a2df 1021
[…]

Trying to fetch headers using mailbox-guids *fails*:

$ doveadm fetch hdr mailbox-guid adeffe1c8b7ba64bb377a998a2df uid 1021

…while it works using mailbox name:

$ doveadm fetch hdr mailbox Public/Mailing-Lists/Dovecot uid 1021

Seems odd.

Regards
Thomas
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)

iEYEARECAAYFAk0XSf8ACgkQ+meF/S97aXjqggCbBAL+FFTmHRXwuxLX46vYFclr
42UAn0dSEwvUzZUy8QU/Pvux+UzVdRlB
=vWk6
-END PGP SIGNATURE-