|
GNU Mailutils |
General-Purpose Mail Package |
Official GNU Software |
| GNU Mailutils Manual (split by node): | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? |
guimb — A Mailbox Scanning and Processing Language Guimb is for mailboxes what awk is for text files.
It processes mailboxes, applying the user-supplied scheme procedures
to each of them in turn and saves the resulting output in mailbox
format.
The following configuration statements affect the behavior of
guimb:
| Statement | Reference |
|---|---|
| debug | See section Debug Statement. |
| mailbox | See section Mailbox Statement. |
| locking | See section Locking Statement. |
The Scheme program or expression to be executed is passed to
guimb via the following options:
Load Scheme source code from file.
Execute given scheme expression.
The above switches stop further argument processing, and pass all
remaining arguments as the value of (command-line).
If the remaining arguments must be processed by guimb itself,
use following options:
Execute scheme expression.
Load Scheme source code from file.
You can specify both of them. In this case, the file is read first, then expr is executed. You may still pass any additional arguments to the script using ‘--guile-arg’ option.
There are four basic ways of passing mailboxes to guimb.
guimb [options] [mailbox...]The resulting mailbox is not saved, unless the user-supplied scheme program saves it.
guimb [options] --mailbox defmboxThe contents of defmbox is processed and is replaced with the resulting mailbox contents. Useful for applying filters to user's mailbox.
guimb [options] --mailbox defmbox mailbox [mailbox...]The contents of specified mailboxes is processed, and the resulting mailbox contents is appended to defmbox.
guimb [options] --user username [mailbox...]The contents of specified mailboxes is processed, and the resulting
mailbox contents is appended to the user's system mailbox. This allows
to use guimb as a mail delivery agent.
If no mailboxes are specified in the command line, guimb reads
and processes the system mailbox of the current user.
Sometimes it is necessary to pass some command line options to the scheme procedure. There are three ways of doing so.
When using ‘--source’ (‘-s’) or ‘--code’ (‘-c’) options, all the rest of the command line following the option's argument is passed to Scheme program verbatim. This allows for making guimb scripts executable by the shell. If your system supports ‘#!’ magic at the start of scripts, add the following two lines to the beginning of your script to allow for its immediate execution:
#! /usr/local/bin/guimb -s !# |
(replace ‘/usr/local/bin/’ with the actual path to the guimb).
Otherwise, if you use ‘--file’ or ‘--expression’ options, the additional arguments may be passed to the Scheme program ‘-g’ (‘--guile-arg’) command line option. For example:
guimb --guile-arg -opt --guile-arg 24 --file progfile |
In this example, the scheme procedure will see the following command line:
progfile -opt 24 |
Finally, if there are many arguments to be passed to Scheme, it is more convenient to enclose them in ‘-{’ and ‘-}’ escapes:
guimb -{ -opt 24 -} --file progfile
|
This is a short summary of the command line options available to
guimb.
Start with debugging evaluator and backtraces.
Execute given Scheme expression.
Set path to the mailspool directory
Read Scheme program from progfile.
Append arg to the command line passed to Scheme program.
Pass all command line options enclosed between ‘-{’ and ‘-}’ to Scheme program.
Set default mailbox name.
Act as local MDA for user name.
Display help message.
Display program version.
| GNU Mailutils Manual (split by node): | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? |
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.