what is this telling me in spam assassin -D --lint ?

2016-02-12 Thread Robert Chalmers
Is this a setting somewhere that I should have in place?

Feb 12 09:09:30.509 [73122] dbg: config: fixed relative path: 
/opt/local/var/spamassassin/3.004001/updates_spamassassin_org/10_default_prefs.cf
Feb 12 09:09:30.509 [73122] dbg: config: using 
"/opt/local/var/spamassassin/3.004001/updates_spamassassin_org/10_default_prefs.cf"
 for included file

thanks


Robert Chalmers
rob...@chalmers.com .au  Quantum Radio: 
http://tinyurl.com/lwwddov
Mac mini 6.2 - 2012, Intel Core i7,2.3 GHz, Memory:16 GB. El-Capitan 10.11. 2TB 
Storage made up of - 
Drive 0:HGST HTS721010A9E630. Upper bay. Drive 1:ST1000LM024 HN-M101MBB. Lower 
Bay





Re: How do I actually add these descriptions then...

2016-02-12 Thread Robert Chalmers
Yes well, back again.

sa-update is running, and supposedly updating rules.
spam assassin -D —lint still shows a long list… however, no longer shows that 
first one from a while back…


Feb 12 09:09:30.977 [73122] dbg: config: warning: no description set for 
HK_SCAM_N2
Feb 12 09:09:30.977 [73122] dbg: config: warning: no description set for 
HK_SCAM_N3
Feb 12 09:09:30.978 [73122] dbg: config: warning: no description set for 
BASE64_LENGTH_78_79
Feb 12 09:09:30.979 [73122] dbg: config: warning: no description set for 
TVD_IP_OCT
Feb 12 09:09:30.979 [73122] dbg: config: warning: no description set for 
RCVD_IN_MSPIKE_ZBI
Feb 12 09:09:30.980 [73122] dbg: config: warning: no description set for 
JM_TORA_XM
Feb 12 09:09:30.980 [73122] dbg: config: warning: no description set for 
STOX_REPLY_TYPE
Feb 12 09:09:30.981 [73122] dbg: config: warning: no description set for 
FSL_HELO_NON_FQDN_1
Feb 12 09:09:30.981 [73122] dbg: config: warning: no description set for 
JM_RCVD_QMAILV1
Feb 12 09:09:30.981 [73122] dbg: config: warning: no description set for 
LOTTERY_1
Feb 12 09:09:30.981 [73122] dbg: config: warning: no description set for 
TVD_FINGER_02
Feb 12 09:09:30.982 [73122] dbg: config: warning: no description set for 
STOX_AND_PRICE
Feb 12 09:09:30.982 [73122] dbg: config: warning: no description set for 
RCVD_IN_BRBL_LASTEXT
Feb 12 09:09:30.982 [73122] dbg: config: warning: no description set for 
FSL_HELO_BARE_IP_2
Feb 12 09:09:30.982 [73122] dbg: config: warning: no description set for 
HK_NAME_FM_MR_MRS
Feb 12 09:09:30.982 [73122] dbg: config: warning: no description set for 
FSL_HELO_SETUP
Feb 12 09:09:30.983 [73122] dbg: config: warning: no description set for 
DKIM_POLICY_SIGNALL
Feb 12 09:09:30.983 [73122] dbg: config: warning: no description set for 
HELO_FRIEND
Feb 12 09:09:30.983 [73122] dbg: config: warning: no description set for 
TVD_RCVD_SPACE_BRACKET
Feb 12 09:09:30.984 [73122] dbg: config: warning: no description set for 
TVD_SPACE_RATIO
Feb 12 09:09:30.984 [73122] dbg: config: warning: no description set for 
CURR_PRICE
Feb 12 09:09:30.984 [73122] dbg: config: warning: no description set for 
FSL_FAKE_HOTMAIL_RVCD
Feb 12 09:09:30.985 [73122] dbg: config: warning: no description set for 
FROM_MISSP_SPF_FAIL
Feb 12 09:09:30.985 [73122] dbg: config: warning: no description set for 
HK_LOTTO
Feb 12 09:09:30.985 [73122] dbg: config: warning: no description set for 
FAKE_REPLY_C
Feb 12 09:09:30.985 [73122] dbg: config: warning: no description set for 
TVD_IP_HEX
Feb 12 09:09:30.985 [73122] dbg: config: warning: no description set for 
LIVEFILESTORE
Feb 12 09:09:30.985 [73122] dbg: config: warning: no description set for 
X_MAILER_CME_6543_MSN
Feb 12 09:09:30.986 [73122] dbg: config: warning: no description set for 
HK_SCAM_N1
Feb 12 09:09:30.986 [73122] dbg: config: warning: no description set for 
KB_RATWARE_MSGID
Feb 12 09:09:30.986 [73122] dbg: config: warning: no description set for 
HIGH_CODEPAGE_URI
Feb 12 09:09:30.986 [73122] dbg: config: warning: no description set for 
FSL_HELO_DEVICE
Feb 12 09:09:30.986 [73122] dbg: config: warning: no description set for 
SB_GIF_AND_NO_URIS
Feb 12 09:09:30.986 [73122] dbg: config: warning: no description set for 
FSL_HELO_FAKE
Feb 12 09:09:30.986 [73122] dbg: config: warning: no description set for 
GEO_QUERY_STRING
Feb 12 09:09:30.986 [73122] dbg: config: warning: no description set for 
KB_RATWARE_OUTLOOK_08
Feb 12 09:09:30.987 [73122] dbg: config: warning: no description set for 
RCVD_FORGED_WROTE2
Feb 12 09:09:30.987 [73122] dbg: config: warning: no description set for 
HELO_LOCALHOST
Feb 12 09:09:30.987 [73122] dbg: config: warning: no description set for 
HK_SCAM_N15
Feb 12 09:09:30.987 [73122] dbg: config: warning: no description set for 
HK_NAME_DR
Feb 12 09:09:30.988 [73122] dbg: config: warning: no description set for 
JM_I_FEEL_LUCKY
Feb 12 09:09:30.988 [73122] dbg: config: warning: no description set for 
KB_FAKED_THE_BAT
Feb 12 09:09:30.988 [73122] dbg: config: warning: no description set for 
PDS_FROM_2_EMAILS
Feb 12 09:09:30.988 [73122] dbg: config: warning: no description set for 
KB_DATE_CONTAINS_TAB
Feb 12 09:09:30.988 [73122] dbg: config: warning: no description set for 
HTTPS_HTTP_MISMATCH
Feb 12 09:09:30.988 [73122] dbg: config: warning: no description set for 
KB_RATWARE_OUTLOOK_12
Feb 12 09:09:30.988 [73122] dbg: config: warning: no description set for 
SHORT_TERM_PRICE
Feb 12 09:09:30.989 [73122] dbg: config: warning: no description set for 
HK_SCAM_N8
Feb 12 09:09:30.989 [73122] dbg: config: warning: no description set for 
LONG_TERM_PRICE
Feb 12 09:09:30.989 [73122] dbg: config: warning: no description set for 
THEBAT_UNREG
Feb 12 09:09:30.990 [73122] dbg: config: warning: no description set for 
REPLYTO_WITHOUT_TO_CC
Feb 12 09:09:30.990 [73122] dbg: config: warning: no description set for 
MID_DEGREES
Feb 12 09:09:30.991 [73122] dbg: config: warning: no description set for 
LOTTERY_PH_004470
Feb 12 09:09:30.991 [73122] dbg: 

Re: URIBL/DNSBL from a database

2016-02-12 Thread Martin Gregorie
On Fri, 2016-02-12 at 08:39 -0500, Alex wrote:
> Is it possible for spamassassin to query a database directly?
> 
Yes, with a plugin. 

I've been doing the opposite for some years now: I archive all my
outgoing mail and most of my non-spam incoming mail in a Postgres
database and use this as a whitelist: incoming mail from anybody that
I've sent mail to gets whitelisted. I use a plugin to query the
database via a view: the view is there to present the list of addresses
to which I've sent mail to the plugin's SQL query: its needed for
performance reasons because the database uses a many-to-many structure
to associate addresses with the messages they send or receive. 

It should be simple enough to change my plugin's query to work with
your database, particularly if you already have a table containing the
addresses you'd like to blacklist. Likewise, its probably fairly simple
to extend it to deal with the URLs and IPs from message bodies. 

If you'd like a copy of the plugin plus the associated .cf file[*],
contact me offlist.


Martin

[*] this loads and configures the plugin with database login details
and defines the rule that whitelists hits.




URIBL/DNSBL from a database

2016-02-12 Thread Alex
Hi,

For some time now I've been cycling URLs and IPs through  a mariadb
database gathered from incoming mail on a honeypot I've created.
Surprising how many are received ahead of spamhaus/barracuda.

I'm looking for ideas on how to now make this information available to
spamassassin on my production system. I'd like to somehow export the
IPs, any URLs in the body, and email addresses to spamassassin.

Is it possible for spamassassin to query a database directly?

I'm familiar with how to create a uridnsbl, but is DNS the best
approach here? The info needs to be updated and reloaded rapidly, and
not all the info (URLs, emails) are conducive to being in DNS.

Is anyone else doing this, and are you just rejecting the IPs at the
SMTP level outright?

Thanks,
Alex


Re: URIBL/DNSBL from a database

2016-02-12 Thread David Jones
>
>From: Alex 

>For some time now I've been cycling URLs and IPs through  a mariadb
>database gathered from incoming mail on a honeypot I've created.
>Surprising how many are received ahead of spamhaus/barracuda.

Major RBLs like that keep up with lots of data points for IP reputation
over time so that can give a little extra time for normally reputable IPs
that happen to have a compromised account -- which happens to us
all.  But if you don't detect compromised accounts on your system
through feedback loops and abuse reports, then a reputable IP can
eventually get listed on those major RBLs.

>Is anyone else doing this, and are you just rejecting the IPs at the
>SMTP level outright?

DNS is very effective to block at the MTA level.  I setup my own private
RBL on the DNS servers my SA boxes point to.  Dump your IPs into a
rbldnsd formatted zone file and setup your private RBL zone (doesn't
have to be a real zone on the Internet) to forward to rbldnsd.  Rbldnsd
will detect changes to it's zone files and reload them automatically to
keep current.

Then I have a nightly script that goes through my list of IPs in my private
RBL to remove them if they show up in another major RBL that I use.  This
prevents my list from becoming stale in the event that the IP becomes
delisted from the public RBLs.

In a related note, I have found that using the senderscore.org score combined
with postscreen's weighting is very effective in quickly catching new spammers.

postscreen_dnsbl_sites =
  score.senderscore.com=127.0.4.[60..69]*2
  score.senderscore.com=127.0.4.[50..59]*4
  score.senderscore.com=127.0.4.[30..49]*6
  score.senderscore.com=127.0.4.[0..29]*8
  score.senderscore.com=127.0.4.[90..100]*-6
  score.senderscore.com=127.0.4.[80..89]*-4
  score.senderscore.com=127.0.4.[70..79]*-2

You should monitor your own outbound IPs for their sender score.  If your
IP goes below 90, it's a good indication that you have been sending spam
and that your users are going to start experiencing delivery issues to the
Internet.

Dave

Re: Child-related errors

2016-02-12 Thread RW
On Thu, 11 Feb 2016 21:05:26 +
Martin Gregorie wrote:

> On Thu, 2016-02-11 at 19:09 +, RW wrote:
> > On Thu, 11 Feb 2016 12:02:13 +
> > Martin Gregorie wrote:
> >   
> > > Every so often I see the following in my nightly logwatch rep
> > > 
> > > Child-related errors
> > > spamd: cannot send SIGINT to child process [___]: No such
> > > process:

> > Is it literally "[___]" in the log? 
> >   
> No, that looks like logwatch's doing because, in maillog the child's
> PID is inside the square brackets.
> 
> This only happens during a shutdown:

Yes, the warning comes from the  SIGTERM/SIGINT handler, in the main
spamd process, when it tries to kill all the children.

Child processes are reaped in the SIGCHLD handler, but the PIDs are
removed from the list later in the select loop, so there is a window
where the SIGINT handler could find such a PID. 



> Feb  7 00:29:22 zoogz spamd[9347]: spamd: server killed by SIGTERM,
> shutting down
> Feb  7 00:29:22 zoogz spamd[9347]: spamd: cannot send SIGINT to child
> process [9352]: No such process
> Feb  7 00:29:22 zoogz spamd[9347]: spamd: cannot send SIGINT to child
> process [9353]: No such process

I do find it a bit strange that in both examples there are two child
processes involved. I tried to reproduce this, but only saw one at a
time. 


Re: URIBL/DNSBL from a database

2016-02-12 Thread Axb

On 02/12/2016 02:39 PM, Alex wrote:

Hi,

For some time now I've been cycling URLs and IPs through  a mariadb
database gathered from incoming mail on a honeypot I've created.
Surprising how many are received ahead of spamhaus/barracuda.

I'm looking for ideas on how to now make this information available to
spamassassin on my production system. I'd like to somehow export the
IPs, any URLs in the body, and email addresses to spamassassin.

Is it possible for spamassassin to query a database directly?


You'd need a custom plugin query the DB directly.



I'm familiar with how to create a uridnsbl, but is DNS the best
approach here?

DNS is cheap/reliable and simple to deploy / load balance.


The info needs to be updated and reloaded rapidly, and
not all the info (URLs, emails) are conducive to being in DNS.


rbldnsd can check and load fresh data instantly within seconds.
If your dataset is not HUGE (loading 100MB zones is slow) rbldnspy will 
take inmemory updates so instant listings...

https://github.com/gryphius/rbldnspy





Re: URIBL/DNSBL from a database

2016-02-12 Thread Shawn Bakhtiar

On Feb 12, 2016, at 5:39 AM, Alex 
> wrote:

Hi,

For some time now I've been cycling URLs and IPs through  a mariadb
database gathered from incoming mail on a honeypot I've created.
Surprising how many are received ahead of spamhaus/barracuda.

I'm looking for ideas on how to now make this information available to
spamassassin on my production system. I'd like to somehow export the
IPs, any URLs in the body, and email addresses to spam assassin.

DNSBLs are very effective at this task, and I would recommend using before you 
filter the email with SA, unless you specifically want to score, due to 
uncertainty.


Is it possible for spamassassin to query a database directly?

It is:
https://spamassassin.apache.org/full/3.4.x/doc/Mail_SpamAssassin_Plugin_URIDNSBL.html

But even than I find it more effective having the server running the DNSBL 
manage the the block list using some metrics such as number of times the IP 
address appears, and/or not recording ip addresses in a whitelist table etc... 
Once (either via blacklist or metric) the IP gets into the DNSBL there is no 
need for me to worry about SA, simply reject. I find URI tend to change A LOT, 
so IP based blocking can be much more effective. But I think that's more of a 
preference.


I'm familiar with how to create a uridnsbl, but is DNS the best
approach here? The info needs to be updated and reloaded rapidly, and
not all the info (URLs, emails) are conducive to being in DNS.


That's the way I do it. using bind DLZ http://bind-dlz.sourceforge.net/
We have a delegated subdomain off our main domain that hosts a DNS exclusively 
used for block list, created from incoming mail sent to honeypot email address 
(ones that are no never were/or are no longer valid). Again I tend to focus on 
the IP address not the URI as a find that URI are dime a dozen and change quite 
frequently.

Is anyone else doing this, and are you just rejecting the IPs at the
SMTP level outright?

We use sendmail features to reject long before it gets to SA. It works better 
(IMHO) since there is much lower over head for sendmail doing a quick DNS 
lookup than engaging the milter that runs the email through it's passes with SA.

http://weldon.whipple.org/sendmail/dnsbl.html

But in this case it's IP based only not URI based. For URI (especially ones 
that you'll want to regex) SA may be more effective.


Thanks,
Alex



Re: URIBL/DNSBL from a database

2016-02-12 Thread Marc Perkel


On 02/12/16 05:39, Alex wrote:

Hi,

For some time now I've been cycling URLs and IPs through  a mariadb
database gathered from incoming mail on a honeypot I've created.
Surprising how many are received ahead of spamhaus/barracuda.

I'm looking for ideas on how to now make this information available to
spamassassin on my production system. I'd like to somehow export the
IPs, any URLs in the body, and email addresses to spamassassin.

Is it possible for spamassassin to query a database directly?

I'm familiar with how to create a uridnsbl, but is DNS the best
approach here? The info needs to be updated and reloaded rapidly, and
not all the info (URLs, emails) are conducive to being in DNS.

Is anyone else doing this, and are you just rejecting the IPs at the
SMTP level outright?

Thanks,
Alex




Yeah - unless you write your own SA module using DNS is the quick easy 
solution.


--
Marc Perkel - Sales/Support
supp...@junkemailfilter.com
http://www.junkemailfilter.com
Junk Email Filter dot com
415-992-3400



Re: Child-related errors

2016-02-12 Thread Martin Gregorie
On Fri, 2016-02-12 at 15:06 +, RW wrote:
> On Thu, 11 Feb 2016 21:05:26 +
> Martin Gregorie wrote:
> 
> > Feb  7 00:29:22 zoogz spamd[9347]: spamd: server killed by SIGTERM,
> > shutting down
> > Feb  7 00:29:22 zoogz spamd[9347]: spamd: cannot send SIGINT to
> > child
> > process [9352]: No such process
> > Feb  7 00:29:22 zoogz spamd[9347]: spamd: cannot send SIGINT to
> > child
> > process [9353]: No such process
> 
> I do find it a bit strange that in both examples there are two child
> processes involved. I tried to reproduce this, but only saw one at a
> time. 
>
Is that the default minimum number of child processes? I set max to 5
and default min because this is a personal system and I don't need any
more than that.
 

Martin




Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Sebastian Arcus
As per advice from this list, I have been re-using my bayes databases on 
several different servers running SA. On one of the servers though, the 
database is not accepted. I re-transferred them several times over ssh, 
to make sure they were not corrupted. The database files are in the 
correct location, with correct permissions and owned by the correct user:


# ls -l /var/spool/spamd/bayes/
total 5912
-rw-rw-rw- 1 spamd spamd 1310720 2016-02-09 08:42 bayes_seen
-rw-rw-rw- 1 spamd spamd 4739072 2016-02-09 08:43 bayes_toks

The version of SA on both the donor and receiving servers is 3.4.1.

When I try to learn a new message on the receiving server (where I moved 
the bayes files), I get the following error:


# su - spamd -c "/usr/bin/sa-learn -D --spam /New\ UnansweredSexHookup\ 
Request.eml"




Feb 12 16:20:53.777 [12973] dbg: locker: mode is 438
Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: created 
/var/spool/spamd/bayes/bayes.lock.mdr-server.mdrinteriors.co.uk.12973
Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: trying to get lock 
on /var/spool/spamd/bayes/bayes with 0 retries
Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: link to 
/var/spool/spamd/bayes/bayes.lock: link ok
Feb 12 16:20:53.778 [12973] dbg: bayes: tie-ing to DB file R/W 
/var/spool/spamd/bayes/bayes_toks

Feb 12 16:20:53.779 [12973] dbg: bayes: untie-ing DB file toks
Feb 12 16:20:53.779 [12973] dbg: locker: safe_unlock: unlink 
/var/spool/spamd/bayes/bayes.lock
bayes: cannot open bayes databases /var/spool/spamd/bayes/bayes_* R/W: 
tie failed: No such file or directory

Learned tokens from 0 message(s) (1 message(s) examined)
Feb 12 16:20:53.779 [12973] dbg: plugin: 
Mail::SpamAssassin::Plugin::Bayes=HASH(0x93106d0) implements 
'learner_close', priority 0
ERROR: the Bayes learn function returned an error, please re-run with -D 
for more information at /usr/bin/sa-learn line 498.




Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread John Hardin

On Fri, 12 Feb 2016, Sebastian Arcus wrote:


# ls -l /var/spool/spamd/bayes/
total 5912
-rw-rw-rw- 1 spamd spamd 1310720 2016-02-09 08:42 bayes_seen
-rw-rw-rw- 1 spamd spamd 4739072 2016-02-09 08:43 bayes_toks

When I try to learn a new message on the receiving server (where I moved the 
bayes files), I get the following error:


bayes: cannot open bayes databases /var/spool/spamd/bayes/bayes_* R/W: tie 
failed: No such file or directory


Directory permissions? Can the spamd user actually get to 
/var/spool/spamd/bayes/ ?


--
 John Hardin KA7OHZhttp://www.impsec.org/~jhardin/
 jhar...@impsec.orgFALaholic #11174 pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
---
  ...to announce there must be no criticism of the President or to
  stand by the President right or wrong is not only unpatriotic and
  servile, but is morally treasonous to the American public.
  -- Theodore Roosevelt, 1918
---
 Today: Abraham Lincoln's and Charles Darwin's 207th Birthdays


Re: URIBL/DNSBL from a database

2016-02-12 Thread Martin Gregorie
On Fri, 2016-02-12 at 07:30 -0800, Marc Perkel wrote:

> Yeah - unless you write your own SA module using DNS is the quick
> easy solution.
> 
If Alex already has a set of scripts that populate and maintain the
database that he's happy with, then the quick and easy way may be to
make a custom SA module by using my database access module as a
starting point. 

The benefits would be that he's already familiar the care and feeding
of his database and that he can update it any time without needing to
stop and restart anything.


Martin




Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Sebastian Arcus

On 12/02/16 16:59, Reindl Harald wrote:



Am 12.02.2016 um 17:29 schrieb Sebastian Arcus:

As per advice from this list, I have been re-using my bayes databases on
several different servers running SA. On one of the servers though, the
database is not accepted. I re-transferred them several times over ssh,
to make sure they were not corrupted. The database files are in the
correct location, with correct permissions and owned by the correct 
user:


# ls -l /var/spool/spamd/bayes/
total 5912
-rw-rw-rw- 1 spamd spamd 1310720 2016-02-09 08:42 bayes_seen
-rw-rw-rw- 1 spamd spamd 4739072 2016-02-09 08:43 bayes_toks

The version of SA on both the donor and receiving servers is 3.4.1.

When I try to learn a new message on the receiving server (where I moved
the bayes files), I get the following error:


su - spamd
stat /var
stat /var/spool
stat /var/spool/spamd
stat /var/spool/spamd/bayes

Linux is not like Windows - if ou don't have access to a parent folder 
you just don't have access





root@mdr-server:/# su - spamd
No directory, logging in with HOME=/

spamd@mdr-server:/$ stat /var
  File: `/var'
  Size: 4096  Blocks: 8  IO Block: 4096   directory
Device: 900h/2304dInode: 12  Links: 16
Access: (0755/drwxr-xr-x)  Uid: (0/root)   Gid: (0/ root)
Access: 2016-01-18 09:28:23.0 +
Modify: 2016-01-18 09:22:47.0 +
Change: 2016-01-18 09:28:23.744774236 +

spamd@mdr-server:/$ stat /var/spool
  File: `/var/spool'
  Size: 4096  Blocks: 8  IO Block: 4096   directory
Device: 900h/2304dInode: 118 Links: 22
Access: (0755/drwxr-xr-x)  Uid: (0/root)   Gid: (0/ root)
Access: 2015-02-03 14:28:33.0 +
Modify: 2015-12-03 17:41:28.859794403 +
Change: 2015-12-03 17:41:28.859794403 +

spamd@mdr-server:/$ stat /var/spool/spamd
  File: `/var/spool/spamd'
  Size: 4096  Blocks: 8  IO Block: 4096   directory
Device: 900h/2304dInode: 15473107Links: 3
Access: (0770/drwxrwx---)  Uid: ( 1037/   spamd)   Gid: (  252/ spamd)
Access: 2015-12-03 17:41:28.859794403 +
Modify: 2015-12-03 17:41:32.011239989 +
Change: 2015-12-03 17:46:59.187806044 +

spamd@mdr-server:/$ stat /var/spool/spamd/bayes/
  File: `/var/spool/spamd/bayes/'
  Size: 4096  Blocks: 8  IO Block: 4096   directory
Device: 900h/2304dInode: 15473106Links: 3
Access: (0776/drwxrwxrw-)  Uid: ( 1037/   spamd)   Gid: (  252/ spamd)
Access: 2015-12-03 17:41:32.011239989 +
Modify: 2016-02-12 16:20:53.778709980 +
Change: 2016-02-12 16:20:53.778709980 +



Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Reindl Harald



Am 12.02.2016 um 20:06 schrieb Marc Perkel:

Any chance that the parent directory structure doesn't have enough
permissions?

The error message says it can't access it so there's your clue. Since
the files themselves seem to have good permissions I would look at the
directories.


see previous mail - that was already verified
looking closer "No such file or directory" is not a permission problem

there was a hint "please re-run with -D"

at least re-use bayes on different servers, even over different 
operating systems is no problem, or bayes is running on 3 own and 2 
foreign machines for a long time now with great results



On 02/12/16 08:29, Sebastian Arcus wrote:

As per advice from this list, I have been re-using my bayes databases
on several different servers running SA. On one of the servers though,
the database is not accepted. I re-transferred them several times over
ssh, to make sure they were not corrupted. The database files are in
the correct location, with correct permissions and owned by the
correct user:

# ls -l /var/spool/spamd/bayes/
total 5912
-rw-rw-rw- 1 spamd spamd 1310720 2016-02-09 08:42 bayes_seen
-rw-rw-rw- 1 spamd spamd 4739072 2016-02-09 08:43 bayes_toks

The version of SA on both the donor and receiving servers is 3.4.1.

When I try to learn a new message on the receiving server (where I
moved the bayes files), I get the following error:

# su - spamd -c "/usr/bin/sa-learn -D --spam /New\
UnansweredSexHookup\ Request.eml"



Feb 12 16:20:53.777 [12973] dbg: locker: mode is 438
Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: created
/var/spool/spamd/bayes/bayes.lock.mdr-server.mdrinteriors.co.uk.12973
Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: trying to get lock
on /var/spool/spamd/bayes/bayes with 0 retries
Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: link to
/var/spool/spamd/bayes/bayes.lock: link ok
Feb 12 16:20:53.778 [12973] dbg: bayes: tie-ing to DB file R/W
/var/spool/spamd/bayes/bayes_toks
Feb 12 16:20:53.779 [12973] dbg: bayes: untie-ing DB file toks
Feb 12 16:20:53.779 [12973] dbg: locker: safe_unlock: unlink
/var/spool/spamd/bayes/bayes.lock
bayes: cannot open bayes databases /var/spool/spamd/bayes/bayes_* R/W:
tie failed: No such file or directory
Learned tokens from 0 message(s) (1 message(s) examined)
Feb 12 16:20:53.779 [12973] dbg: plugin:
Mail::SpamAssassin::Plugin::Bayes=HASH(0x93106d0) implements
'learner_close', priority 0
ERROR: the Bayes learn function returned an error, please re-run with
-D for more information at /usr/bin/sa-learn line 498




signature.asc
Description: OpenPGP digital signature


Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Sebastian Arcus

On 12/02/16 16:59, Reindl Harald wrote:



Am 12.02.2016 um 17:29 schrieb Sebastian Arcus:

As per advice from this list, I have been re-using my bayes databases on
several different servers running SA. On one of the servers though, the
database is not accepted. I re-transferred them several times over ssh,
to make sure they were not corrupted. The database files are in the
correct location, with correct permissions and owned by the correct 
user:


# ls -l /var/spool/spamd/bayes/
total 5912
-rw-rw-rw- 1 spamd spamd 1310720 2016-02-09 08:42 bayes_seen
-rw-rw-rw- 1 spamd spamd 4739072 2016-02-09 08:43 bayes_toks

The version of SA on both the donor and receiving servers is 3.4.1.

When I try to learn a new message on the receiving server (where I moved
the bayes files), I get the following error:


su - spamd
stat /var
stat /var/spool
stat /var/spool/spamd
stat /var/spool/spamd/bayes

Linux is not like Windows - if ou don't have access to a parent folder 
you just don't have access



Sorry - previous reply sent in HTML format by mistake:

root@mdr-server:/# su - spamd
No directory, logging in with HOME=/

spamd@mdr-server:/$ stat /var
  File: `/var'
  Size: 4096  Blocks: 8  IO Block: 4096   directory
Device: 900h/2304dInode: 12  Links: 16
Access: (0755/drwxr-xr-x)  Uid: (0/root)   Gid: (0/ root)
Access: 2016-01-18 09:28:23.0 +
Modify: 2016-01-18 09:22:47.0 +
Change: 2016-01-18 09:28:23.744774236 +

spamd@mdr-server:/$ stat /var/spool
  File: `/var/spool'
  Size: 4096  Blocks: 8  IO Block: 4096   directory
Device: 900h/2304dInode: 118 Links: 22
Access: (0755/drwxr-xr-x)  Uid: (0/root)   Gid: (0/ root)
Access: 2015-02-03 14:28:33.0 +
Modify: 2015-12-03 17:41:28.859794403 +
Change: 2015-12-03 17:41:28.859794403 +

spamd@mdr-server:/$ stat /var/spool/spamd
  File: `/var/spool/spamd'
  Size: 4096  Blocks: 8  IO Block: 4096   directory
Device: 900h/2304dInode: 15473107Links: 3
Access: (0770/drwxrwx---)  Uid: ( 1037/   spamd)   Gid: (  252/ spamd)
Access: 2015-12-03 17:41:28.859794403 +
Modify: 2015-12-03 17:41:32.011239989 +
Change: 2015-12-03 17:46:59.187806044 +

spamd@mdr-server:/$ stat /var/spool/spamd/bayes/
  File: `/var/spool/spamd/bayes/'
  Size: 4096  Blocks: 8  IO Block: 4096   directory
Device: 900h/2304dInode: 15473106Links: 3
Access: (0776/drwxrwxrw-)  Uid: ( 1037/   spamd)   Gid: (  252/ spamd)
Access: 2015-12-03 17:41:32.011239989 +
Modify: 2016-02-12 16:20:53.778709980 +
Change: 2016-02-12 16:20:53.778709980 +




Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Marc Perkel
Any chance that the parent directory structure doesn't have enough 
permissions?


The error message says it can't access it so there's your clue. Since 
the files themselves seem to have good permissions I would look at the 
directories.


On 02/12/16 08:29, Sebastian Arcus wrote:
As per advice from this list, I have been re-using my bayes databases 
on several different servers running SA. On one of the servers though, 
the database is not accepted. I re-transferred them several times over 
ssh, to make sure they were not corrupted. The database files are in 
the correct location, with correct permissions and owned by the 
correct user:


# ls -l /var/spool/spamd/bayes/
total 5912
-rw-rw-rw- 1 spamd spamd 1310720 2016-02-09 08:42 bayes_seen
-rw-rw-rw- 1 spamd spamd 4739072 2016-02-09 08:43 bayes_toks

The version of SA on both the donor and receiving servers is 3.4.1.

When I try to learn a new message on the receiving server (where I 
moved the bayes files), I get the following error:


# su - spamd -c "/usr/bin/sa-learn -D --spam /New\ 
UnansweredSexHookup\ Request.eml"




Feb 12 16:20:53.777 [12973] dbg: locker: mode is 438
Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: created 
/var/spool/spamd/bayes/bayes.lock.mdr-server.mdrinteriors.co.uk.12973
Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: trying to get lock 
on /var/spool/spamd/bayes/bayes with 0 retries
Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: link to 
/var/spool/spamd/bayes/bayes.lock: link ok
Feb 12 16:20:53.778 [12973] dbg: bayes: tie-ing to DB file R/W 
/var/spool/spamd/bayes/bayes_toks

Feb 12 16:20:53.779 [12973] dbg: bayes: untie-ing DB file toks
Feb 12 16:20:53.779 [12973] dbg: locker: safe_unlock: unlink 
/var/spool/spamd/bayes/bayes.lock
bayes: cannot open bayes databases /var/spool/spamd/bayes/bayes_* R/W: 
tie failed: No such file or directory

Learned tokens from 0 message(s) (1 message(s) examined)
Feb 12 16:20:53.779 [12973] dbg: plugin: 
Mail::SpamAssassin::Plugin::Bayes=HASH(0x93106d0) implements 
'learner_close', priority 0
ERROR: the Bayes learn function returned an error, please re-run with 
-D for more information at /usr/bin/sa-learn line 498.







--
Marc Perkel - Sales/Support
supp...@junkemailfilter.com
http://www.junkemailfilter.com
Junk Email Filter dot com
415-992-3400



Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Bill Cole

On 12 Feb 2016, at 17:34, Sebastian Arcus wrote:

Thanks for that suggestion. I think we might be getting somewhere. On 
original machine:


#file bayes_seen
bayes_seen: Berkeley DB (Hash, version 9, native byte-order)

# file bayes_toks
bayes_toks: Berkeley DB (Hash, version 9, native byte-order)


On the receiver machine, but with bayes files created locally:

#file bayes_seen
bayes_seen: Berkeley DB (Hash, version 8, native byte-order)

# file bayes_toks
bayes_toks: Berkeley DB (Hash, version 8, native byte-order)


Could the hash version account for the errors I am seeing?


Absolutely. The BDB hash storage version number only changes when a 
change is NOT backwards-compatible, i.e. *BY DESIGN* a library version 
that creates v8 files cannot read v9 files. If my recollection is 
correct, the v8->9 change was in BDB 4.6 and actually provided 
substantial performance improvements. You probably want to upgrade BDB 
and anything using it on the machine with the old version.




Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Sebastian Arcus

On 12/02/16 19:14, Reindl Harald wrote:



Am 12.02.2016 um 20:06 schrieb Marc Perkel:

Any chance that the parent directory structure doesn't have enough
permissions?

The error message says it can't access it so there's your clue. Since
the files themselves seem to have good permissions I would look at the
directories.


see previous mail - that was already verified
looking closer "No such file or directory" is not a permission problem

there was a hint "please re-run with -D"

at least re-use bayes on different servers, even over different 
operating systems is no problem, or bayes is running on 3 own and 2 
foreign machines for a long time now with great results


I've checked and triple checked everything. Unless I'm missing something 
blindingly obvious, I don't think that error message is accurate. If I 
delete the bayes files and restart spamd, on running sa-learn, new ones 
are created in exactly the same place, with same name and same 
permissions - and they work fine. But the ones brought over from the 
other server don't work.


PS - Regarding the "re-run with -D for more information" - I guess that 
message is slightly pointless, as it keeps on saying that even when you 
run it with "-D"


Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread John Hardin

On Fri, 12 Feb 2016, Kris Deugau wrote:


In general though, if you're operating at a scale where one server isn't
enough to handle your SA load, you may want to start thinking about SQL
for Bayes, which can be shared much more easily than pushing file-based
Bayes data around.


Or Redis (right?)

--
 John Hardin KA7OHZhttp://www.impsec.org/~jhardin/
 jhar...@impsec.orgFALaholic #11174 pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
---
  You can't reason a person out of a position if he didn't use
  reason to get there in the first place.   -- Kristopher, at Marko's
---
 Today: Abraham Lincoln's and Charles Darwin's 207th Birthdays


Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Sebastian Arcus

On 12/02/16 20:49, Bowie Bailey wrote:

On 2/12/2016 3:45 PM, Sebastian Arcus wrote:

On 12/02/16 20:31, Antony Stone wrote:

On Friday 12 February 2016 at 17:29:23, Sebastian Arcus wrote:

As per advice from this list, I have been re-using my bayes 
databases on
several different servers running SA. On one of the servers though, 
the

database is not accepted.

Are the servers all the same distro, release and version?

Are they all up to date (or at least, all equally up to date as each 
other)?
No - there are definitely variations in kernel versions and other 
software versions. So far I have only made sure the SA version is the 
same. Any possible culprit comes to mind in terms of a certain 
library or software that might cause this?




The thing that always comes to mind when I see strange permission 
problems is selinux.  If you have it active, check to see if selinux 
is blocking access to the file for some reason.
I'm on Slackware without selinux. I'm not even convinced it is a 
permission problem at all. If I restrict the permissions of the files on 
purpose, it actually reports:


bayes: cannot open bayes databases /var/spool/spamd/bayes/bayes_* R/W: 
tie failed: Permission denied


But if I reset them to correct permissions, I get:

bayes: cannot open bayes databases /var/spool/spamd/bayes/bayes_* R/W: 
tie failed: No such file or directory


That doesn't make sense. To me it looks like it doesn't like something 
about the content of those files, but is reporting missing files instead 
of what the real problem is.




Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Kris Deugau
Sebastian Arcus wrote:
> On 12/02/16 20:31, Antony Stone wrote:
>> On Friday 12 February 2016 at 17:29:23, Sebastian Arcus wrote:
>>
>>> As per advice from this list, I have been re-using my bayes databases on
>>> several different servers running SA. On one of the servers though, the
>>> database is not accepted.
>> Are the servers all the same distro, release and version?
>>
>> Are they all up to date (or at least, all equally up to date as each
>> other)?
> No - there are definitely variations in kernel versions and other
> software versions. So far I have only made sure the SA version is the
> same. Any possible culprit comes to mind in terms of a certain library
> or software that might cause this?

Standard on-disk Bayes files are (mostly) BerkeleyDB, but there are a
couple of other possible back ends that could be in use depending on OS
release and update level.  If you have OS variations you may have
different BDB versions (or even a completely different type of hash
database file;  look up AnyDBM_File), and you won't be able to share
your Bayes by copying files around.

Try running "file /path/to/bayes/files/*" on your source and problem
machines (the latter with locally-created Bayes files that don't show
the access problem) and see what comes up.

If updating the problem machine (or updating all the rest of them, if
the problem machine is "newer") is a problem for any reason, you might
try sa-learn --dump to "back up" Bayes on your source machine, then
sa-learn --restore to reload the data on another machine.

In general though, if you're operating at a scale where one server isn't
enough to handle your SA load, you may want to start thinking about SQL
for Bayes, which can be shared much more easily than pushing file-based
Bayes data around.

-kgd


Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Sebastian Arcus

On 12/02/16 20:31, Antony Stone wrote:

On Friday 12 February 2016 at 17:29:23, Sebastian Arcus wrote:


As per advice from this list, I have been re-using my bayes databases on
several different servers running SA. On one of the servers though, the
database is not accepted.

Are the servers all the same distro, release and version?

Are they all up to date (or at least, all equally up to date as each other)?
No - there are definitely variations in kernel versions and other 
software versions. So far I have only made sure the SA version is the 
same. Any possible culprit comes to mind in terms of a certain library 
or software that might cause this?




Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Reindl Harald



Am 12.02.2016 um 22:36 schrieb Martin Gregorie:

On Fri, 2016-02-12 at 20:58 +, Sebastian Arcus wrote:

I'm on Slackware without selinux. I'm not even convinced it is a
permission problem at all. If I restrict the permissions of the files
on purpose, it actually reports:


In that case ignore my last post, which assumed it was an SElinux
problem.

Could the problem be down to differing versions of the bayes database
manager? If so, it may be worth letting SA set up an empty Bayes
database and using the backup tool to make a backup on the source
system in a version-agnostic format, e.g as a CSV file, and then
restoring it to the new system with its restore tool.


that won't explain "file don't exist" messages and the "bayes database 
manager" don't matter, it's just a BDB database perfectly working 
between different SA versions while the OP made clear SA is the same 
version on all machines


a "spamassassin -D < some-message.eml" with user spamd is using would be 
helpful as statet in the original logs




signature.asc
Description: OpenPGP digital signature


Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Sebastian Arcus

On 12/02/16 21:40, Kris Deugau wrote:

Sebastian Arcus wrote:

On 12/02/16 20:31, Antony Stone wrote:

On Friday 12 February 2016 at 17:29:23, Sebastian Arcus wrote:


As per advice from this list, I have been re-using my bayes databases on
several different servers running SA. On one of the servers though, the
database is not accepted.

Are the servers all the same distro, release and version?

Are they all up to date (or at least, all equally up to date as each
other)?

No - there are definitely variations in kernel versions and other
software versions. So far I have only made sure the SA version is the
same. Any possible culprit comes to mind in terms of a certain library
or software that might cause this?

Standard on-disk Bayes files are (mostly) BerkeleyDB, but there are a
couple of other possible back ends that could be in use depending on OS
release and update level.  If you have OS variations you may have
different BDB versions (or even a completely different type of hash
database file;  look up AnyDBM_File), and you won't be able to share
your Bayes by copying files around.

Try running "file /path/to/bayes/files/*" on your source and problem
machines (the latter with locally-created Bayes files that don't show
the access problem) and see what comes up.

Thanks for that suggestion. I think we might be getting somewhere. On 
original machine:


#file bayes_seen
bayes_seen: Berkeley DB (Hash, version 9, native byte-order)

# file bayes_toks
bayes_toks: Berkeley DB (Hash, version 9, native byte-order)


On the receiver machine, but with bayes files created locally:

#file bayes_seen
bayes_seen: Berkeley DB (Hash, version 8, native byte-order)

# file bayes_toks
bayes_toks: Berkeley DB (Hash, version 8, native byte-order)


Could the hash version account for the errors I am seeing? So far it 
seems to be the only meaningful difference.




Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Martin Gregorie
On Fri, 2016-02-12 at 20:58 +, Sebastian Arcus wrote:
> I'm on Slackware without selinux. I'm not even convinced it is a
> permission problem at all. If I restrict the permissions of the files 
> on purpose, it actually reports:
> 
In that case ignore my last post, which assumed it was an SElinux
problem.

Could the problem be down to differing versions of the bayes database
manager? If so, it may be worth letting SA set up an empty Bayes
database and using the backup tool to make a backup on the source
system in a version-agnostic format, e.g as a CSV file, and then
restoring it to the new system with its restore tool.


Martin



Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Reindl Harald



Am 12.02.2016 um 22:40 schrieb Kris Deugau:

In general though, if you're operating at a scale where one server isn't
enough to handle your SA load, you may want to start thinking about SQL
for Bayes, which can be shared much more easily than pushing file-based
Bayes data around


no, that creates a single point of failure without introdcue another 
layer of complexity - rsync the DBD bayes files around scales and ends 
in independent machines




signature.asc
Description: OpenPGP digital signature


Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Antony Stone
On Friday 12 February 2016 at 17:29:23, Sebastian Arcus wrote:

> As per advice from this list, I have been re-using my bayes databases on
> several different servers running SA. On one of the servers though, the
> database is not accepted.

Are the servers all the same distro, release and version?

Are they all up to date (or at least, all equally up to date as each other)?


Antony.

-- 
If the human brain were so simple that we could understand it,
we'd be so simple that we couldn't.

   Please reply to the list;
 please *don't* CC me.


Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Bowie Bailey

On 2/12/2016 3:45 PM, Sebastian Arcus wrote:

On 12/02/16 20:31, Antony Stone wrote:

On Friday 12 February 2016 at 17:29:23, Sebastian Arcus wrote:

As per advice from this list, I have been re-using my bayes 
databases on

several different servers running SA. On one of the servers though, the
database is not accepted.

Are the servers all the same distro, release and version?

Are they all up to date (or at least, all equally up to date as each 
other)?
No - there are definitely variations in kernel versions and other 
software versions. So far I have only made sure the SA version is the 
same. Any possible culprit comes to mind in terms of a certain library 
or software that might cause this?




The thing that always comes to mind when I see strange permission 
problems is selinux.  If you have it active, check to see if selinux is 
blocking access to the file for some reason.


--
Bowie


Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Martin Gregorie
On Fri, 2016-02-12 at 15:49 -0500, Bowie Bailey wrote:
> On 2/12/2016 3:45 PM, Sebastian Arcus wrote:
> > On 12/02/16 20:31, Antony Stone wrote:
> > > On Friday 12 February 2016 at 17:29:23, Sebastian Arcus wrote:
> > > 
> > > > As per advice from this list, I have been re-using my bayes 
> > > > databases on
> > > > several different servers running SA. On one of the servers
> > > > though, the
> > > > database is not accepted.
> > > Are the servers all the same distro, release and version?
> > > 
> > > Are they all up to date (or at least, all equally up to date as
> > > each 
> > > other)?
> > No - there are definitely variations in kernel versions and other 
> > software versions. So far I have only made sure the SA version is
> > the 
> > same. Any possible culprit comes to mind in terms of a certain
> > library 
> > or software that might cause this?
> > 
> 
> The thing that always comes to mind when I see strange permission 
> problems is selinux.  If you have it active, check to see if selinux 
> is blocking access to the file for some reason.
> 
In my experience, as somebody who doesn't always leave files in their
default positions, changing the absolute paths of files used by
standard servers will almost always upset SELinux. 

For starters, set Selinux to permissive mode and reboot. Its default is
Enforcing  more and a reboot is accept a mode change. 

Running in permissive mode prevents SElinux from applying its rules to
running processes but still generates violation reports. These are sent
posted to the bug reporting tool. I'm running Fedora with XFCE, so
names and actions will probably differ for other distros. Fedora with
XFCE calls this tool Abrt and makes violations accessible from the XFCE
menu bar. 

The violation report shows text explaining what the problem is and also
suggesting what command should be run to fix it. Open a terminal window
and run this command by copying and pasting it, preceded by 'sudo '.
This usually fixes problems caused by moving files to a nonstandard
location. Di this for all the reported violations.

Check by rebooting again. If all is now clean, run in permissive mode
for another few days to see that you've got the lot. If more errors are
reported, rince, wash and repeat. When no more Selinux errors are
appearing you can either continue running in permissive mode or switch
back to enforcing mode and reboot to let that take effect.


HTH

Martin




Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Reindl Harald



Am 12.02.2016 um 21:31 schrieb Antony Stone:

On Friday 12 February 2016 at 17:29:23, Sebastian Arcus wrote:


As per advice from this list, I have been re-using my bayes databases on
several different servers running SA. On one of the servers though, the
database is not accepted.


Are the servers all the same distro, release and version?

Are they all up to date (or at least, all equally up to date as each other)?


that's not the point

sharing bayes here for many months from a Fedora 22/23 system to another 
company using Debian with perfect results and 250 tokens currently


how it works?

* publish a checksum of the current bayes_toks
* fetch it when different
* atomic mv after received the database



signature.asc
Description: OpenPGP digital signature


Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Sebastian Arcus

On 12/02/16 21:40, Kris Deugau wrote:

Sebastian Arcus wrote:

On 12/02/16 20:31, Antony Stone wrote:

On Friday 12 February 2016 at 17:29:23, Sebastian Arcus wrote:


As per advice from this list, I have been re-using my bayes databases on
several different servers running SA. On one of the servers though, the
database is not accepted.

Are the servers all the same distro, release and version?

Are they all up to date (or at least, all equally up to date as each
other)?

No - there are definitely variations in kernel versions and other
software versions. So far I have only made sure the SA version is the
same. Any possible culprit comes to mind in terms of a certain library
or software that might cause this?

Standard on-disk Bayes files are (mostly) BerkeleyDB, but there are a
couple of other possible back ends that could be in use depending on OS
release and update level.  If you have OS variations you may have
different BDB versions (or even a completely different type of hash
database file;  look up AnyDBM_File), and you won't be able to share
your Bayes by copying files around.

Try running "file /path/to/bayes/files/*" on your source and problem
machines (the latter with locally-created Bayes files that don't show
the access problem) and see what comes up.

If updating the problem machine (or updating all the rest of them, if
the problem machine is "newer") is a problem for any reason, you might
try sa-learn --dump to "back up" Bayes on your source machine, then
sa-learn --restore to reload the data on another machine.

In general though, if you're operating at a scale where one server isn't
enough to handle your SA load, you may want to start thinking about SQL
for Bayes, which can be shared much more easily than pushing file-based
Bayes data around.
Probably a good suggestion, but the only reason several servers are 
involved is because they belong to different clients and are on 
different sites - the load is not a factor. But thank you for suggesting it.




Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Benny Pedersen

On 12. feb. 2016 20.06.52 Marc Perkel  wrote:


# ls -l /var/spool/spamd/bayes/


Set bayes path without bayes


bayes: cannot open bayes databases /var/spool/spamd/bayes/bayes_* R/W:


Remove bayes from local.cf


Sent with AquaMail for Android
http://www.aqua-mail.com


Re: Error when trying to re-use Bayes database from one server to another

2016-02-12 Thread Marc Perkel
For what it's worth - just used Redis. Redis is the only thing that's 
worked reliably for me.