From: Mark M. <Mar...@ij...> - 2007-07-31 08:07:44
|
Patrick, > The scenario: > 1. amavisd reads in a file upon startup e.g. using read_hash for > @local_domains_maps to read in a list of domains and subdomains > 2. The file is edited while amavisd is running > > Question: > Will amavisd children take notice of the changes when they restart after > $max_request or do I need to restart the master server process? As Gary noted, a change in a config file (and effect of any calls executed from config file(s)) will only take effect on start of a master process, i.e. on 'amavisd start' or 'amavisd reload'. The read_hash, read_array, read_text, they all read data into memory, just like direct assignements to variables in the rest of a config file. The only lookups that are dynamic in a sense that data may be changing on-the-fly and take effect immediately on a next lookup, are SQL and LDAP lookups. In principle a hash (i.e. an associative array) could be 'tie'-d to a database such as a Berkeley DB, or cdb, gdb ... (tie() is a Perl function). In this case Perl would hide such association from a program and the effect would be a dynamic lookup into a file-based database on each hash lookup by amavisd, changes to a database could take effect immediately (subject to possible caching). This is seldom used, mostly because explicit locking would be required for a reliable access to a changing database tied to a hash. Mark |