GNU Mailutils |
|
General-Purpose Mail Package |
Official GNU Software |
By default, when a notification arrives, comsatd
prints subject,
from headers and the first five lines from the new message to the user’s
tty. The user is allowed to change this behavior by using his own
configuration file. This file should be located in the user’s home
directory and should be named .biffrc. It must be owned by the
user and have its permissions bits set to 0600. (Please note,
that the use of per-user configuration files may be disabled, by
specifying ‘allow-biffrc no’ in the main configuration file, see
see Configuring comsatd).
The .biffrc file consists of a series of statements. Each statement occupies one line and defines an action to be taken upon arrival of a new mail. Very long lines may be split using ‘\’ as the last character on the line. As usual, comments may be introduced with ‘#’ character.
The actions specified in .biffrc file are executed in turn. The following actions are defined:
Produce an audible signal.
Output the arguments to the user’s terminal device. If several arguments are given they will be output separated by single spaces. The newline character will be printed at the end of the output, unless the -n option is used.
Execute program prog with arguments from arglist. prog must be specified with absolute pathname. It may not be a setuid or setgid program.
In the description above, string denotes any sequence of characters. This sequence must be enclosed in a pair of double-quotes, if it contains whitespace characters. The ‘\’ character inside a string starts a C escape sequence. Following meta-characters may be used in strings:
Expands to username
Expands to hostname
Expands to value of message header ‘name’.
Expands to message body. c and l give maximum number of characters and lines in the expansion. When omitted, they default to 400, 5.
Dump to the user’s terminal the contents of ‘From’ and ‘Subject’ headers followed by at most 5 lines of message body.
echo "Mail to \a$u@$h\a\n---\n\ From: $H{from}\n\ Subject: $H{Subject}\n\ ---\n\ $B(,5)\ ---\n"
The above example can also be written as:
echo Mail to \a$u@$h\a echo --- echo From: $H{From} echo Subject: $H{Subject} echo --- echo $B(,5) echo ---
Produce a bell, then pop up the xmessage window on display :0.0 with the text formatted in the same manner as in the previous example.
beep exec /usr/X11R6/bin/xmessage \ -display :0.0 -timeout 10 "Mail to $u@$h \n---\n\ From: $H{from}\n\ Subject: $H{Subject}\n\ ---\n\ $B(,5)\ ---\n"
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.