Difference between revisions of "Mu"

From Mailutils
Jump to navigationJump to search
(Created page with "{{Note|This article is not yet finished}} <tt>Mu</tt> is a multi-purpose tool shipped with Mailutils. It can be used for various mail- and database-related tasks, as well as an ...")
 
(Change to a redirect link)
 
(61 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Note|This article is not yet finished}}
+
#REDIRECT [[Mailutils_(utility)]]
<tt>Mu</tt> is a multi-purpose tool shipped with Mailutils.  It can be used for various mail- and database-related tasks, as well as an auxiliary tool for compiling and linking programs with Mailutils.
 
 
 
== Syntax ==
 
 
 
<tt>Mu</tt> is a command line tool.  Its invocation syntax is:
 
 
 
<code>
 
mu [''options''] ''command'' [''args'']
 
</code>
 
 
 
where ''options'' are options that affect the behavior of <tt>mu</tt> as a whole, ''command'' instructs it what it is to do and ''args'' are any arguments the ''command'' needs in order to be executed.
 
 
 
The commands are:
 
 
 
;2047
 
:Decodes or encodes email message headers.
 
;acl
 
:Tests Mailutils access control lists;
 
;cflags
 
:Shows compiler options needed to compile with Mailutils.
 
;dbm
 
:Invokes a DBM management tool.
 
;filter
 
:Applies a chain of filters to the input.
 
;help
 
:Displays a terse help summary.
 
;imap
 
:Invokes an IMAP4 client shell (in development).
 
;info
 
:Displays information about Mailutils compile-time configuration.
 
;ldflags
 
:Constructs a [http://www.manpagez.com/man/1/ld ld](1) command line for linking a program with Mailutils.
 
;logger
 
:Logs information using Mailutils log facility.
 
;pop
 
:Invokes a POP3 client shell.
 
;query
 
:Queries configuration values.
 
;wicket
 
Scans [[wicket]]s for matching URLs
 
 
 
== help ==
 
The <tt>mu help</tt> command lists all available options and command names along with short descriptions of what each of them does.  It is similar to the <tt>mu --help</tt> option.
 
 
 
A command name can be supplied as an argument to <tt>help</tt>, in which case it will display a help page for that particular command, e.g.:
 
 
 
  mu help ldflags
 
 
 
will output help for the [[#ldflags|ldflags]] command.  It is synonymous to the <tt>--help</tt> option used with that particular command, e.g.: <tt>mu ldflags --help</tt>.
 
 
 
== info ==
 
The <tt>mu info</tt> command displays information about Mailutils compile-time configuration.  In normal form its output lists a single configuration flag per line, e.g.:
 
 
 
  $ mu info
 
  VERSION=2.99.93
 
  SYSCONFDIR=/etc
 
  MAILSPOOLDIR=/var/mail/
 
  SCHEME=mbox
 
  LOG_FACILITY=mail
 
  IPV6
 
  USE_LIBPAM
 
  HAVE_LIBLTDL
 
  WITH_GDBM
 
  WITH_GNUTLS
 
  WITH_GSASL
 
  ...
 
 
 
A configuration flag can consist either of a single word, indicating that a particular capability has been enabled at compile time, or of a keyword/value pair delimited by an equal sign, which indicates a particular value used by default for that feature. For example, <tt>IPV6</tt> means that Mailutils was compiled with support for IPv6, whereas <tt>SYSCONFDIR=/etc</tt> means that the default place for configuration files is in <tt>/etc</tt> directory.
 
 
 
Such short output is convenient for using <tt>mu info</tt> in scripts to decide whether it is possible to use a given feature.  To assist human users, the <tt>--verbose</tt> (<tt>-v</tt>) option is provided.  It prints a short description next to each flag:
 
 
 
  $ mu info --verbose
 
  VERSION=2.99.93          - Version of this package
 
  SYSCONFDIR=/etc          - System configuration directory
 
  MAILSPOOLDIR=/var/mail/  - Default mail spool directory
 
  SCHEME=mbox              - Default mailbox type
 
  LOG_FACILITY=mail        - Default syslog facility
 
  IPV6                      - IPv6 support
 
  USE_LIBPAM                - PAM support
 
  HAVE_LIBLTDL              - a portable `dlopen' wrapper library
 
  WITH_GDBM                - GNU DBM
 
  WITH_GNUTLS              - TLS support using GNU TLS
 
  WITH_GSASL                - SASL support using GNU SASL
 
  ...
 
 
== cflags ==
 
The <tt>mu cflags</tt> command shows compiler options needed to compile a C source with Mailutils.  It is intended for use in configuration scripts and Makefiles, e.g.:
 
 
 
  CFLAGS=-g -O2 `mu cflags`
 
 
 
== ldflags ==
 
The <tt>mu ldflag</tt> command is a counterpart of <tt>cflags</tt> used for linking.  It constructs a [http://www.manpagez.com/man/1/ld ld](1) command line for linking a program with Mailutils.
 
 
 
When used without arguments, it outputs <tt>ld</tt> arguments which would link only with the core Mailutils library [[libmailutils]]:
 
 
 
  $ mu ldflags
 
  -L/usr/local/lib -lmailutils
 
 
 
This command accepts a number of keywords which allow to select a particular subset of Mailutils libraries to link with.  In particular, the argument <tt>all</tt> instructs it to link in all available libraries:
 
 
 
  $ mu ldflags all
 
  -L/usr/local/lib -lmu_mbox -lmu_mh -lmu_maildir -lmu_imap -lmu_pop \
 
  -lmu_mailer -lmu_compat -lmailutils -lmu_auth -lgsasl -lgnutls -lgcrypt \
 
  -lldap -lgnuradius -lpam -ldl
 
 
 
Other available keywords are:
 
 
 
;mbox
 
:Link in the UNIX mbox format support.
 
;mh
 
:Link in the MH format support.
 
;maildir
 
:Link in the Maildir format support.
 
;imap
 
:Link in the IMAP protocol support.
 
;pop
 
:Link in the POP protocol support.
 
;nntp
 
:Link in the NNTP protocol support.
 
;mailer
 
:Enable support for [[mailer]]s.
 
;sieve
 
:Link in the support for [[Sieve]] mail filtering language.
 
;dbm
 
:Link in the support for DBM databases ([[libmu_dbm]] library).
 
;compat
 
:Provide a compatibility layer for Mailutils 2.x.
 
;auth
 
:Link in the Mailutils authentication library.
 
;guile
 
:Provide [[Guile]] language bindings.
 
;python
 
:Provide [[Python]] language bindings.
 
;cfg
 
:Link in the [[libmu_cfg|Mailutils configuration library]].
 
;argp
 
:Link in the library for command line parsing.
 
 
 
== query ==
 
Queries configuration values.
 
 
 
== 2047 ==
 
Decodes or encodes email message headers.
 
 
 
== filter ==
 
Applies a chain of filters to the input.
 
 
 
== acl ==
 
Tests Mailutils access control lists;
 
 
 
== wicket ==
 
Scans [[wicket]]s for matching URLs
 
 
 
== dbm ==
 
Invokes a DBM management tool.
 
 
 
== logger ==
 
Logs information using Mailutils log facility.
 
 
 
== pop ==
 
Invokes a POP3 client shell.
 
 
 
== imap ==
 
Invokes an IMAP4 client shell (in development).
 

Latest revision as of 10:37, 11 July 2015