rmail header needs adjusting offset
David Relson
relson at osagesoftware.com
Wed Dec 17 13:35:15 CET 2003
On Wed, 17 Dec 2003 13:24:48 +0100
Stefan Bellon <sbellon at sbellon.de> wrote:
> Hi!
>
> A few months ago we added rmail support. It is however just the very
> basic support. An rmail header normally looks like this
>
> #! rmail xxxxxxx
>
> where xxxxxxx denotes the offset in bytes to the next email starting
> with an rmail header itself.
>
> Due to the fact that Bogofilter changes the length of the messages in
> passthrough mode, those offsets currently are wrong. Some software
> therefore cuts off the emails at the end by the length of the added
> X-Bogosity line and the modified Subject: line (if configured).
>
> I therefore need to add the length of that line to the rmail line
> before writing it back in passthrough mode.
>
> What's the correct place in Bogofilter to do that? write_header() in
> passthrough.c?
Stefan,
That sounds right. I'd probably do it with code like:
static bool firstline = true;
if (firstline) {
firstline = false;
if (!memcmp(text, "#! rmail", ...))
fputs(text);
else {
uint len = ...
fprintf(...,"#! rmail ...", len);
}
}
David
More information about the bogofilter-dev
mailing list