[Dovecot] doveadm fetch vs search+fetch

Timo Sirainen tss at iki.fi
Thu Dec 8 05:19:42 EET 2011


On Wed, 2011-12-07 at 18:00 -0800, Joseph Tam wrote:
> What's the pactical difference between using "doveadm fetch" rather
> than using "doveadm search" in conjunction with "doveadm fetch", as the
> man pages suggest?
> 
> It seems "doveadm fetch" functionally supercedes "doveadm search"
> making the latter obsolete.  It can even be closely simulated
> with "doveadm -f tab fetch ... 'mailbox-guid uid' search-query ...".

If you want to fetch message headers/bodies separately for multiple
messages, then doveadm search is useful. With "doveadm fetch" you can't
really know where one message ends and another one begins (although the
^L character between messages is a good indicator, it's not 100%
reliable). And in any case it's more difficult to use for separating
messages in a shell script.





More information about the dovecot mailing list