This is anubis.info, produced by makeinfo version 4.8 from anubis.texi. Copyright (C) 2001, 2002 Wojciech Polak. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being "A GNU Manual", and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled "GNU Free Documentation License". (a) The FSF's Back-Cover Text is: "You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." INFO-DIR-SECTION GNU Packages START-INFO-DIR-ENTRY * Anubis: (anubis). The GNU outgoing mail processor. END-INFO-DIR-ENTRY  File: anubis.info, Node: Top, Next: Overview, Up: (dir) 1 GNU Anubis ************ This edition of the `GNU Anubis Manual', last updated 15 December 2002, documents GNU Anubis Version 3.6.2. * Menu: * Overview:: Preliminary information. * Configuration:: Writing your own configuration files. * Invoking Anubis:: How to invoke the GNU `anubis'. * Sample Beginning:: Here is a sample beginning. * TLS/SSL:: Using the TLS/SSL Encryption. * Problems:: Reporting bugs. Appendices * GNU Free Documentation License:: This manual is under the GNU Free Documentation License. Indices * Concept Index:: Index of concepts.  File: anubis.info, Node: Overview, Next: Configuration, Prev: Top, Up: Top 2 Overview ********** GNU Anubis is an outgoing mail processor. It goes between the MUA (Mail User Agent) and the MTA (Mail Transport Agent), and can perform on the fly various sorts of processing and conversion on the outgoing mail in accord with the sender's specified rules, based on a highly configurable regular expressions system. It operates as a proxy server, independently from mail user agents. GNU Anubis can edit outgoing mail headers, encrypt and/or sign mail with the GNU Privacy Guard, build secure SMTP tunnels (Simple Mail Transport Protocol) using the TLS/SSL encryption even if your mail user agent doesn't support it, or tunnel a connection through a SOCKS proxy server. --------* --------** ------*** | MUA | ---> | Anubis | ---> | MTA | --------- ---------- --------- * Mail User Agent (client) ** An outgoing mail processor and the SMTP tunnel. *** Mail Transport Agent (server) Some quick definitions: "Protocol"--any standard for the exchange of information. A protocol defines the specific wording and control flow for communications between two or more programs, devices, or systems. "SMTP"--Simpe Mail Tansport Protocol is a common mechanism for exchanging mail across a network. This protocol is described in the RFC 821 document. "Daemon"--We use a term "daemon" as a process that runs in the background, doing automated processing. "Server"--a server provides information or other services for its clients. Most network protocols are client-server based. This term usually refers to an entire machine, but it can refer (and we're doing that) also to the particular program or process, on that machine, that provides the service. "Proxy"--We use a term "proxy" to define a program, which goes between the MUA and the MTA (it makes a tunnel). It can be used as a gateway to an outside world, while using a firewall. The firewalled host sends a data to the proxy server, which forwards it to the real server outside, collects the response, and passes it back to the internal host.  File: anubis.info, Node: Configuration, Next: Invoking Anubis, Prev: Overview, Up: Top 3 Configuration *************** The behavior of GNU Anubis is controlled by two configuration files. The "system configuration file", `/etc/anubisrc', specifies system-wide options that affect all users. This file is usually owned by root. The "user configuration file", `~/.anubisrc', specifies what GNU Anubis should do for a particular user. To protect your passwords in the configuration files, use the 0600 (u=rw,g=,o=) permissions, otherwise GNU Anubis won't accept them. Hash-marked comments (`#') and white lines in the configuration files are ignored. The system configuration file may contain the following sections: 1. "The CONTROL section". Required. This specifies the basic GNU Anubis behavior. 2. "The TRANSLATION section". Optional. This specifies a translation map for remapping remote or local users. The user configuration file may contain the following sections: 1. "The CONTROL section". Optional. This specifies the basic GNU Anubis behavior. 2. "The ALL section". Optional. This specifies what jobs GNU Anubis does for _all_ your outgoing messages. 3. "The Rule System". Optional. Here you can define your own processing rules for any particular message. * Menu: * CONTROL Section:: * TRANSLATION Section:: * ALL Section:: * Rule System::  File: anubis.info, Node: CONTROL Section, Next: TRANSLATION Section, Prev: Configuration, Up: Configuration 3.1 The CONTROL Section ======================= The `CONTROL' section specifies the basic GNU Anubis behavior. Specified in the system configuration file, it applies to all users on the machine, but each user can specify its own `CONTROL' section, to customize own settings. Of course, not all options can be set or change by user. Some options can only be set in the system configuration file, and some only in user configuration file. Options specified in user configuration file have a *higher* priority that those specified in system configuration file. The `CONTROL' section starts with the `---BEGIN CONTROL---' line, and the `---END---' line ends it. All option names are case insensitive, so you can use for instance: `bind' or `BIND' or `BiNd', and so on. * Menu: * Basic Settings:: * Output Settings:: * Proxy Settings:: * Encryption Settings:: * Security Settings:: * Option Summary::  File: anubis.info, Node: Basic Settings, Next: Output Settings, Prev: CONTROL Section, Up: CONTROL Section 3.1.1 Basic Settings -------------------- `bind = [HOST:]PORT' 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. If you would like, for instance, to bind GNU Anubis to port 25 (SMTP) and limit its clients only to those from `localhost', then set the following in your system configuration file: bind = localhost:25 `remote-mta = HOST[:PORT]' Specify a remote SMTP host name or IP address, which GNU Anubis will connect and forward mail to (after a processing). The default PORT number is 25. This option is available in both configuration files. `local-mta = FILE-NAME [ARGS]' Execute a local SMTP server, which works on standard input and output (inetd-type program). This option excludes the `remote-mta' keyword (or `--remote-mta' command line option). For example: local-mta = /usr/sbin/sendmail -bs `esmtp-auth = USERNAME:PASSWORD' This option allows you to specify a user name and a password for the ESMTP authentication. Use this option if your MTA requires such an authentication, but your MUA does not support it. A user name (USERNAME) and a password (PASSWORD) are separated with a colon (`:'). Currently only "CRAM-MD5" and "LOGIN" authentication methods are supported (and "CRAM-MD5" has a priority). The "LOGIN" method, for security reasons, can only be used both with the TLS/SSL encryption.  File: anubis.info, Node: Output Settings, Next: Proxy Settings, Prev: Basic Settings, Up: CONTROL Section 3.1.2 Output Settings --------------------- `termlevel = NORMAL-VERBOSE-DEBUG-SILENT' This is a logging level for `syslogd' or a terminal (if using the `--foreground' command line option). Value `normal' is the default. Value `verbose' makes a more diagnostic output, and `debug' raises it even more. Value `silent' disables an output, e.g. `termlevel = silent'. Only in system configuration file. `logfile = FILE-NAME' This option specifies an additional file, where GNU Anubis can log its information, but only those information available for a client. Only in user configuration file. For example: logfile = anubis.log This will log to the `~/anubis.log' file in a client's home directory. `loglevel = NONE-FAILS-ALL' This option specifies an output level for an additional file (`logfile'). Value `fails' is the default, and it logs only all fails. Only in user configuration file.  File: anubis.info, Node: Proxy Settings, Next: Encryption Settings, Prev: Output Settings, Up: CONTROL Section 3.1.3 Proxy Settings -------------------- `socks-proxy = HOST[:PORT]' This option enables tunneling the connections through a SOCKS proxy server, specified as an argument HOST. The PORT default value is 1080, which is a common port number for SOCKS proxies. `socks-v4 = YES-OR-NO' This specifies a SOCKS protocol version 4. By default it is turned off, and a default mode is SOCKS protocol version 5. `socks-auth = USERNAME:PASSWORD' Specify a user name and a password, if a SOCKS proxy server requires them. A user name (USERNAME) and a password (PASSWORD) are separated with a colon (`:').  File: anubis.info, Node: Encryption Settings, Next: Security Settings, Prev: Proxy Settings, Up: CONTROL Section 3.1.4 Encryption Settings ------------------------- `ssl = YES-OR-NO' This option enables the TLS/SSL encryption between the MUA (Mail User Agent) and the MTA (Mail Transport Agent). Value `no' is the default, but using the TLS/SSL encryption is recommended. You should also specify a private key and a certificate using the `key' and `cert' keywords (defined below). *Note TLS/SSL::, for details. `oneway-ssl = YES-OR-NO' This option enables the "ONEWAY" encryption. Use this mode, when you want to use the TLS/SSL, but your MUA (Mail User Agent) doesn't provide a support for ESMTP TLS/SSL. Using this option doesn't require using the `key' and `cert' keywords. `cert = FILE-NAME' Specify a certificate for the TLS/SSL encryption. Value `anubis.pem' is the default. `key = FILE-NAME' Specify a private key for the TLS/SSL encryption. Value `anubis.pem' is the default. `cafile = FILE-NAME' Specify a CA certificate file (supported only by GnuTLS).  File: anubis.info, Node: Security Settings, Next: Option Summary, Prev: Encryption Settings, Up: CONTROL Section 3.1.5 Security Settings ----------------------- `allow-local-mta = YES-OR-NO' For security reasons, this option is set to `no', but the `yes' value enables the `local-mta' keyword (or `--local-mta' command line option), so if you want to use a local mail server, which works on standard input and output, a supervisor must set this option to `yes'. Only in system configuration file. `user-notprivileged = USERNAME' For security reasons, it is recommended to create an unprivileged user, which the server runs as most of the time, when doing unprivileged operations. Only in system configuration file. For example: user-notprivileged = anubis.unprivileged *Caution:* Create a user account named `anubis.unprivileged' in the `/etc/passwd', if necessary. Add this user name also to the `/etc/anubis.allow', if using GNU Anubis with PAM support.  File: anubis.info, Node: Option Summary, Prev: Security Settings, Up: CONTROL Section 3.1.6 Option Summary -------------------- ---BEGIN CONTROL--- bind = [HOST:]PORT (system config only) remote-mta = HOST[:PORT] local-mta = FILE-NAME [ARGS] esmtp-auth = USERNAME:PASSWORD termlevel = NORMAL-VERBOSE-DEBUG-SILENT (system config only) logfile = FILE-NAME (user config only) loglevel = NONE-FAILS-ALL (user config only) socks-proxy = HOST[:PORT] socks-v4 = YES-OR-NO socks-auth = USERNAME:PASSWORD ssl = YES-OR-NO oneway-ssl = YES-OR-NO cert = FILE-NAME key = FILE-NAME cafile = FILE-NAME allow-local-mta = YES-OR-NO (system config only) user-notprivileged = USERNAME (system config only) ---END---  File: anubis.info, Node: TRANSLATION Section, Next: ALL Section, Prev: CONTROL Section, Up: Configuration 3.2 The TRANSLATION Section =========================== 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. It starts with the `---BEGIN TRANSLATION---' line, and the `---END---' line ends it. Syntax: ---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'). An example: ---BEGIN TRANSLATION--- translate = jack@somewhere.net into = john ---END--- The rule above will allow a remote user `jack' at `somewhere.net' to use the configuration file of the local user `john'. Or you can write: `translate = somewhere.net into = john', and this means that _all_ users at `somewhere.net' are allowed to use the local john's configuration file.  File: anubis.info, Node: ALL Section, Next: Rule System, Prev: TRANSLATION Section, Up: Configuration 3.3 The ALL Section =================== This section specifies a behavior of an outgoing mail processor in the case of _every_ outgoing message (unconditional rules). This section is available _only_ in the user configuration file. The `ALL' section starts with the `---BEGIN ALL---' line, and the `---END---' line ends it. Syntax: ---BEGIN ALL--- ACTION-LIST ---END--- *Note Action List::, for details. An example: ---BEGIN ALL--- signature-file-append = yes ---END--- The example above will add the `~/.signature' file to _every_ outgoing message!  File: anubis.info, Node: Rule System, Prev: ALL Section, Up: Configuration 3.4 The Rule System (The RULE Section) ====================================== GNU Anubis' rule system is based on "regular expressions" ("POSIX Basic", "POSIX Extended", or "Perl regular expressions"). All of them can be used in a run time. According to the GNU's documentation, a "regular expression" (or "regexp", or "pattern") is a text string that describes some (mathematical) set of strings. A regexp R "matches" a string S if S is in the set of strings described by R. For more information about "regular expressions", read the GNU regular expression library manual and the regex manual. In addition, you can also read the Perl regular expressions manual. The rule system is available only for GNU Anubis clients, so it can only be used in the user configuration file. The whole rule system starts with the `---BEGIN RULE---' line, and the `---END---' line ends it. * Menu: * Grammar:: * Action List:: * Trigger::  File: anubis.info, Node: Grammar, Next: Action List, Prev: Rule System, Up: Rule System 3.4.1 Grammar (The Rule System) ------------------------------- General syntax: if WHERE [: OPTIONS] =REGEX1[ != REGEX2] ACTION-LIST fi Each rule starts with the `if' command, and ends with the `fi' or `done' command. The first regular expression (REGEX1) is required. The second one (REGEX2) is optional. Here is a simple rule: if WHERE =REGEX1 ACTION-LIST fi The rule above is true if REGEX1 is _true_. Another way: if WHERE =REGEX1 != REGEX2 ACTION-LIST fi The rule above is true if REGEX1 is _true_ and REGEX2 is _false_. The control operator `!=' breaks regular expressions into two pieces: REGEX1 and REGEX2. *Caution:* The WHERE means `COMMAND' or `HEADER', for example: ---BEGIN RULE--- if COMMAND [: OPTIONS] =REGEX1[ != REGEX2] ACTION-LIST fi if HEADER [: OPTIONS] =REGEX1[ != REGEX2] ACTION-LIST fi ---END--- `COMMAND' says to match this regexp against all the SMTP/ESMTP commands, like `helo', `ehlo', `mail from', `rcpt to', `data', `quit', etc. if COMMAND =^mail from:.*? ACTION-LIST fi `HEADER' says to match this regexp against all the header lines in the message. We often use thus with a regexp that matches only a particular kind of header line--for instance, the regexp `^Subject:' will only match a `Subject' header line. But this is not a requirement. You can use any regexp you wish, and it will have a chance to match every header line in the message. if HEADER [: OPTIONS] =^Subject: test ACTION-LIST fi The OPTIONS area is optional, and it allows you to specify any extra option for a particular regexp match. The OPTIONS area must be preceded with a colon (`:'). The following options are acceptable: `basic', `perlre', `scase'. `basic' This option forces "POSIX Basic Regular Expression" syntax when interpreting regex instead of "POSIX Extended Regular Expression" (Extended is the default). `perlre' This option forces "Perl Regular Expression" syntax when interpreting regex instead of "POSIX Extended Regular Expression". To enable this option, you must compile GNU Anubis, specifying `./configure --with-pcre'. `scase' This option makes a particular regular expression case sensitive. By default, all regular expressions are case insensitive. An example: if header : perlre scase =^Subject: HeLlo ACTION-LIST fi In this case, the Perl regular expression syntax will be used instead of POSIX extended version, and case sensitivity will be set. *Caution:* Do not mix the `perlre' option with `basic' option. If you specify the Perl regular expression, then you cannot use the POSIX Basic syntax, and vice versa. The whole rule system is case insensitive (even regular expressions, unless you specify the `scase' option), so you can write for instance: IF HeAdEr =REGEX1[ != REGEX2] ACTION-LIST FI General example: ---BEGIN RULE--- if header =^Subject: != ^Subject: URGENT signature-file-append = yes fi ---END--- The example above will add the `~/.signature' file, except an email with a subject `urgent' (case insensitive). No extra options have been specified in this example.  File: anubis.info, Node: Action List, Next: Trigger, Prev: Grammar, Up: Rule System 3.4.2 The Action List --------------------- An "action list" is a list of action commands, which control processing of an outgoing messages. All action command names are case insensitive, so you can use for instance: `add' or `ADD' or `AdD', and so on. * Menu: * Editing Headers:: How to edit a message header on-the-fly. * Inserting Files:: How to append text files to an outgoing message. * Mail Encryption:: How to encrypt a message on-the-fly. * Remailers:: How to enable the support for Remailers Type-I. * External Processor:: How to process a message body using an external tool. * Command Summary:: A short command summary. * Quick Example:: A quick example of using an action list.  File: anubis.info, Node: Editing Headers, Next: Inserting Files, Prev: Action List, Up: Action List 3.4.2.1 Editing Headers ....................... `add = HEADER-LINE' This action command adds the HEADER-LINE to an outgoing message. For example: add = X-Comment: GNU's Not Unix! `remove = HEADER-LINE (a regular expression)' This action command removes the header lines that match HEADER-LINE from an outgoing message. This has to be a regular expression. For example: remove =^X-Mailer: This will remove the `X-Mailer:' line from an outgoing message. `modify = OLD-HEADER-LINE >> NEW-HEADER-LINE' This action command modifies a message header line (entirely or partly). An old header line (must be a regular expression) and a new header line are separated with ` >> ', i.e. `>>'. For example, the following code will change the `Reply-To:' line only if you would send an email to `friend@somewhere.net'. if header =^To:.*? modify =^Reply-To: >> Reply-To: private@somewhere.net fi Another example will change the `X-Mailer: PINE' line to `X-Mailer: The Big Boss' entirely. if header =^X-Mailer: PINE modify =^X-Mailer: >> X-Mailer: The Big Boss fi Using the "subexpressions" (or "substrings") and "back-references", you can make a substitution, like this: if header =^X-Mailer: (.*) modify =^X-Mailer: >> X-Mailer: The lousy mailer \1 fi It is allowed to make up to nine substitutions (range: \1--\9).  File: anubis.info, Node: Inserting Files, Next: Mail Encryption, Prev: Editing Headers, Up: Action List 3.4.2.2 Inserting Files ....................... `signature-file-append = YES-OR-NO' This action command adds at the end of a message body the `--' line, and includes a client's `~/.signature' file. Value `no' is the default. `body-append = FILE-NAME' This action command includes at the end of a message body a client's `FILE-NAME' file (a plain text). `body-clear-append = FILE-NAME' Same as above, but wipes out a message (message body + any attachments) before including a message body from a FILE-NAME file. This action command is rarely useful.  File: anubis.info, Node: Mail Encryption, Next: Remailers, Prev: Inserting Files, Up: Action List 3.4.2.3 Mail Encryption ....................... `gpg-passphrase = PASSPHRASE' Specify your private key's pass phrase for signing an outgoing message using the GNU Privacy Guard (a tool compatible with the Pretty Good Privacy). Of course, to protect your passwords in the configuration file use the 0600 (u=rw,g=,o=) permissions, otherwise GNU Anubis won't accept them. We recommend setting the `gpg-passphrase' in a one place of your configuration file, e.g. put it in the "ALL" section. GNU Anubis supports the GNU Privacy Guard via the "GnuPG Made Easy" library, available at `http://www.gnupg.org/gpgme.html'. `gpg-encrypt = GPG-KEYS' This command enables encrypting your outgoing message with the GNU Privacy Guard (Pretty Good Privacy) public key(s). Comma separated list of keys. gpg-encrypt = John's public key `gpg-sign = PASSPHRASE or `yes' if `gpg-passphrase' is specified.' This command enables signing your outgoing message with your GNU Privacy Guard private key. Specify the PASSPHRASE, or set it to `yes' if you have already specified the `gpg-passphrase'. For example: gpg-sign = PASSPHRASE or gpg-passphrase = PASSPHRASE gpg-sign = yes `rot13-subject = YES-OR-NO' This command enables the simple ROT-13 message subject encoding. Value `no' is the default. The ROT-13 encoding is a simple form of encryption in which the letters A-M are transposed with the letters L-Z. It is often used in Usenet postings/mailing lists to prevent people from accidentally reading a disturbing message. `rot13-body = YES-OR-NO' This command enables the simple ROT-13 message body encoding. Value `no' is the default.  File: anubis.info, Node: Remailers, Next: External Processor, Prev: Mail Encryption, Up: Action List 3.4.2.4 Remailers Type-I ........................ `rm-rrt = EMAIL-ADDRESS' This enables a support for the remailers (it allows sending mail in an anonymous way), by adding a special lines in a message body. This command specifies the "Request Remailing To" (`Anon-To:' line). Set this to a recipient's email address. GNU Anubis supports only remailers Type-I (aka Cypherpunks). `rm-post = NEWS-GROUP' This command adds the `Anon-Post-To: NEWS-GROUP' line, and transform an email to a news-mail for sending it to the Usenet via a remailer. This is only possible with a remailer, which supports the `Anon-Post-To:'. For example: rm-post = alt.unix `rm-gpg = GPG-KEY' This makes an outgoing message encrypted with a remailer's PGP public key, and you must set this, if a remailer requires such an encryption. `rm-header = HEADER-LINE' This action command adds an extra header line to a remailed message. `rm-lt = TIME' The `Latent-Time:' line causes a remailer to keep your message for some time before forwarding it. For example (2h): rm-lt = 2:00 `rm-rlt = YES-OR-NO' This command forces the "random Latent-Time" over the `Latent-Time:' and it is a random delay. Value `no' is the default.  File: anubis.info, Node: External Processor, Next: Command Summary, Prev: Remailers, Up: Action List 3.4.2.5 Using an External Processor ................................... `external-body-processor = FILE-NAME [ARGS]' This action command enables an external message body processor, which works on standard input and output. It could be an additional crypto engine, a spell checker, some text generator, whatever.  File: anubis.info, Node: Command Summary, Next: Quick Example, Prev: External Processor, Up: Action List 3.4.2.6 Command Summary ....................... add = HEADER-LINE remove = HEADER-LINE (a regular expression) modify = OLD-HEADER-LINE >> NEW-HEADER-LINE signature-file-append = YES-OR-NO body-append = FILE-NAME body-clear-append = FILE-NAME gpg-passphrase = PASSPHRASE gpg-encrypt = GPG-KEYS gpg-sign = PASSPHRASE or `yes' if `gpg-passphrase' is specified. rot13-subject = YES-OR-NO rot13-body = YES-OR-NO rm-rrt = EMAIL-ADDRESS rm-post = NEWS-GROUP rm-gpg = GPG-KEY rm-header = HEADER-LINE rm-lt = TIME rm-rlt = YES-OR-NO external-body-processor = FILE-NAME [ARGS]  File: anubis.info, Node: Quick Example, Prev: Command Summary, Up: Action List 3.4.2.7 Quick Example ..................... Here is a quick example of using an action list: ---BEGIN RULE--- if header =^X-Mailer: remove =^X-Mailer: add = X-Comment: GNU's Not Unix! gpg-sign = YOUR PASSPHRASE signature-file-append = yes fi ---END--- The example above will remove (on-the-fly) the `X-Mailer:' line from an outgoing message, add an extra header line (`X-Comment:'), sign your message with your private key, and add a simple signature file from your home directory.  File: anubis.info, Node: Trigger, Prev: Action List, Up: Rule System 3.4.3 The Trigger ----------------- Adding the `@@RULE-NAME' code to your message header line, e.g. to a `Subject' header line, triggers a rule named RULE-NAME, specified in a user configuration file in the following way: rule [: OPTIONS] =^RULE-NAME ACTION-LIST done *Caution:* Plase note that there is no space after the `=' character. An example: ---BEGIN RULE--- rule =^gpg-encrypt-john gpg-encrypt = john's_gpg_key done ---END--- Now you can simply send an email with the following subject: `hello John!@@gpg-encrypt-john' to process an outgoing message with the rule specified above--encrypt message with a John's public key. Moreover, the trigger will remove the `@@', so John will only receive a message with a subject `hello John!'. Another example shows even more dynamic trigger, while using a substitution and back-references: ---BEGIN RULE--- rule =^gpg-encrypt:(.*) gpg-encrypt = \1 add = X-GPG-Comment: Encrypted for \1 done ---END--- To encrypt a message to user e.g. `John', simply send an email with a subject `hello John!@@gpg-encrypt:john's_gpg_key'. In this case, you decide in a run time which public key should be used, without creating a separate rules for each user; thanks to back-references, those 3--4 lines are enough.  File: anubis.info, Node: Invoking Anubis, Next: Sample Beginning, Prev: Configuration, Up: Top 4 Invoking GNU Anubis ********************* The `anubis' executable acts like a daemon. The behavior of program is controlled by two configuration files, which have a *higher* priority than command line options. *Note Configuration::, for details. GNU `anubis' supports the following command line options: `--bind [HOST:]PORT' `-b' Specify the TCP port on which GNU Anubis listens for connections. The default HOST value is `INADDR_ANY', and default PORT number is 24 (private mail system). `--remote-mta HOST[:PORT]' `-r' Specify a remote SMTP host name or IP address, which GNU Anubis will connect and forward mail to (after a processing). The default PORT number is 25. `--local-mta FILE' `-l' Execute a local SMTP server, which works on standard input and output (inetd-type program). This option excludes the `--remote-mta' option. `--foreground' `-f' Foreground mode. `--stdio' `-i' Use the SMTP protocol (OMP/Tunnel) as described in RFC 821 on standard input and output. `--silent' `-s' Work silently. `--verbose' `-v' Work noisily. `--debug' `-D' Debug mode. `--altrc FILE' Specify alternate system configuration file. `--norc' Ignore system configuration file. `--version' Print version number and copyright. `--help' Print a help message. Examples: $ anubis --remote-mta SMTP-HOST:25 Run GNU Anubis on port number 24 (private mail system). Note that you must have root privileges to use port number lower than 1024. Make the tunnel between your localhost:24 and SMTP-HOST:25. $ anubis -f --remote-mta SMTP-HOST:25 Same as above, but run GNU Anubis in a foreground mode. $ anubis -f --local-mta /usr/sbin/sendmail -- sendmail -bs Similar to above, but create the tunnel between localhost:24 and a local program (local MTA). In this example local program is `sendmail' with `-bs' command line option. The `-bs' option forces `sendmail' to work on standard input and output. $ anubis --norc --remote-mta SMTP-HOST:25 Do not read the system configuration file, make the tunnel between localhost:24 and SMTP-HOST:25. $ anubis --bind localhost:1111 --remote-mta SMTP-HOST:25 Create the tunnel between localhost:1111 and SMTP-HOST:25. $ anubis -i Use the SMTP protocol (OMP/Tunnel) as described in RFC 821 on standard input and output.  File: anubis.info, Node: Sample Beginning, Next: TLS/SSL, Prev: Invoking Anubis, Up: Top 5 Sample Beginning ****************** By default, GNU Anubis binds to port number 24 (private mail system), so there shouldn't by any conflict with your local MTA (Mail Transport Agent). You just have to reconfigure your MUA (Mail User Agent) to make it talk to GNU Anubis directly on port number 24. All MUAs are normally set up to talk directly to the MTA, so you must change their settings and specify GNU Anubis' port number as their target. This makes GNU Anubis to work as an outgoing mail processor between your MUA and the MTA. Read your MUA's documentation for more information. Now you must choose whether you want to connect GNU Anubis with a remote or local SMTP host via TCP/IP or a local SMTP program, which works on standard input and output. In the first case, specify the following option: REMOTE-MTA = SMTP-HOST:25 In the second case (local SMTP program), specify this: LOCAL-MTA = /PATH/TO/YOUR/MTA/MTA-EXECUTABLE -bs Please note that the `-bs' command line option is a common way to run MTAs on standard input and output, but it is not a rule. Read your local MTA's documentation, how to get it working on standard input and output. If you would like to run GNU Anubis on port number 25 (which is a default value for the SMTP) or any other port number, then you must specify the `bind' keyword. For instance, the following code will bind GNU Anubis to `localhost:25': BIND = localhost:25 This can make a conflict between GNU Anubis and your local MTA, which usually listens on port number 25. To solve this problem, you can for instance disable the MTA and specify the `local-mta' keyword, or run MTA on port number different than GNU Anubis' port number (e.g. 1111). Please read your local MTA's documentation about this topic. For example: BIND = localhost:25 REMOTE-MTA = localhost:1111 *Caution:* Make sure that your local machine doesn't accept any incoming mail (i.e. it is _not_ a POP or IMAP server), otherwise you cannot disable your MTA or change its port number! *Caution:* It is required to install the TCP/IP IDENT protocol server (RFC 1413). Without it, an outgoing mail processor will fail. Most modern GNU/Linux (or *BSD) distributions have already installed such a server. If not, try `pidentd', available at: `ftp://ftp.lysator.liu.se/pub/ident/servers/' All Mutt users, who would like to set up GNU Anubis between their MUA and MTA, should consider using the `msg2smtp.pl' Perl script from the `contrib' directory (part of the distribution).  File: anubis.info, Node: TLS/SSL, Next: Problems, Prev: Sample Beginning, Up: Top 6 Using the TLS/SSL Encryption ****************************** According to the RFC 2246 document, the TLS (Transport Layer Security) protocol provides communications privacy over the Internet. The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery. The primary goal of the TLS Protocol is to provide privacy and data integrity between two communicating applications. The TLS protocol itself is based on the SSL 3.0 (Secure Socket Layer) protocol specification. GNU Anubis supports the TLS/SSL (via the GnuTLS, a Transport Layer Security Library available at `http://www.gnutls.org/', or OpenSSL, a cryptographic package available at `http://www.openssl.org/'), but your MTA (Mail Transport Agent) must provide the STARTTLS command first. This can be checked by: $ telnet YOUR-SMTP-HOST 25 ehlo YOUR-DOMAIN-NAME The server will response with all its available commands. If you see the STARTTLS, then you can use the TLS/SSL encryption. If your MUA (Mail User Agent) doesn't support the TLS/SSL encryption, but your MTA does, then you should use the `oneway-ssl' keyword in your configuration file. Before using the TLS/SSL encryption, you must generate a proper private key and a certificate. You can do it simply with: $ cd anubis-directory $ ./build/keygen.sh This will create the `anubis.pem' file. For example copy this file to `/usr/share/ssl/certs/'. Next, edit your configuration file by adding: ssl = yes key = PATH-TO-THE-PRIVATE-KEY cert = PATH-TO-THE-CERTIFICATE For example: key = /usr/share/ssl/certs/anubis.pem cert = /usr/share/ssl/certs/anubis.pem *Caution:* Each client can specify its own private key and a certificate by adding the `key' and `cert' keywords in its own user configuration file. *Note Encryption Settings::, for details.  File: anubis.info, Node: Problems, Next: GNU Free Documentation License, Prev: TLS/SSL, Up: Top 7 Reporting Bugs **************** Please send any bug reports, improvements, comments, suggestions, or questions to . Before reporting a bug, make sure you have actually found a real bug. Carefully reread the documentation and see if it really says you can do what you are trying to do. If it is not clear whether you should be able to do something or not, report that too; it's a bug in the documentation!  File: anubis.info, Node: GNU Free Documentation License, Next: Concept Index, Prev: Problems, Up: Top Appendix A GNU Free Documentation License ***************************************** Version 1.2, November 2002 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warrany Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. A.0.1 ADDENDUM: How to use this License for your documents ---------------------------------------------------------- To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  File: anubis.info, Node: Concept Index, Prev: GNU Free Documentation License, Up: Top Concept Index ************* [index] * Menu: * Action List: Action List. (line 6) * ALL section, The: ALL Section. (line 6) * Basic regular expressions: Rule System. (line 6) * bugs: Problems. (line 6) * client: Overview. (line 6) * command line: Invoking Anubis. (line 6) * configuration: Configuration. (line 6) * CONTROL section, The: CONTROL Section. (line 6) * daemon: Overview. (line 6) * encryption: TLS/SSL. (line 6) * Extended regular expressions: Rule System. (line 6) * FDL, GNU Free Documentation License: GNU Free Documentation License. (line 6) * GNU Privacy Guard, GnuPG: Mail Encryption. (line 6) * GnuTLS: TLS/SSL. (line 6) * GPG/PGP private key: Mail Encryption. (line 6) * GPG/PGP public key: Mail Encryption. (line 6) * grammar: Grammar. (line 6) * IDENT protocol: Sample Beginning. (line 6) * message header: Editing Headers. (line 6) * MTA, Mail Transport Agent: Overview. (line 6) * MUA, Mail User Agent: Overview. (line 6) * on-the-fly: Overview. (line 6) * OpenSSL: TLS/SSL. (line 6) * outgoing mail processor: Overview. (line 6) * overview: Overview. (line 6) * Perl regular expressions: Rule System. (line 6) * Pretty Good Privacy, PGP: Mail Encryption. (line 6) * problems: Problems. (line 6) * proxy: Overview. (line 6) * regex: Rule System. (line 6) * regular expressions: Rule System. (line 6) * remailer: Remailers. (line 6) * ROT-13: Mail Encryption. (line 6) * rule system: Rule System. (line 6) * rules: Rule System. (line 6) * Secure Socket Layer, SSL: TLS/SSL. (line 6) * server: Overview. (line 6) * settings: Configuration. (line 6) * Simple Mail Transport Protocol, SMTP: Overview. (line 6) * SOCKS proxy: Proxy Settings. (line 6) * system configuration file: Configuration. (line 6) * TRANSLATION section, The: TRANSLATION Section. (line 6) * Transport Layer Security, TLS: TLS/SSL. (line 6) * Trigger, The: Trigger. (line 6) * tunnel: Overview. (line 6) * user configuration file: Configuration. (line 6)  Tag Table: Node: Top866 Node: Overview1665 Node: Configuration3844 Node: CONTROL Section5263 Node: Basic Settings6283 Node: Output Settings8071 Node: Proxy Settings9153 Node: Encryption Settings9908 Node: Security Settings11056 Node: Option Summary12094 Node: TRANSLATION Section12900 Node: ALL Section13991 Node: Rule System14692 Node: Grammar15707 Node: Action List19132 Node: Editing Headers19952 Node: Inserting Files21608 Node: Mail Encryption22318 Node: Remailers24215 Node: External Processor25631 Node: Command Summary26068 Node: Quick Example26839 Node: Trigger27462 Node: Invoking Anubis28884 Node: Sample Beginning31389 Node: TLS/SSL34027 Node: Problems36028 Node: GNU Free Documentation License36564 Node: Concept Index59005  End Tag Table