[Dovecot] get the messages ID after APPEND
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?
Thank you!
Christian
dovecot --version 1.0.15
dovecot -n # 1.0.15: /etc/dovecot/dovecot.conf log_timestamp: %Y-%m-%d %H:%M:%S ssl_cert_file: /etc/postfix/tls/mail.cert ssl_key_file: /etc/postfix/tls/mail.key disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_privileged_group: mail mail_location: maildir:%h/.EMAIL auth default: mechanisms: plain login passdb: driver: pam userdb: driver: passwd socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix
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..
Timo Sirainen schrieb:
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. This sounds great! Do you know where to get the Packages for debian lenny? And which configuration is needed afterwards?
Thank you thank you thank you!
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..
On 04/16/2010 10:56 PM Christian Fischer wrote:
Timo Sirainen schrieb:
v1.1+ supports UIDPLUS extension that gives you the UID immediately in the APPEND reply. This sounds great! Do you know where to get the Packages for debian lenny?
http://packages.debian.org/source/lenny-backports/dovecot
And which configuration is needed afterwards?
http://wiki.dovecot.org/Upgrading and file:///usr/share/doc/dovecot-common/README.Debian
Regards, Pascal
The trapper recommends today: c01dcofe.1010623@localdomain.org
participants (3)
-
Christian Fischer
-
Pascal Volk
-
Timo Sirainen