21 Oct
2007
21 Oct
'07
2:11 a.m.
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?