Access Mode Editing Using Tool.exe
Posted by Gary, Last modified by on 27 May 2008 07:34 PM
How access mode works, changing globally service access using Tool
A very important feature in Icewarp is the Access mode, which is available in all Icewarp modules. The best way to explain this feature is with the Antivirus module. As all modules in Icewarp, if you click on the Access mode button, you will see it is set to â€œAll accountsâ€ by default (shown below).
This means that antivirus is active in all accounts and you cannot disable it, it is grayed out in the users service options, as seen below.
This a good policy for the antivirus, to keep it on for all accounts, unless you have a license that does not attend to the number of users you have, which will be each time less common, since the new licensing policy requires customers to have the same number of accounts for all Icewarp modules, including the mail server.
It is common, in the case of modules such as Anti-Spam and Quarantine, to activate or deactivate such services globally, for all accounts. Many customers decide, for example, to set both anti-spam and quarantine to Selected accounts in the Access mode drop down menu, so they can activate/deactivate each of these services individually, on a per user basis. Others might set Anti-Spam on a domain level (Selected domains), so it can be turned on/off only for the entire domain (also in the domainâ€™s Options tab) and Quarantine on a user level (Selected accounts). There are more options in Access mode, such as accounts for a list (where you can select accounts that have access to service directly in the Access mode button) and All except selected Domains and accounts, which can get a bit confusing, since the modules that are marked on, are actually off.
Note that if you change your Access mode for a specific service from All accounts to Selected accounts, that service will be, by default, ON, for all users. One more reason for the need, many times, to do global changes and deactivate the service for all accounts, so they can select it as needed.
To do global changes, you can use the command line tool.exe, found in Icewarpâ€™s root directory, which lets you access the API directly. You can view the list of constants in the file \Icewarp\delphi\apiconst.pas (which has comments regarding each constant, if itâ€™s a Boolean, integer or string value, etc). Look for the desired constant you want to change, for example the option where you can enable or disable Anti-Spam (in userâ€™s Option tab) is called u_as and the service for quarantine is u_cr.
So if you want to disable quarantine for all users, considering you Access mode for Quarantine is set to Selected accounts, you can run the following command in Icewarpâ€™s root:
tool modify account *@* u_cr 0
Or for a specific domain, tool modify account @*domain.com u_cr 0
It is recommend to disable your password policy, if you have one set up in Global settings/Password policy and enabling it back after running tool, since tool will not be able to save changes to accounts which are out of the password policy (you will get an error informing the object cannot be saved).