[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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.
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:
Sequence | Replaced with |
\a | Audible bell character (ASCII 7) |
\b | Backspace character (ASCII 8) |
\e | Escape (ASCII (ASCII 27) |
\f | Form-feed character (ASCII 12) |
\n | Newline character (ASCII 10) |
\r | Carriage return character (ASCII 13) |
\t | Horizontal tabulation character (ASCII 9) |
\v | Vertical tabulation character (ASCII 11) |
Table 4.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:
<<[-]delimiter text delimiter
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 EOT
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!!! fi
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:
END ---END---
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.
4.1 AUTH Section | ||
4.2 CONTROL Section | ||
4.3 TRANSLATION Section | ||
4.4 GUILE Section |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The AUTH
session controls various aspects of authentication mode.
Configures the greeting message issued by GNU Anubis upon accepting SMTP connection.
Defines the message issued in response to SMTP
HELP
command. Help-text is a list of strings. Each string
from the list will be displayed on a separate response line.
Sets URL of the user database (see section User Database).
Defines the list of allowed authentication methods.
Sets the SASL service name. It is used, among others, with GSSAPI authentication method. Default is ‘anubis’.
Sets the SASL hostname. By default, the server determines it automatically. If it happens to make a wrong guess, you can fix it using this directive.
Sets the SASL realm. By default, the local domain is used as SASL realm (see section local-domain).
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The ‘CONTROL’ section defines basic GNU Anubis behavior. If used in the system-wide configuration file, it applies to all users in the system. Each user can have a ‘CONTROL’ section in his configuration file, to customize his personal settings. Of course, not all options can be set or changed by the user. Some options can only be set in the system configuration file, and some only in the user configuration file. By default, options specified in the user configuration file have a higher priority than those specified in system configuration file.
All option names are case insensitive, so that
bind
or BIND
or BiNd
all refer to the same option.
4.2.1 Basic Settings | ||
4.2.2 Output Settings | ||
4.2.3 SOCKS Proxy | ||
4.2.4 ESMTP Authentication Settings | ||
4.2.5 Encryption Settings | ||
4.2.6 Security Settings |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Specify the TCP port on which GNU Anubis listens for connections. The default host value is ‘INADDR_ANY’, which means that anyone can connect to GNU Anubis. The default port number is 24 (private mail system). This option is available only in the system configuration file.
For example, to bind GNU Anubis to port 25 (SMTP) and limit its clients only to those from ‘localhost’, set the following in your system configuration file:
bind localhost:25
Specify a host name or IP address of the remote SMTP. GNU Anubis will forward mails to that server. The default port number is 25. This option is available in both configuration files.
Execute a local SMTP server, which works on standard input and output (inetd-type program). For example:
local-mta /usr/sbin/sendmail -bs
The ‘CONTROL’ section must contain either local-mta
or
remote-mta
, but not both.
Selects Anubis operation mode. Allowed values for mode-name are:
See section Authentication, for the detailed discussion of GNU Anubis operation modes.
Normally, when processing a multi-part message with external
filter (see section Using an External Processor), Anubis feeds
only the first part to the filter. The rest of the message is copied
verbatim. To alter this behavior so that your external program
sees the entire message body, set read-entire-body yes
in your control section.
Sets the file name of the file that contains DES keys to use when
decoding responses from the auth
(ident
) server.
This file is used if auth
server encrypts its responses.
See section Auth Service, for details.
Declares the name of command section for incoming mail. Default is ‘INCOMING’. This option is available only for system configuration file. See section Using Anubis to Process Incoming Mail, for detailed description of incoming mail processing.
Declares the name of command section for outgoing mail. Default is ‘RULE’. This option is available only for system configuration file.
Declares the name of command section for rewriting SMTP commands. Default is ‘SMTP’. This option is available only for system configuration file. See section Modifying SMTP Commands.
Tag syslog messages with string. Default is ‘anubis’.
Use syslog facility string for logging. Valid argument values are: ‘user’, ‘daemon’, ‘auth’, ‘authpriv’, ‘mail’, ‘cron’, ‘local0’ through ‘local7’ (all names case-insensitive, optionally prefixed by ‘log_’), or a decimal facility number. Default is ‘mail’.
Set local domain name. By default, the domain name is defined as the part of the local host name following the first dot.
Local domain name is used as SASL realm, unless overridden by ‘sasl-realm’ statement (see section sasl-realm).
Enable the Pluggable Authentication Module interface. If set to
yes
, anubis
will uses PAM for accounting and session
management (service name ‘anubis’).
The default is yes
if PAM support is compiled in.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Defines logging verbosity level. Allowed values are:
Only errors are logged. This is the default level.
Produce more diagnostic output.
Produce debugging output.
Do not log anything.
This command is allowed only in the system configuration file.
This command sets the name of additional log file. GNU Anubis logs there messages about user’s SMTP session, as defined by the ‘loglevel’ statement (see below). For example:
logfile "anubis.log"
This will direct additional logging to the ‘~/anubis.log’ file in the user’s home directory.
This option defines verbosity level for the additional log file. It may be used only in user configuration file. Allowed values for level are:
Log only failure messages.
Log all relevant messages.
This option instructs anubis
to log the execution of
tests and actions from the RULE sections. This is useful
for debugging configuration files.
When this option is used in the system-wide configuration file, only boolean argument is allowed. Using ‘tracefile yes’ enables logging of actions and tests to the default syslog channel. Using ‘tracefile no’ disables it.
When used in the user configuration file, a filename is allowed as an argument to this option. This allows you to explicitly specify to which file the tracing output should go. Otherwise, using ‘tracefile yes’ enables logging to the same file as ‘logfile’ (if possible).
Do not use this option, unless you are developing or debugging Anubis!
This option instructs each child process to hang for the given number of seconds. Before hanging, the process issues the following diagnostic message:
Child process suspended for delay seconds
This option is useful for Anubis developers who wish to
attach to a child process with debugger. After attaching, set the
variable _anubis_hang
to zero to continue processing. You may
wish to add the following statement to your ‘.gdbinit’ file:
set variable _anubis_hang=0
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Enables tunneling incoming connections through a SOCKS proxy server, specified as an argument host. The default value for port is 1080, which is a common port number for SOCKS proxies.
Use SOCKS protocol version 4. By default it is turned off, and version 5 of the SOCKS protocol is used.
Sets user name and password for the SOCKS proxy server.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following options set authentication credentials for ESMTP authentication. They are useful, for example, if your MTA requires such an authentication, but your MUA does not support it.
You can also use these statements in a ‘SMTP’ section. See section Modifying SMTP Commands, for a detailed description of this feature.
Defines the list of allowed authentication mechanisms. Mech-list is a list of valid authentication mechanism names separated by whitespace.
Anubis selects the authentication method using the following algorithm: MTA presents a list of authentication methods it supports. For each element in mech-list, Anubis tests whether it is available in the list presented by MTA. If found, this method is selected. For example, suppose that the MTA reports the following supported mechanisms:
PLAIN LOGIN CRAM-MD5 ANONYMOUS
and in your configuration file you have:
esmtp-allowed-mech DIGEST-MD5 CRAM-MD5 LOGIN
Then, Anubis will select ‘CRAM-MD5’.
Declares the list of mechanisms that can be used only over a TLS encrypted channel. By default Anubis uses
esmtp-require-encryption LOGIN PLAIN
This prevents sending user password over an unencrypted connection.
By default, ESMTP authentication is attempted as early as possible, normally while handling the client ‘EHLO’ command.
When this statement is set to ‘yes’, authentication is delayed
until the client issued the ‘MAIL’ command. This will allow
anubis
to select authentication credentials depending on the
sender email. For a detailed description of this feature, see
Modifying SMTP Commands.
Sets authentication ID (user name).
Sets authorization ID (user name).
Sets ESTMP AUTH password.
This is a shortcut to set both authentication and authorization IDs and the password. It is equivalent to
esmtp-auth-id username esmtp-authz-id username esmtp-password password
The following options specify authentication credentials for GSSAPI, DIGEST-MD5 and KERBEROS_V5 authentication mechanisms:
Sets the name of GSSAPI service.
Sets hostname of the machine.
Sets generic service name.
Sets passcode.
Sets GSSAPI realm.
The following option is useful with the ‘ANONYMOUS’ authentication mechanism:
Sets the token to be used with the ‘ANONYMOUS’ authentication mechanism
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Enable or disable the TLS/SSL encryption between the MUA and the MTA. The default is ‘no’, but using the TLS/SSL encryption is recommended. You should also set your private key and certificate using the ‘ssl-key’ and ‘ssl-cert’ keywords (defined below).
See section Using the TLS/SSL Encryption, for details.
Enable the ONEWAY encryption. Set ssl-oneway yes
,
if you want to use the TLS/SSL, but your MUA
doesn’t support ESMTP TLS/SSL. Using
this option does not require setting the ‘ssl-key’ and
‘ssl-cert’ options.
Sets cipher suite preferences to use. The list argument is either a single initial keyword or a colon-separated list of TLS keywords. The description of TLS keywords is well beyond the scope of this document. Please refer to Priority Strings in GnuTLS Manual, for a detailed discussion.
The default priority list is ‘NORMAL’.
Specify the certificate for the TLS/SSL encryption.
Default for file-name is ‘anubis.pem’.
Set the private key for the TLS/SSL encryption.
The default file-name is ‘anubis.pem’.
Specify CA certificate file (supported only by GnuTLS).
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following options control various security settings.
If this option is set to ‘yes’, anubis
drops
sessions which failed verification by the IDENT service.
This option is in effect only in ‘transparent’ mode.
Default is ‘no’.
Defines the unprivileged user, i.e. the user with whose
privileges anubis
runs most of the time. This option is
available only in the system configuration file. For example:
user-notprivileged "anubis"
Caution: This user must exist in the system user database (‘/etc/passwd’).
This statement defines the order of execution of the system and user
RULE
sections (See section The Rule System, for a detailed description).
It is available only in system configuration file.
Allowed values are:
system
First execute the system section, then the user one.
user
First execute the user section, then the system one.
system-only
Execute only the system RULE
section.
user-only
Execute only the user RULE
section.
Sets the order of processing CONTROL
sections. This option is
available only in system configuration file.
Allowed values are:
system
The system CONTROL
section is processed first. Notice, that
this means that the user may override the system settings in his
configuration file. This is the default setting.
user
The user CONTROL
section is processed first. Thus, the
system-wide settings always override users’ private settings.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The ‘TRANSLATION’ section specifies how to translate remote or local user names, or host names or addresses, to local user names. The ‘TRANSLATION’ section is available only in the system configuration file. The syntax is:
---BEGIN TRANSLATION--- translate [user@]address into username ... ---END---
address means host name or IP address. You can also specify ‘0.0.0.0’, and it means any address (‘INADDR_ANY’).
For example:
BEGIN TRANSLATION translate jack@example.net into john END
This rule will allows the remote user ‘jack’ at ‘example.net’ to use the configuration file of the local user ‘john’.
In the contrast, this statement:
translate example.net into john
means that all users at ‘example.net’ are allowed to use the local john’s configuration file.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Specifies the name of the file to bind to the Scheme standard error and output ports.
By default both ports are redirected to syslog. The standard error port uses the ‘err’ priority, and the standard output port writes to the ‘warning’ priority.
This option has no effect if GNU Anubis is started with either ‘--foreground’ or ‘--stdio’ command line option.
When set to ‘yes’, enables Guile stack traces and debugging output.
Appends the given path to the list of Guile load paths (see %load-path in The Guile Reference Manual).
Reads the given Scheme program.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on January 6, 2024 using texi2html 5.0.