[Dovecot] understand the struct message_header_line
Alex Baule
alexwbaule at gmail.com
Tue Sep 21 21:07:28 EEST 2010
Timo...
Using the src/lib-mail/test-istream-header-filter.c as example, and
following your tips to jump my desired header value, but i need to store the
value from the Header filtered.
In the Exemple, the callback is this:
static void filter_callback(struct message_header_line *hdr,
bool *matched, void *context ATTR_UNUSED)
{
if (hdr != NULL && hdr->name_offset == 0) {
/* drop first header */
*matched = TRUE;
}
}
What i try to understand is how the structs work, it's save the entire
header or every line from header call the callback function ?
hdr->name_offset is the size of elements in the struct ? (like a array of
message_header_line)
The void *context ATTR_UNUSED i can pass what i want to change ? like a
pointer to a variable ?
More information about the dovecot
mailing list