[EXIM] setting environment variables

Top Page
Delete this message
Reply to this message
Author: Peter Galbavy
Date:  
To: exim-users
Subject: [EXIM] setting environment variables
I have scanned the FAQ and search the mailing list archives (at
least for the last year) and found very little mention of this,
so here goes;

I have set-up a virtual majordomo configuration as follows:

1. All mail config stuff lives under /etc/mail

2. exim.conf (in /etc/mail) has a director:

        EXIM_HOME = /etc/mail


        ...


        virtual:
          driver = aliasfile
          domains = dbm;EXIM_HOME/domains/DOMAINS
          no_more
          file = EXIM_HOME/domains/$domain/aliases
          search_type = dbm
          user = mdomo
          group = mdomo


3. There is a directory structure like this:

        /etc/mail/
              domains/
                  knowledge.com/
                        aliases.{txt,db}
                        majordomo.cf
                        lists/
                  literature.org/
                         ...


4. The aliases file is getting (a) cumbersome and (b) over complex to
keep up to date. Majordomo aliases are getting into three lines.

I can see a couple of possible extension that would help fix this, the
primary being the *abritrary* setting and use of environment variables
in exim.conf parts and the aliases file.

If I could do this:

        virtual:
          driver = aliasfile
          ...
          env MAJORDOMO_CF = EXIM_HOME/domains/$domain/majordomo.cf
          env PATH = /usr/local/majordomo


and the aliases file could do this:

        stuff: "|resend -l stuff stuff-list"


instead of:

        stuff: "|/usr/local/majordomo/wrapper resend -C \
            /etc/mail/domains/knowledge.com/majordomo.cf \
            -l stuff stuff-list"


(lines wrapped for sanity). Note the lack of dependent paths etc. This
frees up the admin to edit just exim.conf if things move or get layered
one more level in the future (like goinf to a "com/knowledge/..."
structure).

I cannot think of direct security issues that the exim admin is not
already well aware of and should be in touch with.

If consensus is "good idea" and no one with more direct experience
of the code has time, I can try to implement the changes.

What's the philosophical implications and what components should
"benefit". My personal opinion is that it should be anything that
can spawn a potentially arbitrary child process.

--
Peter Galbavy
Knowledge Matters Ltd
http://www.knowledge.com /http://www.wonderland.org/ http://www.literature.org/

--
*** Exim information can be found at http://www.exim.org/ ***