You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2004/07/07 21:43:46 UTC

Re: Problem with Perl interface and RBL

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


It could be related to
http://bugzilla.spamassassin.org/show_bug.cgi?id=3538 , or it could be
that there's another bug where Mail::SpamAssassin is requiring
handle_user() or init() to be called?  not sure.

- --j.


Eric Vaandering writes:
> Hi,
> 
> I'm the author of IMAPAssassin which uses the Perl interface to SpamAssassin 
> to delete e-mail from an IMAP server. A new problem has cropped up, either 
> related to a new OS or to a new version of SA. Everything seems to work fine 
> (AWL, Bayes, rules) except that I can't get it to do the RBL checks. Running 
> spamassassin from the command line with the same config files, perl, etc. will 
> do the RBL checks. If I turn debug on for both, here's an excerpt of what I get:
> 
> Command line:
> 
> debug: Score set 3 chosen.
> debug: Initialising learner
> debug: received-header: parsed as [ ip=131.225.111.11 rdns=mailgw1.fnal.gov 
> helo= by=imapservera.fnal.gov ident= ]
> debug: received-header: parsed as [ ip=131.225.111.4 rdns=hepa1.fnal.gov 
> helo=hepa1.fnal.gov by=mailgw1.fnal.gov ident= ]
> debug: received-header: parsed as [ ip=62.42.54.87 
> rdns=VA1-RAS-9-u-0086.du.onolab.com helo=VA1-RAS-9-u-0086.du.onolab.com 
> by=hepa1.fnal.gov ident= ]
> debug: received-header: parsed as [ ip=49.40.116.210 
> rdns=marceau-dns.uswestmail.net helo= by=b889-wm13.uswestmail.net ident= ]
> debug: dns_available set to yes in config file, skipping test
> debug: received-header: 'from' 131.225.111.11 is near to first 'by'
> debug: received-header: relay 131.225.111.11 trusted? yes
> debug: received-header: 'from' 131.225.111.4 is near to first 'by'
> debug: received-header: relay 131.225.111.4 trusted? yes
> debug: received-header: 'by' hepa1.fnal.gov has public IP 131.225.111.4
> debug: received-header: relay 62.42.54.87 trusted? no
> debug: received-header: relay 49.40.116.210 trusted? no
> debug: Loading languages file...
> debug: Can't determine language uniquely enough
> debug: is Net::DNS::Resolver available? yes
> debug: all '*From' addrs: JYLIB@telusplanet.net
> debug: running header regexp tests; score so far=0
> debug: running body-text per-line regexp tests; score so far=0
> debug: bayes corpus size: nspam = 1608, nham = 6321
> debug: uri tests: Done uriRE
> debug: tokenize: header tokens for *p = "U*JYLIB D*telusplanet.net D*net"
> debug: tokenize: header tokens for *F = "U*JYLIB D*telusplanet.net D*net"
> [...]
> debug: bayes token 'UD:biz' => 0.999667864845435
> debug: bayes token 'sk:www.get' => 0.996723404255319
> 
> [...]
> debug: bayes token 'N:H*r:NN.NN.NN' => 0.84608226862543
> debug: bayes: score = 1
> debug: using "/home/vondo/.spamassassin" for user state dir
> debug: bayes: 31358 untie-ing
> debug: bayes: 31358 untie-ing db_toks
> debug: bayes: 31358 untie-ing db_seen
> debug: Razor2 is not available
> debug: running raw-body-text per-line regexp tests; score so far=0.787
> debug: running uri tests; score so far=1.348
> debug: uri tests: Done uriRE
> debug: running full-text regexp tests; score so far=1.448
> debug: Razor2 is not available
> debug: Current PATH is: /home/vondo/bin[...]
> debug: Pyzor is not available: pyzor not found
> debug: DCCifd is not available: no r/w dccifd socket found.
> debug: DCC is not available: no executable dccproc found.
> debug: all '*To' addrs: ewv@imapserver1.fnal.gov ewv@fnal.gov
> debug: DNS MX records found: 2
> debug: forged-HELO: from=onolab.com helo=onolab.com by=fnal.gov
> debug: forged-HELO: from=uswestmail.net helo= by=uswestmail.net
> debug: forged-HELO: mismatch on from: 'onolab.com' != 'uswestmail.net'
> debug: RBL: success for 16 of 17 queries
> debug: RBL: timeout for sorbs after 2 seconds
> 
> while from my own interface to the Perl methods, I get
> 
> debug: Score set 3 chosen.
> debug: Initialising learner
> debug: Loading languages file...
> debug: Language possibly: en,de
> debug: dns_available set to yes in config file, skipping test
> debug: is Net::DNS::Resolver available? yes
> debug: all '*From' addrs: ewv@fnal.gov
> debug: running header regexp tests; score so far=0
> debug: running body-text per-line regexp tests; score so far=0
> debug: bayes corpus size: nspam = 1608, nham = 6320
> debug: uri tests: Done uriRE
> debug: tokenize: header tokens for *p = "U*ewv D*fnal.gov D*gov"
> debug: tokenize: header tokens for *F = "U*ewv D*fnal.gov D*gov"
> 
> [...]
> 
> debug: bayes token 'H*u:5.0' => 2.76024831973732e-05
> debug: bayes token 'H*u:Gecko' => 2.76024831973732e-05
> [...]
> debug: bayes token 'expressed' => 0.116289229567425
> debug: bayes: score = 0
> debug: using "/home/vondo/.spamassassin" for user state dir
> debug: bayes: 30798 untie-ing
> debug: bayes: 30798 untie-ing db_toks
> debug: bayes: 30798 untie-ing db_seen
> debug: Razor2 is not available
> debug: running raw-body-text per-line regexp tests; score so far=0
> debug: running uri tests; score so far=0
> debug: uri tests: Done uriRE
> debug: running full-text regexp tests; score so far=0
> debug: Razor2 is not available
> debug: Current PATH is: 
> .:/home/vondo/bin:/fnal/ups/prd/ups/v4_7_1/Linux-2/bin:/usr/krb5/bin:.:/home/vondo/bin:/usr/krb5/bin:.:/home/vondo/bin:/usr/krb5/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/bin:/usr/sbin:/usr/bin/mh:/usr/X11R6/bin:/usr/local/bin:/usr/sbin:/usr/bin/mh:/usr/local/bin:/usr/sbin:/usr/bin/mh:/usr/local/pgi/linux86/bin:/usr/local/lib/netscape/plugins
> debug: Pyzor is not available: pyzor not found
> debug: DCCifd is not available: no r/w dccifd socket found.
> debug: DCC is not available: no executable dccproc found.
> debug: all '*To' addrs: ewv@imapserver1.fnal.gov ewv@fnal.gov
> debug: DNS MX records found: 1
> debug: RBL: success for 1 of 1 queries
> debug: running meta tests; score so far=0
> 
> These aren't the same message, but this is what I always see: The Perl 
> interfaced version always come back with 1 of 1 queries.
> 
> My SA object it initialized with:
> 
> my $SpamTest = Mail::SpamAssassin -> new({debug=>1});
> 
> Any ideas?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFA7FJxQTcbUG5Y7woRAmQhAJ44OoOS+fQpiKRwxdX6qA4G2Nix7gCfaQE3
AlpdQHYYKvKhyp7BjIUzIOE=
=s7C6
-----END PGP SIGNATURE-----


Re: Problem with Perl interface and RBL

Posted by Eric Vaandering <ew...@fnal.gov>.
Well, the ruleset is basically the default with an addition or two, so I don't 
think that's exactly the issue, (if I understood the bugzilla correctly).

Thanks,

Eric


Justin Mason wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> It could be related to
> http://bugzilla.spamassassin.org/show_bug.cgi?id=3538 , or it could be
> that there's another bug where Mail::SpamAssassin is requiring
> handle_user() or init() to be called?  not sure.
> 
> - --j.
> 
> 
> Eric Vaandering writes:
> 
>>Hi,
>>
>>I'm the author of IMAPAssassin which uses the Perl interface to SpamAssassin 
>>to delete e-mail from an IMAP server. A new problem has cropped up, either 
>>related to a new OS or to a new version of SA. Everything seems to work fine 
>>(AWL, Bayes, rules) except that I can't get it to do the RBL checks. Running 
>>spamassassin from the command line with the same config files, perl, etc. will 
>>do the RBL checks. If I turn debug on for both, here's an excerpt of what I get:
>>
>>Command line:
>>
>>debug: Score set 3 chosen.
>>debug: Initialising learner
>>debug: received-header: parsed as [ ip=131.225.111.11 rdns=mailgw1.fnal.gov 
>>helo= by=imapservera.fnal.gov ident= ]
>>debug: received-header: parsed as [ ip=131.225.111.4 rdns=hepa1.fnal.gov 
>>helo=hepa1.fnal.gov by=mailgw1.fnal.gov ident= ]
>>debug: received-header: parsed as [ ip=62.42.54.87 
>>rdns=VA1-RAS-9-u-0086.du.onolab.com helo=VA1-RAS-9-u-0086.du.onolab.com 
>>by=hepa1.fnal.gov ident= ]
>>debug: received-header: parsed as [ ip=49.40.116.210 
>>rdns=marceau-dns.uswestmail.net helo= by=b889-wm13.uswestmail.net ident= ]
>>debug: dns_available set to yes in config file, skipping test
>>debug: received-header: 'from' 131.225.111.11 is near to first 'by'
>>debug: received-header: relay 131.225.111.11 trusted? yes
>>debug: received-header: 'from' 131.225.111.4 is near to first 'by'
>>debug: received-header: relay 131.225.111.4 trusted? yes
>>debug: received-header: 'by' hepa1.fnal.gov has public IP 131.225.111.4
>>debug: received-header: relay 62.42.54.87 trusted? no
>>debug: received-header: relay 49.40.116.210 trusted? no
>>debug: Loading languages file...
>>debug: Can't determine language uniquely enough
>>debug: is Net::DNS::Resolver available? yes
>>debug: all '*From' addrs: JYLIB@telusplanet.net
>>debug: running header regexp tests; score so far=0
>>debug: running body-text per-line regexp tests; score so far=0
>>debug: bayes corpus size: nspam = 1608, nham = 6321
>>debug: uri tests: Done uriRE
>>debug: tokenize: header tokens for *p = "U*JYLIB D*telusplanet.net D*net"
>>debug: tokenize: header tokens for *F = "U*JYLIB D*telusplanet.net D*net"
>>[...]
>>debug: bayes token 'UD:biz' => 0.999667864845435
>>debug: bayes token 'sk:www.get' => 0.996723404255319
>>
>>[...]
>>debug: bayes token 'N:H*r:NN.NN.NN' => 0.84608226862543
>>debug: bayes: score = 1
>>debug: using "/home/vondo/.spamassassin" for user state dir
>>debug: bayes: 31358 untie-ing
>>debug: bayes: 31358 untie-ing db_toks
>>debug: bayes: 31358 untie-ing db_seen
>>debug: Razor2 is not available
>>debug: running raw-body-text per-line regexp tests; score so far=0.787
>>debug: running uri tests; score so far=1.348
>>debug: uri tests: Done uriRE
>>debug: running full-text regexp tests; score so far=1.448
>>debug: Razor2 is not available
>>debug: Current PATH is: /home/vondo/bin[...]
>>debug: Pyzor is not available: pyzor not found
>>debug: DCCifd is not available: no r/w dccifd socket found.
>>debug: DCC is not available: no executable dccproc found.
>>debug: all '*To' addrs: ewv@imapserver1.fnal.gov ewv@fnal.gov
>>debug: DNS MX records found: 2
>>debug: forged-HELO: from=onolab.com helo=onolab.com by=fnal.gov
>>debug: forged-HELO: from=uswestmail.net helo= by=uswestmail.net
>>debug: forged-HELO: mismatch on from: 'onolab.com' != 'uswestmail.net'
>>debug: RBL: success for 16 of 17 queries
>>debug: RBL: timeout for sorbs after 2 seconds
>>
>>while from my own interface to the Perl methods, I get
>>
>>debug: Score set 3 chosen.
>>debug: Initialising learner
>>debug: Loading languages file...
>>debug: Language possibly: en,de
>>debug: dns_available set to yes in config file, skipping test
>>debug: is Net::DNS::Resolver available? yes
>>debug: all '*From' addrs: ewv@fnal.gov
>>debug: running header regexp tests; score so far=0
>>debug: running body-text per-line regexp tests; score so far=0
>>debug: bayes corpus size: nspam = 1608, nham = 6320
>>debug: uri tests: Done uriRE
>>debug: tokenize: header tokens for *p = "U*ewv D*fnal.gov D*gov"
>>debug: tokenize: header tokens for *F = "U*ewv D*fnal.gov D*gov"
>>
>>[...]
>>
>>debug: bayes token 'H*u:5.0' => 2.76024831973732e-05
>>debug: bayes token 'H*u:Gecko' => 2.76024831973732e-05
>>[...]
>>debug: bayes token 'expressed' => 0.116289229567425
>>debug: bayes: score = 0
>>debug: using "/home/vondo/.spamassassin" for user state dir
>>debug: bayes: 30798 untie-ing
>>debug: bayes: 30798 untie-ing db_toks
>>debug: bayes: 30798 untie-ing db_seen
>>debug: Razor2 is not available
>>debug: running raw-body-text per-line regexp tests; score so far=0
>>debug: running uri tests; score so far=0
>>debug: uri tests: Done uriRE
>>debug: running full-text regexp tests; score so far=0
>>debug: Razor2 is not available
>>debug: Current PATH is: 
>>.:/home/vondo/bin:/fnal/ups/prd/ups/v4_7_1/Linux-2/bin:/usr/krb5/bin:.:/home/vondo/bin:/usr/krb5/bin:.:/home/vondo/bin:/usr/krb5/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/bin:/usr/sbin:/usr/bin/mh:/usr/X11R6/bin:/usr/local/bin:/usr/sbin:/usr/bin/mh:/usr/local/bin:/usr/sbin:/usr/bin/mh:/usr/local/pgi/linux86/bin:/usr/local/lib/netscape/plugins
>>debug: Pyzor is not available: pyzor not found
>>debug: DCCifd is not available: no r/w dccifd socket found.
>>debug: DCC is not available: no executable dccproc found.
>>debug: all '*To' addrs: ewv@imapserver1.fnal.gov ewv@fnal.gov
>>debug: DNS MX records found: 1
>>debug: RBL: success for 1 of 1 queries
>>debug: running meta tests; score so far=0
>>
>>These aren't the same message, but this is what I always see: The Perl 
>>interfaced version always come back with 1 of 1 queries.
>>
>>My SA object it initialized with:
>>
>>my $SpamTest = Mail::SpamAssassin -> new({debug=>1});
>>
>>Any ideas?
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> Comment: Exmh CVS
> 
> iD8DBQFA7FJxQTcbUG5Y7woRAmQhAJ44OoOS+fQpiKRwxdX6qA4G2Nix7gCfaQE3
> AlpdQHYYKvKhyp7BjIUzIOE=
> =s7C6
> -----END PGP SIGNATURE-----
> 


-- 
Eric Vaandering           Phone: 615-343-6599     FAX: 615-343-7217
  Vanderbilt University    Email: ewv@fnal.gov
  Department of Physics    http://www.hep.vanderbilt.edu/~vondo
______________________________________________________________________________
Colleges are places where pebbles are polished and diamonds are dimmed.
                                 -R. Ingersoll
______________________________________________________________________________
If at first you don't succeed, you are running about average.