spamfilter.ini reload question |
Post Reply ![]() |
Author | |
Dan B ![]() Senior Member ![]() ![]() Joined: 09 February 2005 Location: United States Status: Offline Points: 105 |
![]() ![]() ![]() ![]() ![]() 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, |
|
![]() |
|
LogSat ![]() Admin Group ![]() ![]() Joined: 25 January 2005 Location: United States Status: Offline Points: 4104 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
Dan B ![]() Senior Member ![]() ![]() Joined: 09 February 2005 Location: United States Status: Offline Points: 105 |
![]() ![]() ![]() ![]() ![]() |
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 Thanks,
|
|
![]() |
|
Dan B ![]() Senior Member ![]() ![]() Joined: 09 February 2005 Location: United States Status: Offline Points: 105 |
![]() ![]() ![]() ![]() ![]() |
Roberto, Just wondering if you had any update on this request? Thanks, |
|
![]() |
|
lead ![]() Newbie ![]() ![]() Joined: 08 March 2005 Status: Offline Points: 18 |
![]() ![]() ![]() ![]() ![]() |
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? |
|
![]() |
|
Dan B ![]() Senior Member ![]() ![]() Joined: 09 February 2005 Location: United States Status: Offline Points: 105 |
![]() ![]() ![]() ![]() ![]() |
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, |
|
![]() |
|
lead ![]() Newbie ![]() ![]() Joined: 08 March 2005 Status: Offline Points: 18 |
![]() ![]() ![]() ![]() ![]() |
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> |
|
![]() |
|
Desperado ![]() Senior Member ![]() ![]() Joined: 27 January 2005 Location: United States Status: Offline Points: 1143 |
![]() ![]() ![]() ![]() ![]() |
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"); 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 |
|
![]() |
|
LogSat ![]() Admin Group ![]() ![]() Joined: 25 January 2005 Location: United States Status: Offline Points: 4104 |
![]() ![]() ![]() ![]() ![]() |
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} |
|
![]() |
|
lead ![]() Newbie ![]() ![]() Joined: 08 March 2005 Status: Offline Points: 18 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
LogSat ![]() Admin Group ![]() ![]() Joined: 25 January 2005 Location: United States Status: Offline Points: 4104 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.211 seconds.