Re: [exim] exim command to dump config after macro expansion

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: Tim Watts
CC: exim-users
Subject: Re: [exim] exim command to dump config after macro expansion
On 2015-07-02 at 17:10 +0100, Tim Watts wrote:
> Is there an easy way to dump a single file containing exim's config after
> macros have been evaluated?


One file, with one command, no.
Also, beware that options can be marked with `hide ` as a prefix to
avoid showing their value when asking Exim to print them.

You can get the macros, routers, transports

exim -bP
  -- all of the top-level configuration options
exim -bP tls_privatekey
  -- value of `tls_privatekey`, with decoration
exim -n -bP tls_privatekey
  -- just the value of that option, no decoration (fairly new option)
exim -bP +local_domains
  -- expanding a named list
exim -bP macros
  -- all of the macros (as long as you're an admin user)
exim -bP routers
  -- all of the routers, not quite in Exim format, with all of the
     defaults printed too
exim -bP router_list
  -- names of all the routers, in order
exim -bP router fred
  -- options for router fred
exim -bP transport_list
  -- names of each item in the set of transports
exim -bP transports
  -- all of the transports
exim -bP transport fred
  -- options for transport fred


Similarly `authenticators`, `authenticator_list` & `authenticator fred`.

There's no way I know of to extract the other sections, such as
rewrites or ACLs.

We would probably take a decent patch which implements `acls`,
`acl_list` and `acl fred` :)

Honestly, if this area interests someone, we'd probably take a patch
implementing an option which dumps the entire config, as long as it
honours "hiding" unless the caller is an admin.

-Phil