GNU Mailutils |
|
General-Purpose Mail Package |
Official GNU Software |
The mailutils query
command queries values from Mailutils
configuration files. It takes one or more configuration paths
(see Paths) as its arguments. On output, it displays the values
it found, each value on a separate line. If the requested value is a
block statement it is displayed in full. For example, if main
configuration file contained:
logging { syslog yes; facility mail; }
Then:
$ mailutils query .logging.syslog syslog yes; $ mailutils query .logging.syslog .logging.facility syslog yes; facility mail; $ mailutils query .logging logging { syslog yes; facility mail; };
Several command line options allow to modify output format. The --value option instructs the command to output only values:
$ mailutils query --value .logging.syslog yes
The --path option instructs it to print full pathnames for each value:
$ mailutils query --path .logging.syslog logging.syslog: yes
The --program option instructs mailutils
to behave as if
it was called under another program name. For example, the following
command:
$ mailutils query --program=pop3d .server.transcript
will return the value of the ‘.server.transcript’ statement which
the pop3d
utility would see.
By default, mailutils query
operates on the main configuration
file. Another configuration file can be supplied using the
--file (-f) option:
$ mailutils query --file /usr/local/etc/file.conf .pidfile
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.