How amavis reads configuration
m16+amavis at monksofcool.net
Sun Nov 4 23:38:11 CET 2018
* Patrick Ben Koetter:
> Opinions? Comments? Ideas?
Caveat: The following comments are based on a) my fairly solid knowledge
of Gentoo Linux ebuilds and the Portage packaging system and b) my lack
of knowledge of other Linux distributions' packaging systems.
I think we should not spend much time thinking about how Linux distros
organise their config files, but imagine that we are using a classic
Makefile approach (make config, make all, make install). That means
honoring environment variables like PREFIX, CFLAGS, LDFLAGS (this being
Perl the latter two won't matter as much), and assuming that we are free
to overwrite /etc/amavis.conf.
This is not a problem because Gentoo ebuilds are executed in a staging
area, handled by Portage, and there are mechanisms in place that
guarantee that if a user modified the "real" /etc/amavis.conf it will
not be overwritten. The user will be presented with choices to overwrite
his config, discard the updated config, or interactively merge the
files. It is also possible to include an amavisd-sample.config in the
release tarballs and leave it to Gentoo to create a "live" version if
When I write ebuilds I actually dread software release packages that try
to be clever. Anything that goes beyond "make install" and copying
relevant files into directories specified via PREFIX makes things harder
for me. Creating groups, users and directories is something the Gentoo
ebuild needs to do. I cannot allow any installation script to make
changes outside the Portage sandbox, meaning I need to patch "the smart"
out of tricksy scripts.
That said, it seems best to me to include an reasonable amavis.config in
the releases that looks something like this:
[... default settings here ...]
Assume that overwriting /etc/amavis.config is fine while /etc/amavis.d
should not be touched. Everything else is for the package maintainers to
figure out. I am pretty certain that distributions other than Gentoo
have similar ways of dealing with things.
More information about the amavis-devel