Spam Filter ISP Support Forum

  New Posts New Posts RSS Feed - spamfilter.ini reload question
  FAQ FAQ  Forum Search   Register Register  Login Login

spamfilter.ini reload question

 Post Reply Post Reply
Author
Dan B View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 February 2005
Location: United States
Status: Offline
Points: 104
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan B Quote  Post ReplyReply Direct Link To This Post Topic: spamfilter.ini reload question
    Posted: 15 March 2005 at 3:55pm

R,

When the SF logs states that spamfilter.ini reloaded.  Is that reloading all the settings in the ini or just the external files for the white & black lists?

 

Thanks,
Dan B

Back to Top
LogSat View Drop Down
Admin Group
Admin Group
Avatar

Joined: 25 January 2005
Location: United States
Status: Offline
Points: 4068
Post Options Post Options   Thanks (0) Thanks(0)   Quote LogSat Quote  Post ReplyReply Direct Link To This Post Posted: 15 March 2005 at 4:04pm
That entry in the log indicates that the "Save Settings" button has been clicked. That causes the settings in the GUI to be written to the ini file, which is then reloaded. That only affects the SpamFilter.ini file.

All the other blacklist/whitelist keyword files are automatically reloaded when SpamFilter sees their timestamp being modified. The check is done about every 60 seconds. That event is not logged.
Roberto Franceschetti

LogSat Software

Spam Filter ISP
Back to Top
Dan B View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 February 2005
Location: United States
Status: Offline
Points: 104
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan B Quote  Post ReplyReply Direct Link To This Post Posted: 15 March 2005 at 4:34pm

R,

Is there way that you can add to the future wish release to have SF the ability to reload the full ini.  During the 60 sec reload of the external files, maybe have a line in the ini like this.

reloadsfsettings=0    ;at normal running state
reloadsfsettings =1    ;when it needs reloaded and after it reloads it would change it back to 0  Something similar to ServU FTP  You can modify the ini using a 3rd party and you just change the relaodsettings=0 to 1 to trigger the reload.

Thanks,
Dan B

 

 

Back to Top
Dan B View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 February 2005
Location: United States
Status: Offline
Points: 104
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan B Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2005 at 10:20am

Roberto,

Just wondering if you had any update on this request?

Thanks,
Dan B

Back to Top
lead View Drop Down
Newbie
Newbie
Avatar

Joined: 08 March 2005
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote lead Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2005 at 7:26am
re: automatically reloading .ini every so often.

Can I ask why you would want to?
What are you looking to do with the .ini file?
Back to Top
Dan B View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 February 2005
Location: United States
Status: Offline
Points: 104
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan B Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2005 at 10:21am

I want to create a Cold Fusion web application that controls the ini file of SF.  Instead of giving the customer full access to the server that SF is located on, they can administer it via the web and I can limit what features can be turn on or off per customer basis.  IF customer A wants black list servers and a quota of 10MB customer B does not, they can changed the features at will.  I do know that for each customer it will take separate licenses of SF. We are looking at different services to offer new and existing customers to generate revenue. To LogSat and us.  To do the above the ini file needs to be reloaded on a change that doesn't deal directly with the files that are read periodically and not have to stop and restart the service.

 

Thanks,
Dan B

Back to Top
lead View Drop Down
Newbie
Newbie
Avatar

Joined: 08 March 2005
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote lead Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2005 at 11:46am
I thought you maybe able to programmatically restart the service after a change.

If you are running on a server (win2003 or Win2k with the resource pack) there is a command line for managing services (sc) which you could send.

sc <server> stop <service>
sc <server> start <service>


Back to Top
Desperado View Drop Down
Senior Member
Senior Member
Avatar

Joined: 27 January 2005
Location: United States
Status: Offline
Points: 1143
Post Options Post Options   Thanks (0) Thanks(0)   Quote Desperado Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2005 at 12:48pm

Dan,

A 2003 box is not a requirement ... only makes life simpler.  I do modify my ini and as "lead" examples above, I restart the service but I use perl to do so.  The only issue is that the perl script must run as an administrator.  This can easily be set in the IIS on a file by file basis.  The perl commands is stupidly simple:

system("net stop SpamFilter");
sleep(10);
system("net start SpamFilter");

However, Having said all that, you can also use ASP natively using IISObjects to get the service name and use MSSQL Stored Procedures to execute the equivalent DOS command OR ... get even more elegant and use WMI ... not for the faint of heart.

Bottom line ... Roberto, I agree with the wish to have some sort of ini file re-read option.  I could really remove a lot of convoluted code if this were the case!

Regards,



Edited by Desperado
The Desperado
Dan Seligmann.
Work: http://www.mags.net
Personal: http://www.desperado.com

Back to Top
LogSat View Drop Down
Admin Group
Admin Group
Avatar

Joined: 25 January 2005
Location: United States
Status: Offline
Points: 4068
Post Options Post Options   Thanks (0) Thanks(0)   Quote LogSat Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2005 at 7:18pm
Dan B and Dan S,

We actually had an internal build that was testing that feature... I'll send you the link via private forum msg if you'd like to test it.

Dan S - the change was not "turned on" in the 442 build I provided you earlier. The release notes for this internal build are:

// New to VersionNumber = '2.5.1.443';
{TODO -cFix : virus emails were not being blocked if any of the "Tag and deliver" options were checked}
{TODO -cNew : SpamFilter.ini is automatically reloaded if modified by external application}
{TODO -cNew : When automatic reload of blacklist/whitelist and SpamFilter.ini files, the event is now logged}


Roberto Franceschetti

LogSat Software

Spam Filter ISP
Back to Top
lead View Drop Down
Newbie
Newbie
Avatar

Joined: 08 March 2005
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote lead Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2005 at 6:14am
Sorry to come back to this, but I was wondering if spamfilter validates the .ini settings before applying them (it must do)?

If so, having a load this setting in the .ini will not tell the other app if the load was successful, apart from checking the log.

How about calling spamfilter.exe with a 'reload .ini file flag', which causes the running instance to read the .ini file.

I know some of you run more than one instance, so there would be some need to indentify that too.

eg: spamfilter.exe /readini <instance>

This would return a code one way or the other.

Does spamfilter have any commandline options (apart from /reinstall)?



Edited by lead
Back to Top
LogSat View Drop Down
Admin Group
Admin Group
Avatar

Joined: 25 January 2005
Location: United States
Status: Offline
Points: 4068
Post Options Post Options   Thanks (0) Thanks(0)   Quote LogSat Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2005 at 5:51pm
lead,

SpamFilter does perform some validatation in the ini, but as the ini file was created and maintained by SpamFilter, it's not extensive, super fool proof validation. We have added a feature to have it reloaded automatically, but we did not "improve" the validation process. We have implemented the request, but now we in turn ask the administrators to ensure they add "clean" data in the file, as problems may arise if that is not the case.

Should errors occurr in parsing the file, they will be logged. But since there are many possible errors, there are many possible events that can be created in the log, depending on where they occurr. We will not be able to always mention a problem with the ini file, as the errors routines will not know if the problem was introduced by an external app modifying the file or not.

SpamFilter currently checks the files every 3 minutes to see if they were changed. When a reload occurs, the event is immediately logged in the logfile. At the moment we do not plan to have an external trigger start the reload process.

PS - the only commandline option other that the /reinstall is the "-d" option for the standalone, non-service version which causes a debugging window to appear when SpamFilter shuts down to report any mem leaks that may occurr. It is not to be used routinely as the application will be slower as it needs to keep track of all memory allocations as they occur.
Roberto Franceschetti

LogSat Software

Spam Filter ISP
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.