Re: SA bayes file db permission issue

2016-06-12 Thread RW
On Sun, 12 Jun 2016 00:04:49 -0500 (CDT) Dave Funk wrote: > On Sat, 11 Jun 2016, RW wrote: > > > On Fri, 10 Jun 2016 15:38:44 -0400 > > Joseph Brennan wrote: > > > > > >> This is a nice test I found: > >> echo -n I | od -to2 | awk '{ print substr($2,6,1); exit}' > >> > >> 1 little-endian > >>

Re: SA bayes file db permission issue

2016-06-11 Thread Dave Funk
On Sat, 11 Jun 2016, RW wrote: On Fri, 10 Jun 2016 15:38:44 -0400 Joseph Brennan wrote: This is a nice test I found: echo -n I | od -to2 | awk '{ print substr($2,6,1); exit}' 1 little-endian 0 big-endian I don't see how this can output anything other than 1. Endianness is about the

Re: SA bayes file db permission issue

2016-06-11 Thread RW
On Fri, 10 Jun 2016 15:38:44 -0400 Joseph Brennan wrote: > This is a nice test I found: > echo -n I | od -to2 | awk '{ print substr($2,6,1); exit}' > > 1 little-endian > 0 big-endian I don't see how this can output anything other than 1. Endianness is about the addressing of bytes within

Re: SA bayes file db permission issue

2016-06-10 Thread Martin Gregorie
On Fri, 2016-06-10 at 15:38 -0400, Joseph Brennan wrote: > Look out for big-endian and little-endian, too. That affects > databases.  > This bit us once when we copied a berkeley db from solaris to linux.  > Endian-ness is based on the cpu hardware, but apparently Macs and > most hardware used

Re: SA bayes file db permission issue

2016-06-10 Thread RW
On Fri, 10 Jun 2016 15:38:44 -0400 Joseph Brennan wrote: > wrote: > > > The main database file is binary anyway. > > > Look out for big-endian and little-endian, too. That affects > databases. This bit us once when we copied a berkeley db from solaris > to linux.

Re: SA bayes file db permission issue

2016-06-10 Thread Joseph Brennan
wrote: The main database file is binary anyway. Look out for big-endian and little-endian, too. That affects databases. This bit us once when we copied a berkeley db from solaris to linux. Endian-ness is based on the cpu hardware, but apparently Macs and most

Re: SA bayes file db permission issue

2016-06-10 Thread RW
On Fri, 10 Jun 2016 00:08:01 +0100 Martin Gregorie wrote: > On Thu, 2016-06-09 at 15:01 -0700, John Hardin wrote: > > On Thu, 9 Jun 2016, Martin Gregorie wrote: > > > > > On Thu, 2016-06-09 at 16:54 -0400, Yu Qian wrote: > > >> Ok, I found out. so the db files generated on Mac can not be > >

Re: SA bayes file db permission issue

2016-06-09 Thread Martin Gregorie
On Thu, 2016-06-09 at 15:01 -0700, John Hardin wrote: > On Thu, 9 Jun 2016, Martin Gregorie wrote: > > > On Thu, 2016-06-09 at 16:54 -0400, Yu Qian wrote: > >> Ok, I found out. so the db files generated on Mac can not be used > on > >> Linux. vice versa. > > > > Newline symbols differ: '/n' is

Re: SA bayes file db permission issue

2016-06-09 Thread John Hardin
On Thu, 9 Jun 2016, Martin Gregorie wrote: On Thu, 2016-06-09 at 16:54 -0400, Yu Qian wrote: Ok, I found out. so the db files generated on Mac can not be used on Linux. vice versa. Newline symbols differ: '/n' is 0x0a (LF) for Linux, 0x0d (CR) for Macs.  WTF? I thought Mac's OS was based

Re: SA bayes file db permission issue

2016-06-09 Thread Larry Rosenman
On 2016-06-09 16:25, Martin Gregorie wrote: On Thu, 2016-06-09 at 16:54 -0400, Yu Qian wrote: Ok, I found out. so the db files generated on Mac can not be used on Linux. vice versa. Newline symbols differ: '/n' is 0x0a (LF) for Linux, 0x0d (CR) for Macs.  The bad news is that this screws up

Re: SA bayes file db permission issue

2016-06-09 Thread Martin Gregorie
On Thu, 2016-06-09 at 16:54 -0400, Yu Qian wrote: > Ok, I found out. so the db files generated on Mac can not be used on > Linux. vice versa. > Newline symbols differ: '/n' is 0x0a (LF) for Linux, 0x0d (CR) for Macs.  The bad news is that this screws up many programs. The good news is that its

Re: SA bayes file db permission issue

2016-06-09 Thread Yu Qian
Good point, David, I will try as you suggested, that makes more sense. --- Yu Qian Ottawa Ontario Phone: (514)-553-0198 On Thu, Jun 9, 2016 at 5:01 PM, David B Funk wrote: > On Thu, 9 Jun 2016, Yu Qian wrote: > > Yes, I am sure the path is correct, also, if the

Re: SA bayes file db permission issue

2016-06-09 Thread David B Funk
On Thu, 9 Jun 2016, Yu Qian wrote: Yes, I am sure the path is correct, also, if the path is not correct, it will show 'db not present'. I tried to write a small perl script to open the db file, it failed too. so I think it maybe the file damaged during the mounting. but I don't know why this

Re: SA bayes file db permission issue

2016-06-09 Thread Yu Qian
Ok, I found out. so the db files generated on Mac can not be used on Linux. vice versa. I think this is related to the way how perl DBM module processing the db files on different system. I am totally new to perl. But it's good to know that. thanks all. --- Yu Qian Ottawa Ontario Phone:

Re: SA bayes file db permission issue

2016-06-09 Thread Alan Hodgson
On Thursday 09 June 2016 16:26:26 Yu Qian wrote: > Yes, I am sure the path is correct, also, if the path is not correct, it > will show 'db not present'. > > I tried to write a small perl script to open the db file, it failed too. so > I think it maybe the file damaged during the mounting. but I

Re: SA bayes file db permission issue

2016-06-09 Thread Yu Qian
Yes, I am sure the path is correct, also, if the path is not correct, it will show 'db not present'. I tried to write a small perl script to open the db file, it failed too. so I think it maybe the file damaged during the mounting. but I don't know why this can happen --- Yu Qian Ottawa Ontario

Re: SA bayes file db permission issue

2016-06-09 Thread John Hardin
On Thu, 9 Jun 2016, Yu Qian wrote: My spam assassin works pretty well if I run it on a single machine, either mac or linux. that means I update my rules and train my bayes model on the same machine. But when I tried to train the model and generate bayes file db on mac, and I mounted them to a

Re: SA bayes file db permission issue

2016-06-09 Thread Yu Qian
Ok, I think it is just because the db file can not be open by perl DBM module, but I am confused why it can't be open --- Yu Qian Ottawa Ontario Phone: (514)-553-0198 On Thu, Jun 9, 2016 at 4:11 PM, Yu Qian wrote: > My spam assassin works pretty well if I run it

SA bayes file db permission issue

2016-06-09 Thread Yu Qian
My spam assassin works pretty well if I run it on a single machine, either mac or linux. that means I update my rules and train my bayes model on the same machine. But when I tried to train the model and generate bayes file db on mac, and I mounted them to a docker container, then sa-learn