[Dovecot] FTS Plugin design

Timo Sirainen tss at iki.fi
Wed Sep 9 23:33:43 EEST 2009


On Tue, 2009-09-08 at 15:47 +0100, rui.carneiro at portugalmail.net wrote:
> Now I am trying to find a way to know the mime part id of the parts  
> used on fts_build_mail. Is that already possible or I need to do that  
> by my own?

If you already get the MIME structure, then I guess you have struct
message_parts. You could do it similar to the way IMAP does things:

       1          TEXT/PLAIN
       2          APPLICATION/OCTET-STREAM
       3          MESSAGE/RFC822
       3.HEADER   ([RFC-2822] header of the message)
       3.TEXT     ([RFC-2822] text body of the message) MULTIPART/MIXED
       3.1        TEXT/PLAIN
       3.2        APPLICATION/OCTET-STREAM
       4          MULTIPART/MIXED
       4.1        IMAGE/GIF
       4.1.MIME   ([MIME-IMB] header for the IMAGE/GIF)
       4.2        MESSAGE/RFC822
       4.2.HEADER ([RFC-2822] header of the message)
       4.2.TEXT   ([RFC-2822] text body of the message) MULTIPART/MIXED
       4.2.1      TEXT/PLAIN
       4.2.2      MULTIPART/ALTERNATIVE
       4.2.2.1    TEXT/PLAIN
       4.2.2.2    TEXT/RICHTEXT

So you get the root message_part. Its first child is "1", second child
"2", 3rd child "3", 3rd child's first child "3.1", etc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20090909/1f447c2a/attachment.bin 


More information about the dovecot mailing list