rocsca,

> I have different SMTP gateways each one configurred exactly at the same
> manner. The only difference is the hostname.
>
> I would like to know if I could define "/etc/amavisd.conf" as an NFS share
> somewhere and export it on each of my SMTP gateways. The aim is obviously
> to change only one configuration file each time that an amavisd-new
> configuration update is needed.

Yes, you can do that. The config file is only read once during
startup, so there are issues with sharing it that I could think of.

For a few changed that may differ from one host to another,
you can either add some if .. elsif ... else logic inside
the common amavisd.conf file, perhaps based on a host name
or some other characteristics of the environment.

Another possibility is to add include_config_files('...')
somewhere, which would read some host-specific local file
where noncommon settings could be held.

Another option is to make use of the '-i name' option
on a command line. All it does is to store the supplied
string into a variable $instance_name, which is not used
by amavisd itself, but is visible to code in a config file,
so you could make conditional settings there, e.g.:

if ($instance_name eq 'test') {
  $log_level = 1;
  $max_servers = 2;
  $enable_db = 0;
  $unix_socketname = undef;
  $inet_socket_port = [8888];
} elsif ($instance_name eq 'small') {
  $max_servers = 10;
} else {
  $max_servers = 20;
}

and start amavisd accordingly:
  # amavisd -i small
or
  # amavisd -i test
or just
  # amavisd

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
AMaViS-user mailing list
[email protected] 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to