Bug 4448 - [review] use_dcc and use_pyzor fail to function via SQL prefs if disabled in local.cf
Summary: [review] use_dcc and use_pyzor fail to function via SQL prefs if disabled in ...
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Translations and Languages (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other other
: P3 normal
Target Milestone: 3.1.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard: can be committed
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-01 09:31 UTC by Dallas Engelken
Modified: 2005-07-28 07:57 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
pyzor and dcc patch patch None Dallas Engelken [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Dallas Engelken 2005-07-01 09:31:46 UTC
# grep use_ /etc/mail/spamassassin/local.cf
use_razor2      0
use_dcc         0
use_pyzor       0

SQL Config shows...

 [12051] dbg: config: SQL pref: use_razor2 val: 1
 [12051] dbg: config: SQL pref: use_pyzor val: 1
 [12051] dbg: config: SQL pref: use_dcc val: 1

yet razor2 is the only helper-app that runs.  if i set my local.cf to

grep use_ /etc/mail/spamassassin/local.cf
use_razor2      1
use_dcc         1
use_pyzor       1

all 3 of them run.  on spamd startup, if use_pyzor or use_dcc is 0, it disables
them... preventing you from 'enabling' them via SQL.

 [12669] dbg: razor2: razor2 is available, version 2.74
 [12669] dbg: plugin: registering glue method for check_razor2_range
(Mail::SpamAssassin::Plugin::Razor2=HASH(0x919db74))
 [12669] dbg: plugin: registering glue method for check_razor2
(Mail::SpamAssassin::Plugin::Razor2=HASH(0x919db74))

 [12708] dbg: plugin: registering glue method for check_dcc
(Mail::SpamAssassin::Plugin::DCC=HASH(0x8beef1c))
 [12708] dbg: dcc: dccifd is not available: use_dcc is set to 0
 [12708] dbg: dcc: dccproc is not available: use_dcc is set to 0
 [12708] dbg: dcc: dccifd and dccproc are not available, disabling DCC

 [12619] dbg: plugin: registering glue method for check_pyzor
(Mail::SpamAssassin::Plugin::Pyzor=HASH(0x8beef70))
 [12619] dbg: pyzor: use_pyzor option not enabled, disabling Pyzor

The problem here is you cant disable pyzor and dcc globally via flat config and
then run them on the users or domain you want via SQL.  The fix is simple.  
I'll attach a diff...

after applying the patch, i see

 [14110] dbg: pyzor: running a check_pyzor
 [14110] dbg: pyzor: config says use_pyzor value is 0
 [14110] dbg: pyzor: use_pyzor option not enabled, disabling Pyzor
 [14110] dbg: util: executable for pyzor was found at /usr/bin/pyzor
 [14110] dbg: pyzor: pyzor is available: /usr/bin/pyzor
 [14110] dbg: pyzor: opening pipe: /usr/bin/pyzor --homedir /var/pyzor/ check <
/tmp/.spamassassin1411041WDiStmp
 [14110] dbg: pyzor: got response: 66.250.40.33:24441_(200, 'OK')_0_0
 [14121] dbg: config: SQL pref: use_pyzor val: 1
 [14121] dbg: pyzor: running a check_pyzor
 [14121] dbg: pyzor: config says use_pyzor value is 1
 [14121] dbg: util: executable for pyzor was found at /usr/bin/pyzor
 [14121] dbg: pyzor: pyzor is available: /usr/bin/pyzor
 [14121] dbg: pyzor: opening pipe: /usr/bin/pyzor --homedir /var/pyzor/ check <
/tmp/.spamassassin14121erfQYetmp

and

 [15976] dbg: config: read file /usr/share/spamassassin/25_dcc.cf
 [15976] dbg: dcc: network tests on, registering DCC
 [15976] dbg: plugin: registering glue method for check_dcc
(Mail::SpamAssassin::Plugin::DCC=HASH(0x8beeea8))
 [15976] dbg: dcc: dccifd is not available: use_dcc is set to 0
 [15976] dbg: dcc: dccproc is not available: use_dcc is set to 0
 [15976] dbg: dcc: dccifd and dccproc are not available, disabling DCC
 [15976] dbg: dcc: dcc_disabled is now 1
 [15987] dbg: config: SQL pref: use_dcc val: 1
 [15987] dbg: dcc: dccifd is available: /var/dcc/dccifd.sock
 [15987] dbg: dcc: found dcc_interface of dccifd
 [15987] dbg: dcc: dcc_disabled is now 0
 [15987] dbg: dcc: dccifd got response: X-DCC-SIHOPE-DCC-3-Metrics: dev.nmgi.com
1085; Body=0


so things are well...
Comment 1 Dallas Engelken 2005-07-01 09:33:03 UTC
Created attachment 2969 [details]
pyzor and dcc patch

quick fix to allow pyzor and dcc to function per sql user config when use_dcc
and use_pyzor are disabled in local.cf
Comment 2 Justin Mason 2005-07-23 15:12:26 UTC
+1
Comment 3 Duncan Findlay 2005-07-23 17:37:51 UTC
+1
Comment 4 Justin Mason 2005-07-28 15:57:07 UTC
3.1.0:
Sending        lib/Mail/SpamAssassin/Plugin/DCC.pm
Sending        lib/Mail/SpamAssassin/Plugin/Pyzor.pm
Transmitting file data ..
Committed revision 226278.

trunk:
Sending        lib/Mail/SpamAssassin/Plugin/DCC.pm
Sending        lib/Mail/SpamAssassin/Plugin/Pyzor.pm
Transmitting file data ..
Committed revision 226279.