Such invocation can be useful in shell scripts to facilitate
configuration file processing.
@node mu acl
@subsection mu acl
The @command{mu acl} command tests Mailutils Access Control Lists. By
@node mailutils acl
@subsection mailutils acl
The @command{mailutils acl} command tests Mailutils Access Control Lists. By
default it reads ACL from the Mailutils configiration file section
@samp{acl}. The command takes a list of IP addresses as its
arguments, applies the ACL to each of them in turn and prints the result.
...
...
@@ -7575,7 +7651,7 @@ configuration file to read instead of the default one. The
(@pxref{Paths}) of the ACL section to use instead of the default @samp{.acl}. For example, to test ACL in section @samp{server 213.130.1.232} of file @file{/etc/pop3d.conf} use:
@example
mu acl --file=/etc/pop3d.conf \
mailutils acl --file=/etc/pop3d.conf \
--path=/server="213.130.1.232"/acl @var{address}
@end example
...
...
@@ -7593,61 +7669,61 @@ acl @{
@}
@end example
Then, running @command{mu acl --file=test.conf 127.0.0.1} you will get:
Then, running @command{mailutils acl --file=test.conf 127.0.0.1} you will get:
@@ -7818,7 +7894,7 @@ list of keys to delete to be specified as arguments in the command
line:
@example
mu dbm delete file.db foo bar
mailutils dbm delete file.db foo bar
@end example
The command above will delete from @file{file.db} records with keys
...
...
@@ -7834,18 +7910,18 @@ specified.
The @option{--glob} (@option{-G}) option instructs the tool to use UNIX globbing pattern matching. For example, the command below will delete all keys starting with @samp{foo} and ending with a decimal digit:
@example
mu dbm delete file.db 'foo*[0-9]'
mailutils dbm delete file.db 'foo*[0-9]'
@end example
@noindent
(note the quoting necessary to prevent shell from interpreting the
metacharacters itself).
Another option, @option{--regex} (@option{-R}) instructs @command{mu}
Another option, @option{--regex} (@option{-R}) instructs @command{mailutils}
to treat supplied keys as extended regular expressions:
Both options are affected by the @option{--ignore-case} (@option{-i})
...
...
@@ -7861,7 +7937,7 @@ the patterns match the right keys.
The @option{list} command lists the content of the database:
@example
mu dbm list file.db
mailutils dbm list file.db
@end example
By default, entire content is listed on the standard output.
...
...
@@ -7871,7 +7947,7 @@ rest of arguments after the database file name as the keys to look for
and lists only records with these keys:
@example
$ mu dbm list file.db foo bar
$ mailutils dbm list file.db foo bar
foo 1
bar 56
@end example
...
...
@@ -7888,13 +7964,13 @@ in a format suitable for backup or sending over the network (a
version 1.0 format).
@example
mu dbm dump file.db < file.dump
mailutils dbm dump file.db < file.dump
@end example
The produced file is suitable for input to the @option{create} (@option{load}) command. Among other uses, it provides an easy way to convert databases between various formats supported by Mailutils. For example this is how to convert the database file @file{file.db} to the GDBM database @file{new.db}:
Both @option{list} and @option{dump} subcommands share the same set of
...
...
@@ -7905,7 +7981,7 @@ backup purposes.
@node Dump Formats
@subsubsection Dump Formats
As of version @value{VERSION}, @command{mu dbm} supports two formats
As of version @value{VERSION}, @command{mailutils dbm} supports two formats
for dumping DBM databases. Both formats are line-oriented. Comments
are introduced with a sharp (@samp{#}) sign in the column 0 of a line,
followed by at least one white space character (space or tab). Sharp
...
...
@@ -7919,7 +7995,7 @@ separate line, which consists of the key and value separated by a
single @sc{tab} character. Empty lines are ignored. For example:
@example
$ mu list /etc/mail/users.db
$ mailutils list /etc/mail/users.db
root guessme
smith pAssword
qed fooBar
...
...
@@ -7936,7 +8012,7 @@ format is free from these drawbacks.
The @dfn{version 1.0} dump format begins with a @dfn{header}
containing important information about the file, such as its file
name, ownership and file mode. This information is stored in
pragmatic comments and allows @command{mu dbm load} to easily recreate
pragmatic comments and allows @command{mailutils dbm load} to easily recreate
an exact copy of the file. The following comments are defined:
@table @asis
...
...
@@ -7986,7 +8062,7 @@ Zm9vQmFyAA==
@node Dbm Exit Codes
@subsubsection Dbm Exit Codes
The table below summarizes exit codes used by @command{mu dbm}:
The table below summarizes exit codes used by @command{mailutils dbm}:
@multitable @columnfractions 0.2 0.3 0.5
@headitem Code @tab Symbolic name @tab Meaning
...
...
@@ -8004,43 +8080,43 @@ some kind of problem (e.g. access to the file denied, etc.)
@item 74 @tab EX_IOERR @tab Input/output error
@end multitable
@node mu logger
@subsection mu logger
The @command{mu logger} tool logs information using Mailutils log facility.
@node mailutils logger
@subsection mailutils logger
The @command{mailutils logger} tool logs information using Mailutils log facility.
Syntax:
@example
mu logger [@var{options}] [@var{message}]
mailutils logger [@var{options}] [@var{message}]
@end example
The @var{message} argument, if supplied, gives the text to log. If not supplied, the utility reads lines of text from standard input or a file (if the @option{--file} option is given) and sends them to log:
@example
# Send text to log
$ mu logger I am here
$ mailutils logger I am here
# Log each line from file.txt
$ mu logger --file file.txt
$ mailutils logger --file file.txt
# Read stdin and log it:
$ mu logger
$ mailutils logger
@end example
The default logging channel is bound to standard error. To bind it to
syslog, use the @option{--syslog} command line option. In that case
@command{mu} uses facility @samp{user} and priority @samp{err}. You
@command{mailutils} uses facility @samp{user} and priority @samp{err}. You
can change this by using the @option{--priority} (@option{-p}) option.
Its argument is either a syslog facility name or facility and severity
names separated by a dot. For example, the following invocation will use
facility @samp{auth}, severity @samp{info}:
@example
mu logger --priority auth.info
mailutils logger --priority auth.info
@end example
The syslog tag can be set using the @option{--tag} (@option{-t}) option:
@example
mu logger --tag myprog
mailutils logger --tag myprog
@end example
The default tag is @samp{mu-logger}.
...
...
@@ -8064,7 +8140,7 @@ optional @var{col} is the column number in that file.
For example, the following invocation:
@example
mu logger --locus mailutils.rc:34 Suspicious statement