[Dovecot] get the messages ID after APPEND

Timo Sirainen tss at iki.fi
Fri Apr 16 16:51:31 EEST 2010


On Fri, 2010-04-16 at 15:37 +0200, Christian Fischer wrote:
> Hi there!
> 
> I am new to imap "Command Line" and trying to write a script doing the 
> following on a dovecot imap server:
> - APPEND a message (e.g. to Drafts)
> - get the ID to reopen the message for reading
> 
> In short: How do i get the ID back from the APPEND command or which 
> command has to be invoked to get the uid of the newly added message?

By ID do you mean message's IMAP UID?

> dovecot --version
> 1.0.15

v1.1+ supports UIDPLUS extension that gives you the UID immediately in
the APPEND reply. With v1.0 you'd have to do something ugly like
selecting the mailbox and searching for the message based on Message-ID:
header or something..

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100416/5b0c2dd6/attachment.bin 


More information about the dovecot mailing list