Re: Sitewide SQL bayes?

2006-09-22 Thread Tim Rosmus
On Fri, 22 Sep 2006, Tim Rosmus wrote:

|# I then did a 'sa-learn --dump magic' on the DB server and
|# also on one of the incoming servers.  Why the different
|# numbers?  (I use bayes_sql_override_username on all)
|# 

Disregard, found the problem.   A slight spelling error for
the bayes_sql_override_username on the DB server.
-- 
        Tim Rosmus <[EMAIL PROTECTED]>
   Postmaster / USENET / DNS
Northwest Nexus Inc. / NetOS Inc.


Sitewide SQL bayes?

2006-09-22 Thread Tim Rosmus

SA-3.1.5

I recently moved from individual incoming machine Bayes DBs
to a central MySql Bayes that all incoming servers connect
to.   I noticed that running 'sa-learn --force-expire'
on the DB server worked the first time but has done nothing
in the last few weeks.   A "--dump magic" shows the same
numbers each day.

I then did a 'sa-learn --dump magic' on the DB server and
also on one of the incoming servers.  Why the different
numbers?  (I use bayes_sql_override_username on all)

DB Server
=
0.000  0  3  0  non-token data: bayes db version
0.000  0 870921  0  non-token data: nspam
0.000  01860058  0  non-token data: nham
0.000  0 165567  0  non-token data: ntokens
0.000  0 1158164112  0  non-token data: oldest atime
0.000  0 1158306146  0  non-token data: newest atime
0.000  0  0  0  non-token data: last journal sync atime
0.000  0 1158920635  0  non-token data: last expiry atime
0.000  0  86400  0  non-token data: last expire atime delta
0.000  0  21899  0  non-token data: last expire reduction 
count

Mail Server
==
0.000  0  3  0  non-token data: bayes db version
0.000  0   6999  0  non-token data: nspam
0.000  0  25847  0  non-token data: nham
0.000  01000393  0  non-token data: ntokens
0.000  0 1158260598  0  non-token data: oldest atime
0.000  0 1158950372  0  non-token data: newest atime
0.000  0  0  0  non-token data: last journal sync atime
0.000  0  0  0  non-token data: last expiry atime
0.000  0  0  0  non-token data: last expire atime delta
0.000  0  0  0  non-token data: last expire reduction 
count

I have confirmed that all servers are talking to the DB servers
for Bayes info.   The numbers change on the mail server output
but the numbers from sa-learn for the DB server never change.

What am I missing?  When I did the 'sa-learn --restore' to
copy over one of the existing Bayes DBs, should I have used
the --username to match the "bayes_sql_override_username" even
though it was also set on the DB server local.cf?
--
Tim Rosmus <[EMAIL PROTECTED]>
   Postmaster / USENET / DNS
Northwest Nexus Inc. / NetOS Inc.


Bayes conversion from DB to SQL question

2006-09-13 Thread Tim Rosmus

I've been running multiple in/out servers using Bayes and the local
Bayes DB storage on the local machine[s].  Now I am moving Bayes
to a site wide SQL setup.   My question is on the sa-learn backup/
restore from DB to SQL...

Should I backup/restore all local machine Bayes DB's to the central
SQL server, or should I only pick one machine that seems to have
the most actives Bayes DB, and just move that?

--
        Tim Rosmus <[EMAIL PROTECTED]>
   Postmaster / USENET / DNS
Northwest Nexus Inc. / NetOS Inc.


Re: DNSing MX to 127.0.0.1: Ruleset (or something) for this?

2006-08-14 Thread Tim Rosmus
On Tue, 15 Aug 2006, Guy Waugh wrote:

|# Theo Van Dinter wrote:
|# > On Tue, Aug 15, 2006 at 08:41:27AM +1000, Guy Waugh wrote:
|# > 
|# > > Aug 15 05:01:35 mailserver sendmail[13287]: k7EJ1YE7013287: SYSERR(root):
|# > > localhost.fabulous.com. config error: mail loops back to me (MX problem?)
|# > > 
|# The above stuff appears in my logs when, for example, our MX receives
|# spam for an unknown local user and tries to bounce the mail back to the
|# sender. The sender domain's MX resolves to 127.0.0.1 (or similar), and
|# the above occurs. I was thinking of a test whereby something on my MTA
|# looks up the MX of every sender domain of every email, and if it
|# resolves to localhost, the email is rejected (discarded/whatever) at
|# that point.
|# 

In Postfix one can do this simply with the following.

# grep 127 mx-ns_cidr_access  (file containing CIDR blocks)
127.0.0.0/8 REJECT Loopback Address 127.0.0.0/8

in main.cf (whatever restriction class you choose)...
check_sender_mx_access cidr:mx-ns_cidr_access
-- 
Tim Rosmus <[EMAIL PROTECTED]>
   Postmaster / USENET / DNS
Northwest Nexus Inc. / NetOS Inc.


Re: Bayes mysql db error

2005-11-02 Thread Tim Rosmus
On Wed, 2 Nov 2005, jdow wrote:

|# On Mittwoch, 2. November 2005 15:25 Mike Loiterman wrote:
|# > 8:24:50 [EMAIL PROTECTED]: /home/mike]# spamassassin -D --lint >
|# > debug.txt 2>&1
|# > Ambiguous output redirect.
|# 
|# Arhm - is that a Unix box? I can't imagine where that error comes from. Try
|# 

It comes from attempting to use "2>&1" with csh or tcsh as the users shell.
To redirect STDERR to STDOUT under these shells, use ">&" or "|&" only.

|# spamassassin -D --lint 2>&1|cat >debug.txt
|# or
|# spamassassin -D --lint 2>&1|mail mike
|# (this last line to receive it as mail)
|# 

spamassassin -D --lint >& debug.txt
or
spamassassin -D --lint |& mail mike
-- 
Tim Rosmus <[EMAIL PROTECTED]>
   Postmaster / USENET / DNS
Northwest Nexus Inc. / NetOS Inc.


Re: Net::DNS problem?

2005-06-10 Thread Tim Rosmus
On Fri, 10 Jun 2005, Justin Mason wrote:

|# btw, have you reported this to the Net::DNS maintainers?
|# it'd be good to fix this upstream (as I don't think there's
|# much we can do inside SpamAssassin).
|# 

0.51 has already been released that addresses the overlooked debug
statement  (http://www.net-dns.org/).I still get failures in
the "11-escapedchars.t" test under Solaris-8/Perl-5.8.6 though.
-- 
    Tim Rosmus <[EMAIL PROTECTED]>
   Postmaster / USENET / DNS
  Northwest Nexus Inc.


Re: Net::DNS problem?

2005-06-10 Thread Tim Rosmus
On Fri, 10 Jun 2005, E. Falk wrote:

|# I should mention that I cannot determine the source of this problem exactly,
|# but if I ran "make test" on 0.50 the "escapedchar" tests failed. If I went
|# ahead and installed it anyway, I got the remote addr struc errors unless I
|# told SpamAssassin that dns was not available (not a good option since it
|# meant I couldn't use SURBL!)
|# 
|# So I looked at the changelog to figure out when these escapedchar tests were
|# put in, and it appeared to be pretty recent. Regressing to 0.48 seemed to do
|# be far enough back to get rid of those tests and now everything works.
|# 
|# > > scanhub02:~ # spamassassin --lint
|# > > ;; remote addr struc: 02357f01

Here's what I did for this

*** lib/Net/DNS/Resolver/Base.pm.orig   Fri Jun 10 09:33:33 2005
--- lib/Net/DNS/Resolver/Base.pmFri Jun 10 09:33:53 2005
***
*** 1059,1065 
  
  
print ";; bgsend($ns_address : $dstport)\n" if $self->{'debug'};
!   print ";; remote addr struc: ".unpack("H*", $dst_sockaddr)."\n";
  
foreach my $socket (@socket){
next if !defined $socket;
--- 1059,1065 
  
  
print ";; bgsend($ns_address : $dstport)\n" if $self->{'debug'};
!   print ";; remote addr struc: ".unpack("H*", $dst_sockaddr)."\n" if 
$self->{'debug'};
  
foreach my $socket (@socket){
next if !defined $socket;


As for the "escapedchar" tests, this also failed for me under Solaris
but worked under Alpha NetBSD 2.02.   I installed it anyway and all
is running fine.
-- 
Tim Rosmus <[EMAIL PROTECTED]>
   Postmaster / USENET / DNS
  Northwest Nexus Inc.