Am 04.08.2008 um 15:04 schrieb Peter Sørensen:
> Hi,
>
> I would like to test the CRM114 spamassassin plugin.
> I have a question regarding this.
>
> Is it nessecary to patch amavisd-new to make this work - meaning
> make the
> X-CRM114-CacheID header generated by CRM114 available in the mail?
>
> Any hints to this?
>
> Regards
>
> Peter Sorensen/University of Southern Denmark/mail: [EMAIL PROTECTED]
Hej,
i believe yes to get the autolearn thing working, at least thats what
i do.
I used the patch from mschuette.name/wp/crm114-spamassassin-plugin/
Its originally crafted for amavisd v2.5.2
If you want to try, my actual diff against v2.6.1 looks like this:
diff -u /usr/local/src/amavisd-new-2.6.1/amavisd /usr/sbin/amavisd-
new-2.6.1_crm114
--- /usr/local/src/amavisd-new-2.6.1/amavisd 2008-06-29
02:37:58.000000000 +0200
+++ /usr/sbin/amavisd-new-2.6.1_crm114 2008-07-28 20:48:18.000000000
+0200
@@ -963,6 +963,7 @@
X-Amavis-PenPals X-Amavis-OS-Fingerprint X-Amavis-PolicyBank
X-Spam-Status X-Spam-Level X-Spam-Flag X-Spam-Score
X-Spam-Report X-Spam-Checker-Version X-Spam-Tests
+ X-Spam-CRM114-Status X-Spam-CRM114-CacheID
X-DSPAM-Signature X-DSPAM-Result
X-DSPAM-Confidence X-DSPAM-Probability X-DSPAM-User X-DSPAM-
Factors
);
@@ -9796,12 +9797,15 @@
$virus_dejavu = 1;
}
if ($spam_presence_checked) {
- my($spam_level,$spam_status,$spam_report,$spam_summary) =
- @$cache_entry{'SL','SS','SR','SY'};
+ my($spam_level,$spam_status,$spam_report,$spam_summary,
$crm114_score,$crm114_status,$crm114_cacheid) =
+ @$cache_entry{'SL','SS','SR','SY','SCS','SCT','SCI'};
$msginfo->spam_level($spam_level);
$msginfo->spam_status($spam_status);
$msginfo->spam_report($spam_report);
$msginfo->spam_summary($spam_summary);
+ $msginfo->supplementary_info('CRM114SCORE', $crm114_score),
+ $msginfo->supplementary_info('CRM114STATUS', $crm114_status),
+ $msginfo->supplementary_info('CRM114CACHEID', $crm114_cacheid)
}
do_log(1,"cached %s from <%s> (%s,%s)", $body_digest, $sender,
$virus_presence_checked, $spam_presence_checked);
@@ -10052,9 +10056,13 @@
prolong_timer($which_section);
$elapsed{'TimeElapsedSpamCheck'} = Time::HiRes::time -
$t0_sect;
snmp_count('OpsSpamCheck');
- @$cache_entry{'St','SL','SS','SR','SY'} =
+ @$cache_entry{'St','SL','SS','SR','SY','SCS','SCT','SCI'} =
(int($now), $msginfo->spam_level, $msginfo->spam_status,
- $msginfo->spam_report, $msginfo->spam_summary);
+ $msginfo->spam_report, $msginfo->spam_summary,
+ $msginfo->supplementary_info('CRM114SCORE'),
+ $msginfo->supplementary_info('CRM114STATUS'),
+ $msginfo->supplementary_info('CRM114CACHEID')
+ );
$spam_presence_checked = 1;
}
}
@@ -11080,7 +11088,8 @@
if (c('remove_existing_spam_headers')) {
my(@which_headers) = qw(
X-Spam-Status X-Spam-Level X-Spam-Flag X-Spam-Score
- X-Spam-Report X-Spam-Checker-Version X-Spam-Tests);
+ X-Spam-Report X-Spam-Checker-Version X-Spam-Tests
+ X-Spam-CRM114-Status X-Spam-CRM114-CacheID);
push(@which_headers, qw(
X-DSPAM-Result X-DSPAM-Confidence X-DSPAM-Probability
X-DSPAM-Signature X-DSPAM-User X-DSPAM-Factors)) if
defined $dspam;
@@ -11285,6 +11294,13 @@
$allowed_hdrs && $allowed_hdrs->{lc('X-Spam-Level')};
$hdr_edits->add_header('X-Spam-Status', $full_spam_status, 1)
if $allowed_hdrs && $allowed_hdrs->{lc('X-Spam-Status')};
+ $hdr_edits->add_header('X-Spam-CRM114-Status', sprintf("%s
( %s )",
+ $msginfo->supplementary_info('CRM114STATUS'),
+ $msginfo->supplementary_info('CRM114SCORE')), 1)
+ if $allowed_hdrs && $allowed_hdrs->{lc('X-Spam-CRM114-
Status')};
+ $hdr_edits->add_header('X-Spam-CRM114-CacheID',
+ $msginfo->supplementary_info('CRM114CACHEID'), 1)
+ if $allowed_hdrs && $allowed_hdrs->{lc('X-Spam-CRM114-
CacheID')};
}
if ($do_tag2 && $is_local) {
# SA reports may contain any octet, i.e. 8-bit data from a
mail
@@ -12975,9 +12991,9 @@
if ($daemonize) { # log warnings and uncaught errors
$SIG{'__DIE__' } =
- sub { if (!$^S) { my($m) = $@; chomp($m); do_log(-1,"_DIE: %s",
$m) } };
+ sub { if (!$^S) { my($m) = @_; chomp($m); do_log(-1,"_DIE: %s",
$m) } };
$SIG{'__WARN__'} =
- sub { my($m) = $@; chomp($m); do_log( 2,"_WARN: %s",$m) };
+ sub { my($m) = @_; chomp($m); do_log( 2,"_WARN: %s",$m) };
}
# set up Net::Server configuration
@@ -20359,6 +20375,7 @@
$sa_tests = $per_msg_status->get_tag('TESTSSCORES',',');
for my $t (qw(TESTS AUTOLEARN AUTOLEARNSCORE SC SCRULE SCTYPE
LANGUAGES RELAYCOUNTRY ASN ASNCIDR DCCB DCCR
DCCREP
+ CRM114STATUS CRM114SCORE CRM114CACHEID
DKIMDOMAIN DKIMIDENTITY AWLSIGNERMEAN)) {
$supplementary_info{$t} = $per_msg_status->get_tag($t);
}
############
To get it in the logs to see if it works (at loglevel 2), i put
something like:
[? [:supplementary_info|CRM114STATUS] ||, crm114_status=[:uquote|
[:supplementary_info|CRM114STATUS]]]#
[? [:supplementary_info|CRM114CACHEID] ||, crm114_cacheid=[:uquote|
[:supplementary_info|CRM114CACHEID]]]#
in passed + blocked sections of my $log_templ
Did some retraing on false-positives and -negatives via "crm
mailreaver.crm --spam|nospam cache-id" in the first days,
but now it seems to be very acurate.
I run crm114.pm with fixed scores since about 6 month on two lite-
loaded mailservers and it works great here.
regards jules
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/