SA Bugzilla – Bug 2608
HABEAS_SWE fails with out of order headers
Last modified: 2004-01-08 06:56:49 UTC
Habeas has gotten multiple reports of people's individual Habeas warranted mail not getting recognized by SpamAssassin because the headers are out of order. Specifically, I believe the default Apple Mail configuration tends to produce headers in a random order. Of course, RFC 2822 does not mandate that headers stay in order, although we would certainly prefer for them to. Please add a line before the if statement that sorts the headers (from EvalTests.pm below): $self->{habeas_swe} = 0; my $all = $self->get('ALL'); if ($all =~ /\n(X-Habeas-SWE-1:.{0,512}X-Habeas-SWE-9:[^\n]{0,64}\n)/si) { my $text = $1; $text =~ tr/A-Z/a-z/; $text =~ tr/ / /s; $text =~ s/\/?>/\/>/; if (sha1($text) eq "42ab3d716380503f66c4d44017c7f37b04458a9a") { $self->{habeas_swe} = 1; } } return $self->{habeas_swe}; } Habeas directions for embedding the headers in the Apple Mail application are at <http://www.habeas.com/configurationPages/macmail-out.htm>. We don't understand why it puts them out of order. For your testing, here is one set of headers from a support ticket filed with us: X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-1: winter into spring X-Habeas-SWE-9: mark in spam to <http://www.habeas.com/report/>. X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant Daniel, thanks in advance for your help on this.
Created attachment 1502 [details] patch against EvalTests.pm This is probably the cleanes sultion: Pull one header after another and let our routines handle any magic possibly introduced by some mailer. The checksum is different because the header names themselves aren't taken into account. This logic is also a bit more tolernat against whitespaces, I assume the order of line breaks isn't important in the copyrighted haiku?
looking into this
any update on this? seems like something we should fix for 2.62 if we can.
Dan told me in PM that the line breaks really aren't relevant, so I'd go and commit my patch if it is +1'd.
+1
ok, committed to head and 2.62