[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Configuration

The behavior of GNU Anubis is controlled by two configuration files. The system configuration file, `/etc/anubisrc', supplies system-wide settings that affect all users. This file is usually owned by root. The user configuration file specifies what GNU Anubis should do for a particular user. By default it is located in `~/.anubisrc'. This location can be changed if anubis operates in auth mode. The permissions of a user configuration file must be set to 0600 (u=rw,g=,o=), otherwise GNU Anubis won't accept the file.

Lexical Structure

Both configuration files use simple line-oriented syntax. Each line introduces a single statement. A statement consists of words, each word being defined as a contiguous sequence of non-whitespace symbols. The word may be composed of alphanumeric characters and any of the following punctuation symbols: `_', `.', `/', `-'. Any arbitrary sequence of characters enclosed in a pair of double quotes is also recognized as a word. Such a sequence is called quoted string.

Quoted strings follow the same syntax rules as in the C language. A backslash character `\' alters the meaning of the character following it. This special construct is called escape sequence. When processing an escape sequence, Anubis removes it from the string and replaces it with a single character as described in the following table:


Replaced with


Audible bell character (ASCII 7)


Backspace character (ASCII 8)


Escape (ASCII (ASCII 27)


Form-feed character (ASCII 12)


Newline character (ASCII 10)


Carriage return character (ASCII 13)


Horizontal tabulation character (ASCII 9)


Vertical tabulation character (ASCII 11)

Table 1: Backslash escapes

A backslash followed by any character not listed above is replaced by the character alone. This can be used, in particular, for inserting `"' character within a string, as in the example below:

"This string contains \"quoted string\"."

Similarly, a backslash followed by a newline is replaced by the newline itself. Thus, the following two strings are equivalent:

"This string is split\nover two lines"

"This string is split\
over two lines"

The familiar shell here document syntax can be used to produce a word containing several lines of text. The syntax is:


If "here document" starts with `<<-', then all leading tab characters are stripped from input lines and the line containing delimiter. This allows to indent here-document in a natural fashion.

To summarize all the above, let's consider an example:

first-word "second word" <<-EOT
                            Third word
                            containing several
                            lines of text

This line contains three words: `first-word', `second word' and the third one composed of the three lines between the `EOT' markers.

If a statement is very long, it may be split among several lines of text. To do so, end each line with a backslash (`\'), immediately before the newline, as in:

a very long statement\
  occupying several lines\
  of text

A `#' in a line starts a comment. The `#' character and the rest of the line following it are ignored. Comments may appear anywhere in the configuration file, except within a command line or a "here-document" construct. A line containing just a comment (with optional whitespace before it) is effectively blank, and is ignored. For example:

# This is a comment
if header[Subject] :re "No.*"  # This is also a comment
  guile-process action-name This # is not a comment!!!

Logical Structure

Statements in a configuration file are grouped into sections. Each section has its name. A section begins with one of the following constructs:

BEGIN name
---BEGIN name---

and ends with one of the following constructs:


Notice, that both `BEGIN' and `END' must be uppercase. When using the second form, any amount of whitespace is allowed between the three dashes and the word.

Sections cannot be nested.

There are five predefined sections, whose names are in uppercase. The user may define his own sections, which may then be referred to from the RULE section as subroutines (see section Call Action).

The predefined section names are:


Defines authentication mechanisms.


This section specifies the basic GNU Anubis behavior. Its presence is required in the system configuration file. It may be used in the user configuration file to override the system-wide settings.


This section specifies a translation map for mapping remote user names to local ones. It may be used only in the system-wide configuration file.


Configures the Guile interpreter. This section is allowed in both configuration files.


Defines rules that for altering the message contents.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on May, 24 2014 using texi2html 1.76.