On 9 cze 2014, at 20:51, Kamil Andrusz <[email protected]> wrote:

> Hi,
> 
> The problem is I’m not feeding it anything anymore. spamd.conf file is empty, 
> all cron jobs related to adding anything into spamd are removed, spamd-setup 
> is no longer being run, spamlogd is disabled.
> 
> After executing the following:
> (wizz@shwurzbung):~% sudo /etc/rc.d/spamd stop 
> spamd(ok)
> (wizz@shwurzbung):~% sudo rm /var/db/spamd    
> (wizz@shwurzbung):~% sudo /etc/rc.d/spamd start
> spamd(ok)
[cut]

Hi again,

I am still trying to find the cause and a solution to my issue. I’ve played 
around with spamdb some more and found some weird behavior.
After starting with a clean /var/db/spamd the file had the following size:
-rw-r--r--  1 _spamd  _spamd  262144 Jun 10 22:30 /var/db/spamd

I executed a loop to put in some addresses:
for i in `jot 254 1 254` ; do sudo spamdb -a 192.168.0.$i ; done

Then I checked how many addresses were added:
(wizz@shwurzbung):~/spamd/s% spamdb | wc -l
     184
File size:
-rw-r--r--  1 _spamd  _spamd  50266112 Jun 10 22:31 /var/db/spamd

So, 70 entries were not added. Then I have checked which entries are missing 
with the following command:
for i in `jot 254 1 254` ; do if [ `spamdb | grep "|192.168.0.$i|" | wc -l | tr 
-d [:space:]` -eq 0 ] ; then  echo 192.168.0.$i ; fi ; done

I repeated the /var/db/spamd initialization, reexecuted the loop adding 
addresses, checked and it turned out that again 184 entries were added, 70 were 
missing. I compared the lists of missing entries, they matched. I executed the 
first loop again trying to add some of the missing addresses and a strange 
thing happened:
(wizz@shwurzbung):~/spamd/s% spamdb | wc -l
      11
File size:
-rw-r--r--  1 _spamd  _spamd  87490560 Jun 10 22:33 /var/db/spamd
So now 173 entries were gone, but the file got bigger.

I tried it on my virtual machine (running the exact same config, except for the 
HW), the results for each step were:
File size after init:
-rw-r--r--  1 _spamd  _spamd  65536 Jun 11 00:34 /var/db/spamd

Entries after the loop:
$ spamdb | wc -l
     254
File size after the loop:
-rw-r--r--  1 _spamd  _spamd  65536 Jun 11 00:34 /var/db/spamd

After reexecution of the loop (just to see if anything changes):
$ spamdb | wc -l
     254
File size:
-rw-r--r--  1 _spamd  _spamd  65536 Jun 11 00:35 /var/db/spamd

I have also tried recompiling spamd, spamdb from sources - didn’t help. I 
created a small script in ruby to create similar db and it worked without a 
problem. When I used the script to add entries to the /var/db/spamd it only 
added some entries (192, tried several times, always the same number).

Summing up, on the faulty system the size of the emtpy /var/db/spamd is greater 
than on the working system. Adding entries on the faulty system fails (with the 
same nubmer of entries successfully added) and causes the spamd file to grow 
significantly.

Any hints on what else to check or where to look for the root of the problem?

Regards,
Kamil Andrusz
-- 
It's just a matter of opinion.

Reply via email to