[Dovecot] Fetch without setting flags

Timo Sirainen tss at iki.fi
Thu Dec 30 13:58:28 EET 2010


On Tue, 2010-12-21 at 15:56 +0330, Behrooz Afghahi wrote:
> Hello,
> 
> I'm customizing squirrelmail and I want to print a line from the message
> in front of the subject in mailbox listing (like gmail).
> the problem is, when I use 'FETCH {SOME_ID} BODY[]' the message gets
> marked as seen. How can I fetch without setting the senn flag ?

Get first 100 characters from the message body / first mime part:

FETCH n BODY.PEEK[1]<0.100>

This of course hopes that [1] MIME part contains something usable. You
should probably also fetch BODY.PEEK[1.MIME] to see what it contains.
(Interestingly enough Dovecot happens to return message headers as
1.MIME when there are no MIME parts, but this won't work for other
servers.)

-------------- 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/20101230/b529bad4/attachment.bin 


More information about the dovecot mailing list