On 11 Apr 2015, at 10:48, Hardy Flor <HFlor@gmx.de> wrote:
I've also looked at the source code. But my attempt to output the UID fails because of the error message: doveadm-mail save.c: 62: 36: error: dereferencing pointer to incomplete type in the line: printf("uid =%s\n", dec2str(save_ctx->dest_mail->uid));
The UID isn't actually assigned at that point yet - it's only after transaction has been committed. See imap/cmd-append.c how it does it. Outputting the guid + uidvalidity + uid automatically would be useful I guess (for getting the GUID I think you'd need to create yet another transaction + mail_alloc() + mail_set_uid() + mail_get_special(MAIL_FETCH_GUID) - so maybe not worth the trouble since with the UID you can already do another doveadm fetch for the GUID).