Hello,
  I'm looking for some advice on getting RFC822 headers from messages using
c-client (imap-2002e).  We have some proprietary x-headers in our product.  We
use SET_IMAPEXTRAHEADERS to set our x-headers to fetch (with the prefetch) and
SET_PARSELINE to set our own parseline routine.  This looks to be working
perfectly.  When the FETCH is performed, our parseline routine sees the
x-headers we were expecting.
  We are trying to use the sparep field of the ENVELOPE structure to store the
parsed x-header data in.  In our parseline function we allocate the sparep if
necessary, write the parsed data to it, and we have set SET_FREEENVELOPESPAREP
to release the space when the envelope is destroyed.  The problem appears to be
that the envelope is freed before we get a chance to use the info we've stored
in the sparep. It looks like the IMAP envelope is parsed first, then
imap_parse_header calls rfc822_parse_msg to parse the RFC822 header (including
our x-headers) into a new envelope, and merges it into the existing one (that
holds the IMAP envelope).  It doesn't look like the sparep is being merged in
any way into the existing envelope (things like Newsgroups and Followup-To are),
and so our envelope information is freed along with the new envelope.
  Is this a hole, or am I misunderstanding how to parse custom headers and/or
use the sparep of the envelope?
  Also, what is the preferred method of changing the default IMAP port?  We
haven't had alot of luck with SET_IMAPPORT.

Thanks for any help,
Jeremy Schmersal

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

Reply via email to