Next: Tuning, Previous: Databases, Up: Configuration [Contents][Index]
A default search is a MATCH
request with ‘*’ or
‘!’ as the database argument (see The MATCH Command). The former means
search in all available databases, the latter means search in all
databases until a match is found.
Default searches may be quite expensive and may cause considerable
strain on the server. For example, the command MATCH * priefix
""
returns all entries from all available databases, which would
consume a lot of resources both on the server and on the client side.
To minimize harmful effects from such potentially dangerous requests, it is possible to limit the use of certain strategies in default searches.
Restricts the use of the strategy name in default searches.
The statements define conditions the 4th argument of a
MATCH
command must match in order to deny the request. The
following statements are defined:
Unconditionally deny the use of this strategy in default searches.
Deny this strategy if the search word matches one of the words from list.
Deny if length of the search word is less than number.
Deny if length of the search word is less than or equal to number.
Deny if length of the search word is greater than number.
Deny if length of the search word is greater than or equal to number.
Deny if length of the search word is equal to number.
Deny if length of the search word is not equal to number.
For example, the following statement denies the use of ‘prefix’ strategy in default searches if its argument is an empty string:
strategy prefix { deny-length-eq 0; }
If the dicod
daemon is configured this way, it will always return
a ‘552’ reply on commands MATCH * prefix ""
or MATCH
! prefix ""
. However, the use of empty prefix on a concrete database, as
in MATCH eng-deu prefix ""
, will still be allowed.
Next: Tuning, Previous: Databases, Up: Configuration [Contents][Index]