On Tue, Jan 12, 2021 at 01:00:26AM +0000, JL (Postfix Readers A/c) wrote:

> Can someone point me at the right place in the docs, or offer advice
> which maybe could also be added to the docs (!) to help others?

Each main.cf parameter documents its syntax.  Various parameters, that
take literal lists of values in-line, also take a file name whose
content contains similar values.  The syntax typically also supports
"!/some/path", which is a set of exceptions.

> Can such a file contain comments, for example? Or blank lines?
> Can it have several "items" space/comma separated on one line?
> Can it have each "item" on a line of its own? A mixture of both?

    http://www.postfix.org/postconf.5.html#relay_domains

    Specify a list of host or domain names, "/file/name" patterns or
    "type:table" lookup tables, separated by commas and/or whitespace.
    Continue long lines by starting the next line with whitespace. A
    "/file/name" pattern is replaced by its contents; a "type:table"
    lookup table is matched when a (parent) domain appears as lookup
    key. Specify "!pattern" to exclude a domain from the list. The form
    "!/file/name" is supported only in Postfix version 2.4 and later. 

The file content is interpolated into the value of the parameter,
as though each line were an indented continuation of the parameter
value:

        relay_domains = /some/file

is the same as:

        relay_domains =
            line1
            line2
            ...
            lineN

where line1, line2, ... lineN are the lines of the file.  Comments must
start in the first column of the file.  Blank lines are ignored, just
as they are in the in-line form.  Files can even list more files, and
each '!' reverses the meaning of any previous '!'.

These are called "match lists" internally, and it would perhaps be good
to have a general description of match lists somewhere...

-- 
    Viktor.

Reply via email to