Menu

#72 ability to include config files (i.e. global configs)

open
nobody
None
5
2003-08-25
2003-08-25
No

Problem: I have several virtual users that use ASK.
The config for each user is identical except for three
options: rc_mymails, rc_myfullname, rc_mymailbox (yes
they share the white/ignore/blacklists, queue, etc).
Life would be much easier if the shared part of the
config could be moved out to a separate file, a global
config of sorts.

Possible Solution:

I'm going to ask for a new config option in .askrc to
include another config file. Then I can have all of my
common, non-variable option in a "global" config of
sorts and my per user configs will just contain the
variable bit with a reference to another config file.

rc_mymails = user@domain.ext
rc_myfullname = My Name
rc_mymailbox = /var/mail/user
rc_include = /path/to/other/config

Then during the read of the initial config file,
whenever you encounter an include, read the provided file.

Some gotchas to watch out for:

1) trap for infinite loops, i.e. two files including
each other
2) duplicate options, i.e. last one wins
3) how many includes to allow per config file and in total

Discussion


Log in to post a comment.