SA Bugzilla – Bug 4062
scoring metarules in user_prefs does not work with spamc
Last modified: 2005-03-11 10:10:06 UTC
Thanks to bin-doph in #spamassassin on freenode, this already got solved. Scoring does not work for metarules in user_prefs, if there are not two empty lines at the end of user_prefs. Normal rules score well (with spamc) and metarules also score well with spamassassin, even if there is no empty 2 lines. However, if metarules are defined and the spam is piped through spamc, you only get a score of 1 for any meta rule in user_prefs.
the work-around mentioned above only works for the first spam that applies to the metarules. With any further spam (that applies), scoring of the meta-rule falls back to 1.0 Some output that demonstrates this can be seen at http://paste.phpfi.com/44492
Subject: Re: scoring metarules in user_prefs does not work with spamc Possibly related to this discussion on users: http://news.gmane.org/find-root.php?message_id=%3c043d01c4e7d7%2464874cb0%241225a8c0%40kittycat%3e
the same rules in local.cf with allow_user_rules disabled works perfectly Herk in #spamassassin on freenode told me to attach the debug output of spamd with enabled user prefs which will be done. Below you can find my local.cf and my user_prefs marco@pingu marco $ more /etc/spamassassin/local.cf # This is the right place to customize your installation of SpamAssassin. # # See 'perldoc Mail::SpamAssassin::Conf' for details of what can be # tweaked. # ########################################################################### # # rewrite_header Subject *****SPAM***** # report_safe 1 # trusted_networks 212.17.35. lock_method flock # Allow ~/.spamassassin/user_prefs settings allow_user_rules 1 marco@pingu marco $ more .spamassassin/user_prefs # SpamAssassin user preferences file. See 'perldoc Mail::SpamAssassin::Conf' # for details of what can be tweaked. ########################################################################### # How many hits before a mail is considered spam. # required_hits 5 # Whitelist and blacklist addresses are now file-glob-style patterns, so # "friend@somewhere.com", "*@isp.com", or "*.domain.net" will all work. # whitelist_from someone@somewhere.com whitelist_from *@dvdboxoffice.com # Add your own customised scores for some tests below. The default scores are # read from the installed spamassassin rules files, but you can override them # here. To see the list of tests and their default scores, go to # http://spamassassin.org/tests.html . # # score SYMBOLIC_TEST_NAME n.nn score BAYES_99 3.8 # Speakers of Asian languages, like Chinese, Japanese and Korean, will almost # definitely want to uncomment the following lines. They will switch off some # rules that detect 8-bit characters, which commonly trigger on mails using CJK # character sets, or that assume a western-style charset is in use. # # score HTML_COMMENT_8BITS 0 # score UPPERCASE_25_50 0 # score UPPERCASE_50_75 0 # score UPPERCASE_75_100 0 header MN_SUB_CONT_MANI Subject =~ /(^Mani\s|\sMani\s|\sMani)/ score MN_SUB_CONT_MANI 3.0 describe MN_SUB_CONT_MANI Subject contains Mani [space] header MN_TO_STARTS_MANI To =~ /^Mani\s/ score MN_TO_STARTS_MANI 3.0 describe MN_TO_STARTS_MANI To begins with Mani [space] # Test #header L_TO_ME To =~ /mani\@access\.unizh\.ch/ #describe L_TO_ME Email addressed to me #score L_TO_ME 25.00 body __SOBER_I_EMPTY_1 /(?:\*-\*-\*.{10,60}\*-\*-\*.{10,60}\*-\*-\*|\+\+\+\+ User-Service.{10,60}\+\+\+\+M ailTo|This account_hast_been_disabled|Protected message is attached|Your password was changed successfully|Passwort Ihr Geb urts-Datum|Viel vergnügen mit unserem Angebot|Im I-Net unter:|Ihrer Nutzungs- Daten vornehmen|_does_not_like_recipient.|_do es_not_like_sender.|The full mail is attached.|Aus Datenschutzrechtlichen Gründen\, darf die vollständige E-Mail incl|ACCES S\.UNIZH- Anti_Virus Service)/ header __SOBER_I_EMPTY_2 Subject =~ /(?:Auftragsbestätigung|Ungültige Zeichen in Ihrer E-Mail|Registrationco nfirmation|^Confirmation|illegal signs in your mail|Mailzustellung fehlgeschlagen -Damon|Lieferungs-Bescheid|Mail_Delivery_ failure|Mailer Error|Mailer Error -Damon|invalid mail|Mail- Verbindung wurde abgebrochen|Ihre E-Mail wurde verweigert|Ihre neuen Account-Daten|Mailer-Fehler|^Info von|^Details$|Betr\.- Ihr Account|Fehler in E-Mail)/ full __SOBER_I_EMPTY_3 /Content-Disposition: attachment; filename=".{3,20}"\s[\s\t ]{2,5}--(?:Boundary|=== =)/i meta SOBER_I_EMPTY_A (__SOBER_I_EMPTY_1 + __SOBER_I_EMPTY_2 + __SOBER_I_EMPTY_3 == 2) describe SOBER_I_EMPTY_A Empty SOBER.I virus score SOBER_I_EMPTY_A 10.0 meta SOBER_I_EMPTY_B (__SOBER_I_EMPTY_1 + __SOBER_I_EMPTY_2 + __SOBER_I_EMPTY_3 == 3) describe SOBER_I_EMPTY_B Empty SOBER.I virus score SOBER_I_EMPTY_B 15.0
Created attachment 2589 [details] output of spamd -m 1 -c -H -D
user_prefs scoring has been fixed via r156655 in bug 4121. *** This bug has been marked as a duplicate of 4121 ***