Lines 1-5
Link Here
|
1 |
--- spamass-milter.cpp.orig Thu Jun 26 16:10:44 2003 |
1 |
--- spamass-milter.cpp.orig Thu Jun 26 16:10:44 2003 |
2 |
+++ spamass-milter.cpp Thu Jun 10 11:46:12 2004 |
2 |
+++ spamass-milter.cpp Wed Oct 13 00:52:23 2004 |
3 |
@@ -102,6 +102,10 @@ |
3 |
@@ -102,6 +102,10 @@ |
4 |
#include <csignal> |
4 |
#include <csignal> |
5 |
#include <string> |
5 |
#include <string> |
Lines 29-35
Link Here
|
29 |
update_or_insert(assassin, ctx, assassin->spam_flag(), &SpamAssassin::set_spam_flag, "X-Spam-Flag"); |
29 |
update_or_insert(assassin, ctx, assassin->spam_flag(), &SpamAssassin::set_spam_flag, "X-Spam-Flag"); |
30 |
update_or_insert(assassin, ctx, assassin->spam_status(), &SpamAssassin::set_spam_status, "X-Spam-Status"); |
30 |
update_or_insert(assassin, ctx, assassin->spam_status(), &SpamAssassin::set_spam_status, "X-Spam-Status"); |
31 |
|
31 |
|
32 |
@@ -1341,7 +1349,11 @@ |
32 |
@@ -365,7 +373,7 @@ |
|
|
33 |
{ |
34 |
int score, rv; |
35 |
const char *spam_status = assassin->spam_status().c_str(); |
36 |
- rv = sscanf(spam_status,"%*s hits=%d", &score); |
37 |
+ rv = sscanf(spam_status,"%*s score=%d", &score); |
38 |
if (rv != 1) |
39 |
debug(D_ALWAYS, "Could not extract score from <%s>", spam_status); |
40 |
else |
41 |
@@ -539,6 +547,10 @@ |
42 |
} |
43 |
} |
44 |
|
45 |
+ /* if the header line ends in \r\n, don't return the \r */ |
46 |
+ if (header[field_end-1] == '\r') |
47 |
+ field_end--; |
48 |
+ |
49 |
// Maybe remove the whitespace picked up when a header wraps - this |
50 |
// might actually be a requirement |
51 |
return header.substr( field_start, field_end - field_start ); |
52 |
@@ -1341,7 +1353,11 @@ |
33 |
{ |
53 |
{ |
34 |
// assuming we have a recipient in the form: <username@somehost.somedomain> |
54 |
// assuming we have a recipient in the form: <username@somehost.somedomain> |
35 |
// we return 'username' |
55 |
// we return 'username' |