You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by jeff986 <je...@netstar.com> on 2008/02/03 00:55:22 UTC

Spamassassin Bayes not working with Procmail

I've installed SpamAssassin (3.2.4), including DB_File to use the Bayesian
filters..    If I execute spamassassin directly from the command line, it
executes as expected and uses the bayes filters:

% spamassasin -D bayes < spammsg2.txt 
[6868] dbg: bayes: tie-ing to DB file R/O
/home/jeff/.spamassassin/bayes_toks
[6868] dbg: bayes: tie-ing to DB file R/O
/home/jeff/.spamassassin/bayes_seen
[6868] dbg: bayes: found bayes db version 3
    .
    .
    .
.. and from there functions correctly.    "Great success!"  -Borat

However, if I execute spamassassin from within procmail (called the same,
with "-D bayes"), instead I see this in the log:

procmail: Executing "/usr/local/bin/spamassassin,-D,bayes"
[6866] dbg: bayes: DB_File module not installed, cannot use bayes

So..  clearly DB_File is installed as it works in the first example..  this
error message baffles me.   I've checked every possible combinaton of
eveything I can think of, but ..  the problem persists (and is making me
quite crazy).

Things it's not:

1) It's not the bayes database, as I've used sa-learn to build and check its
contents.  I've also set the "usage" thresholds, as appropriate, to a
suitable level.    It's not a path problem or a file permissions problem on
the config/database files or executables (all are the same, e.g. 
/usr/local/bin/ ... ) , nor on the DB_File modules or libraries.   
2) It's no task permissions problem I can find or imagine;  spamassassin
when run by itself from a command line always works (regardless of my
uid/gid);  however, no matter what my UID/GID calling SA thru Procmail
always yields the same "cannot use" result;  If I copy procmail and run it
*not* setuid/gid as root/god (or as anyone/anything), it still fails. 
3) It's not two versions PERL (since I don't have two installed);
4) It's not two versions of DB_File (that was the problem during
installation, which I squashed)
5) It's not a file permissions problem.

It must be something about procmail, but..  I officially have no clue.   
Comments?    Ideas?   Thanks.






-- 
View this message in context: http://www.nabble.com/Spamassassin-Bayes-not-working-with-Procmail-tp15248899p15248899.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Spamassassin Bayes not working with Procmail

Posted by Theo Van Dinter <fe...@apache.org>.
On Sat, Feb 02, 2008 at 03:55:22PM -0800, jeff986 wrote:
> It must be something about procmail, but..  I officially have no clue.   
> Comments?    Ideas?   Thanks.

You don't happen to have PERL5LIB or PERLLIB in your environment, do you?

Where is DB_File installed, and what's the output of "perl -V"?

-- 
Randomly Selected Tagline:
When man calls an animal "vicious", he usually means that it will attempt
 to defend itself when he tries to kill it.

Re: Spamassassin Bayes not working with Procmail

Posted by jeff986 <je...@netstar.com>.
I'm not using the environment variables.   Should I be?

% perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.7, archname=sun4-solaris
    uname='sunos ultra 5.7 generic_106541-25 sun4u sparc sunw,ultra-2 '
    config_args='-de'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='3.2.2', gccosandvers='solaris2.7'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldb -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
                        USE_LARGE_FILES USE_PERLIO
  Built under solaris
  Compiled at Jan 31 2008 14:55:05
  %ENV:
    PERL5LIB="/usr/local/lib/perl5/5.10.0/sun4-solaris"
    PERLLIB="/usr/local/lib/perl5/5.10.0/sun4-solaris"
  @INC:
    /usr/local/lib/perl5/5.10.0/sun4-solaris
    /usr/local/lib/perl5/5.10.0/sun4-solaris
    /usr/local/lib/perl5/5.10.0
    /usr/local/lib/perl5/site_perl/5.10.0/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.10.0
    /usr/local/lib/perl5/site_perl

-- 
View this message in context: http://www.nabble.com/Spamassassin-Bayes-not-working-with-Procmail-tp15248899p15249278.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.