On Sat, Jun 29, 2002 at 11:12:41AM +0100, Vaclav Barta wrote: > I agree the new version looks nicer and easier to read, but is it > *meant* to be read? Personally, I want to parse it, and the whitespace > just gets in the way... I know it's *possible* to parse it, but I'm lazy > - is there some configuration setting to get the old format back? > Mail::SpamAssassin::Conf doesn't mention X-Spam-Status at all...
Well, I personally liked the old format for the same reason, but have learned to live with the "whitespace folding of headers is allowed, so I should just deal with it" way of things. It's actually not hard to parse out: # $head is a Mail::Header object, fyi. my $SAstatus = $head->get("X-Spam-Status") || "No, tests=\n"; # Figure out if the message is considered spam or not $SAstatus =~ s/\n\t+\s+//g; # unfold long sections $SAstatus =~ s/\n\t+/ /g; # unfold everything else This converts the multi-line header (X-Spam-Status only...) into a single-line header which I can then parse as always. The beauty is that the old-style single-line headers still parse without any problem. :) -- Randomly Generated Tagline: Must be a different Larry Wall. There are at least 137 of us in the U.S. -- Larry Wall in <[EMAIL PROTECTED]> ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek No, I will not fix your computer. http://thinkgeek.com/sf _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk