GNU Mailutils |
|
General-Purpose Mail Package |
Official GNU Software |
Mailutils
configuration files have a distinct hierarchical
structure. Each statement in such files can therefore be identified
by its name and the names of block statements containing it. Such
names form the pathname, similar to that used by UNIX file system.
For example, consider the following file:
foo { bar { baz 45; # A. } baz 98; # B. }
The full pathname of the statement marked with ‘A’ can be written as:
.foo.bar.baz
Similarly, the statement marked with ‘B’ has the following pathname:
.foo.baz
The default path component separator is dot. A pathname beginning with a component separator is called absolute pathname. Absolute pathnames uniquely identify corresponding statements. If the leading dot is omitted, the resulting pathname is called relative. Relative pathnames identify statements in relation to the current point of reference in the configuration file.
Any other punctuation character can be used as a component separator, provided that it appears at the beginning of the pathname. In other words, only absolute pathnames allow for a change in component separators.
A block statement that has a tag is referred to by the statement’s name, followed by an equals sign, followed by the tag value. For example, the statement ‘A’ in the file below:
program x {
bar {
baz 45; # A.
}
}
is identified by the following pathname:
.program=x.bar.baz
The tag can optionally be enclosed in a pair of double quotes. Such a quoting becomes mandatory for tags that contain white space or path component separator, e.g.:
.program="a.out".bar.baz
The --set command line option allows you to set configuration variables from the command line. Its argument consists of the statement path and value, separated by a single equals sign (no whitespace is permitted at either side of it). For example, the following option:
--set .logging.facility=mail
has the same effect as the following statement in the configuration file:
logging { facility mail; }
Values set using this option override those set in the configuration files. This provides a convenient way for temporarily changing configuration without altering configuration files.
Notice, that when using --set, the ‘=’ sign has two purposes: first it separates statement path from the value, thus forming an assignment, and secondly it can be used within the path itself to introduce a tag. To illustrate this, let’s assume you have the following statement in your configuration file:
program pop3d { logging { facility mail; } server 0.0.0.0 { transcript no; } }
Now assume you wish to temporarily change logging facility to ‘local1’. The following option will do this:
--set .program=pop3d.logging.facility=local1
When splitting the argument to --set, the option parser always looks for the rightmost equals sign. Everything to the right of it is the value, and everything to the left of it - the path.
If the tag contains dots (as the server
statement in the
example above), you should either escape them with slashes or change
the pathname separator to some other character, e.g.:
--set .program=pop3d.server='0\.0\.0\.0'.transcript=yes
or
--set /program=pop3d/server="0.0.0.0"/transcript=yes
This document was generated on January 2, 2022 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.