Update problems with SQLBlackWhiteList.pm and MS
taz at taz-mania.com
Tue Feb 7 23:12:52 GMT 2006
The timer is to cause a re-read of the data in the database. SQLBlackWhiteList.pm reads the data from the database and puts into
memory for use. The timer causes it to dump the old data and read in the new data. Also if MS stops and restarts it will cause
SQLBlackWhiteList.pm to re-read.
I got around this by writing my own SQLBlackWhiteList.pm that always goes directly to the database. I see no reduction in
performance (although if I ever reached 100% load there probably would be), It uses a lot less memory (SQLBlackWhiteList.pm uses one
"block" of memory for each entry in each list times the number of MS threads. Which means that if you have 100 entries in your
Black/White lists and 10 MS threads, you use 1000 memory blocks. The entire list is duplicated in memory for each MS thread). It
also allows for "instant" updates.
Mike Jakubik wrote:
> Scott Silva wrote:
>> Mike Jakubik spake the following on 2/7/2006 2:31 PM:
>>> I am trying to use MailWatch's SQLBlackWhiteList.pm file for my own use.
>>> This file is based on the example found in CustomConfig.pm. The problem
>>> i am having is that while adding new entries in to the sql database
>>> works fine, however when removing them, MS does not seem to see the
>>> change until it is restarted. I have taken off the refresh timer found
>>> in SQLBlackWhiteList.pm for debugging purposes, and the mail logs verify
>>> that the file is reading in the correct amount of entries, however MS is
>>> not seeing them until it is restarted. I have looked over the
>>> SQLBlackWhiteList.pm script and i cant see a problem in it, it seems to
>>> be doing its job, and the logs verify this. Can anyone shed some light?
>> You need to at least do a "reload" to pull the lists in, as it is
>> still read
>> into memory, not a live DB call.
> But I don't understand why when i add new entries it picks them up, but
> not when i delete them. Are you saying there is no way around this,
> other than to force a mailscanner restart after every update to the
> white/black list? This doesn't make sense to me, why is there a timer in
> the script and why is the database re-read then? Could you provide more
> Thank you.
More information about the MailScanner