[Dovecot] API problem (noob)
Timo Sirainen
tss at iki.fi
Sun Oct 21 02:11:08 EEST 2007
On Tue, 2007-10-09 at 00:40 +0200, Lars Stavholm wrote:
> static const char *const exclude_headers[] = {
> "X-DSPAM-Signature"
> }
> strcpy(fname, mktemp(fname));
> fd = creat(fname, 0600);
> mail_get_stream(mail, NULL, NULL, &input);
> output = o_stream_create_fd_file(fd, 0, TRUE);
> input = i_stream_create_header_filter(input,
> HEADER_FILTER_EXCLUDE | HEADER_FILTER_NO_CR,
> exclude_headers, N_ELEMENTS(exclude_headers),
> null_header_filter_callback, NULL);
> o_stream_send_istream(output, input);
>
>
> But all I get in the temp file is the message body,
> i.e. no headers at all. What am I doing wrong here?
That looks correct. If you leave out the header filter stream it writes
the headers also?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20071021/dfc3be2e/attachment.bin
More information about the dovecot
mailing list