On 2024-12-20 11:33 p.m., Ralph Seichter via dovecot wrote:
* Marc via dovecot:

How should I use 'doveadm search -u' to get the mailbox path where the
message is stored?
https://doc.dovecot.org/main/core/man/doveadm-search.1.html states:

   doveadm-search(1) - Show a list of mailbox GUIDs and message UIDs
   matching given search query.

I don't see how the search command could be used to return some kind of
"path".

As mentioned in the man page, use doveadm-search in combination with doveadm-fetch. To display the mailbox name and some headers (instead of fetching the entire message) use, for example:

doveadm search -u username [SEARCH PATTERN] | while read guid uid; do
   doveadm fetch -u username "mailbox hdr.subject hdr.date" mailbox-guid $guid uid $uid
done


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

Reply via email to