aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2003-01-30 10:41:20 +0000
committerWojciech Polak <polak@gnu.org>2003-01-30 10:41:20 +0000
commitb9c0940090b169dc9f7940f93a76073b7da76af8 (patch)
tree7f7c98ba54829a35a3f5104c7493a6d593df7378
downloadanubis-b9c0940090b169dc9f7940f93a76073b7da76af8.tar.gz
anubis-b9c0940090b169dc9f7940f93a76073b7da76af8.tar.bz2
Initial revision
-rw-r--r--.cvsignore14
-rw-r--r--AUTHORS18
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.am30
-rw-r--r--NEWS306
-rw-r--r--README90
-rw-r--r--THANKS27
-rw-r--r--TODO11
-rwxr-xr-xautogen.sh3
-rw-r--r--build/.cvsignore11
-rw-r--r--build/Makefile.am28
-rwxr-xr-xbuild/keygen.sh42
-rwxr-xr-xbuild/specgen.sh109
-rw-r--r--configure.ac246
-rw-r--r--contrib/.cvsignore2
-rw-r--r--contrib/Makefile.am28
-rwxr-xr-xcontrib/msg2smtp.pl240
-rw-r--r--contrib/msg2smtp.txt29
-rw-r--r--doc/.cvsignore23
-rw-r--r--doc/Makefile.am33
-rw-r--r--doc/anubis.197
-rw-r--r--doc/anubis.texi1270
-rw-r--r--doc/fdl.texi450
-rw-r--r--examples/.cvsignore2
-rw-r--r--examples/1anubisrc128
-rw-r--r--examples/2anubisrc39
-rw-r--r--examples/Makefile.am29
-rw-r--r--examples/pam/.cvsignore2
-rw-r--r--examples/pam/Makefile.am28
-rw-r--r--examples/pam/anubis60
-rw-r--r--examples/pam/anubis.allow18
-rw-r--r--examples/pam/anubis.deny15
-rw-r--r--m4/.cvsignore19
-rw-r--r--m4/Makefile.am26
-rw-r--r--po/.cvsignore15
-rw-r--r--po/ChangeLog43
-rw-r--r--po/LINGUAS2
-rw-r--r--po/Makevars16
-rw-r--r--po/POTFILES.in30
-rw-r--r--po/fr.po996
-rw-r--r--po/ms.po978
-rw-r--r--po/tr.po998
-rw-r--r--po/uk.po975
-rw-r--r--scripts/.cvsignore2
-rw-r--r--scripts/Makefile.am28
-rwxr-xr-xscripts/debian.init40
-rwxr-xr-xscripts/redhat.init64
-rw-r--r--src/.cvsignore5
-rw-r--r--src/Makefile.am38
-rw-r--r--src/auth.c130
-rw-r--r--src/daemon.c436
-rw-r--r--src/env.c310
-rw-r--r--src/errs.c111
-rw-r--r--src/esmtp.c382
-rw-r--r--src/exec.c280
-rw-r--r--src/extern.h148
-rw-r--r--src/files.c132
-rw-r--r--src/getopt.c1055
-rw-r--r--src/getopt.h180
-rw-r--r--src/getopt1.c188
-rw-r--r--src/gpg.c360
-rw-r--r--src/headers.h404
-rw-r--r--src/help.c104
-rw-r--r--src/log.c112
-rw-r--r--src/main.c133
-rw-r--r--src/main.h56
-rw-r--r--src/map.c162
-rw-r--r--src/mem.c115
-rw-r--r--src/mem.h42
-rw-r--r--src/misc.c296
-rw-r--r--src/net.c411
-rw-r--r--src/proxy.c518
-rw-r--r--src/quit.c113
-rw-r--r--src/rc.c804
-rw-r--r--src/regex.c154
-rw-r--r--src/setenv.c48
-rw-r--r--src/ssl.c298
-rw-r--r--src/tls.c337
-rw-r--r--src/tunnel.c880
79 files changed, 16409 insertions, 0 deletions
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..6c2942a
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1,14 @@
+ABOUT-NLS
+COPYING
+INSTALL
+Makefile
+Makefile.in
+aclocal.m4
+config.h
+config.h.in
+config.log
+config.status
+configure
+stamp-h1
+autom4te.cache
+intl
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..07e2117
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,18 @@
+
+ Authors of GNU Anubis
+ =====================
+
+ The original authors:
+
+ * Wojciech Polak <polak@gnu.org>
+ * Krzysztof Burghardt <EinStEin@Underground.Org.PL>
+
+ The maintainer/developer:
+
+ * Wojciech Polak <polak@gnu.org>
+
+ Please send any bug reports, improvements, comments,
+ suggestions, or questions to <bug-anubis@gnu.org>.
+
+ EOF
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..a7d625d
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,7 @@
+
+2003-01-30 Wojciech Polak
+
+ * Initial CVS import, starting GNU Anubis 3.6.3.
+
+ EOF
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..f96fabf
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,30 @@
+##
+## Makefile.am
+##
+## This file is part of GNU Anubis.
+## Copyright (C) 2001, 2002, 2003 The Anubis Team.
+##
+## GNU Anubis is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## GNU Anubis is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GNU Anubis; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## GNU Anubis is released under the GPL with the additional exemption that
+## compiling, linking, and/or using OpenSSL is allowed.
+##
+
+AUTOMAKE_OPTIONS = 1.7.2
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = build m4 intl po doc scripts examples contrib src
+
+## EOF
+
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..464e419
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,306 @@
+
+ Release Notes
+ =============
+
+ *******************
+ 3.6.2 (15 Dec 2002)
+ *******************
+
+* URGENCY: HIGH. Some serious bugs have been fixed (since 3.6.1).
+* Default daemon's port number is now 24 (private mail system).
+* The MODIFY keyword has been hugely improved. Its syntax has been
+ changed, so please read the GNU Anubis Manual before using it.
+* The DEBUG mode has been improved (now it's also built-in by default).
+* The boundary-search code has been fixed (for e.g. MS Outlook).
+ Reported by David Roberts <dtrobert@pacbell.net>.
+* Some minor changes and fixes in the documentation have been made.
+ The `anubis.1' man page will not be maintained anymore. The full
+ documentation is maintained as a Texinfo manual.
+* The Free Documentation License has been upgraded from 1.1 to 1.2.
+* The `msg2smtp.pl' Perl script (revision 1.5) has been fixed.
+* Switched to GNU Autoconf 2.57 and GNU Automake 1.7.2.
+
+ *******************
+ 3.6.1 (16 Nov 2002)
+ *******************
+
+* URGENCY: MEDIUM. A serious code optimization, changes, and bug fixes
+ have been made, but most not visible to end-users.
+* GNU Anubis requires now GPGME 0.3.12 or later (and at least GnuPG 1.2.0).
+* The Turkish NLS has been added.
+
+ *******************
+ 3.6.0 (02 Nov 2002)
+ *******************
+
+* Now this program is part of GNU! We celebrate with a new name "GNU Anubis".
+ We have moved the home page to http://www.gnu.org/software/anubis/.
+* The GnuTLS is now supported by default. To enable OpenSSL (and disable
+ GnuTLS), please compile GNU Anubis with `./configure --with-openssl; make'.
+* The ESMTP CRAM-MD5 authentication method is now supported by libgcrypt
+ if compiling with GnuTLS, or `openssl/md5.h' if compiling with OpenSSL.
+
+ *******************
+ 3.5.2 (21 Oct 2002)
+ *******************
+
+* URGENCY: MEDIUM. The GnuTLS support has been added. To enable it, please
+ compile Anubis with `./configure --with-gnutls; make' (this will disable
+ OpenSSL). There is also a new keyword CAFILE to specify a CA certificate.
+* Some build fixes have been made. Thanks to Olaf Püschel and Ayamura KIKUCHI.
+ The setenv function should now works properly under Solaris and IRIX.
+ The ESMTP CRAM-MD5 authentication method is now disabled, when compiling
+ without the OpenSSL support (CRAM-MD5 requires MD5 via `openssl/md5.h').
+* The '--stdio' command line option has been fixed.
+
+ *******************
+ 3.5.1 (16 Oct 2002)
+ *******************
+
+* URGENCY: LOW. A WinGate proxy support has been removed.
+* The SOCKS-USERNAME and SOCKS-PASSWORD keywords have been
+ replaced with the SOCKS-AUTH keyword ("socks-auth = USERNAME:PASSWORD").
+
+ *******************
+ 3.5.0 (14 Oct 2002)
+ *******************
+
+* URGENCY: MEDIUM. Support for the ESMTP authentication (CRAM-MD5
+ and LOGIN) has been added. This feature has been designed for MUAs,
+ which cannot speak the ESMTP AUTH command.
+* The "EXTERNAL" section has been replaced with a translation map
+ for remote or local users (The "TRANSLATION" section).
+ A new syntax is: "translate = [USER@]ADDRESS into = USERNAME".
+* The `msg2smtp.pl' Perl code has been added to the `contrib' directory.
+ This is a very useful script for all Mutt users, who would like
+ to use Anubis. Thanks to Michael de Beer <madebeer@apc.org>.
+* The OUTPUT keyword (a temporary alias since 3.4.7) has been removed.
+* The French NLS has been added.
+
+ *******************
+ 3.4.9 (22 Sep 2002)
+ *******************
+
+* URGENCY: LOW. An experimental NLS (Native Language Support)
+ has been added (no `po' files yet).
+* The specgen.sh file has been updated.
+* Some minor changes and bug fixes have been made.
+
+ *******************
+ 3.4.8 (20 Sep 2002)
+ *******************
+
+* URGENCY: MEDIUM. Support for substitutions
+ (RE back-references to subexpressions) has been added.
+* Anubis now recogizes a client if IDENTD server returns
+ only UID number.
+
+ *******************
+ 3.4.7 (17 Sep 2002)
+ *******************
+
+* URGENCY: HIGH. The Rule System now supports an extra regexp options,
+ and in addition you can use the following regular expression syntaxes in
+ a run time: "POSIX Basic", "POSIX Extended", "Perl regular expression".
+* The "REGEX" section has been renamed to the "RULE" section.
+ (---BEGIN RULE---). Please update your configuration files.
+* The Trigger mechanism has replaced the DCM system (a new syntax).
+* Some keywords have been renamed (again):
+ > SIGNATURE-FILE-APPEND instead of SIGNATURE-FILE-ATTACH
+ > BODY-APPEND instead of BODY-ATTACH
+ > BODY-CLEAR-APPEND instead of BODY-CLEAR-ATTACH.
+ > TERMLEVEL instead of OUTPUT (OUTPUT is now a temporary alias).
+* The documentation has been improved.
+
+ *******************
+ 3.4.6 (08 Sep 2002)
+ *******************
+
+* URGENCY: HIGH. The "TUNNEL" section has been renamed to the "CONTROL"
+ section (---BEGIN CONTROL---). Please update your configuration files.
+* An optional support for Pluggable Authentication Modules (PAM)
+ has been added. To add this feature, compile with './configure --with-pam'.
+* The AUTH-LOCAL keyword has been removed.
+ Now, local processing is a default mode.
+* Anubis doesn't set a client's EGID and EUID anymore.
+ For security reasons, the RGID and RUID are set instead.
+* A major documentation changes and improvements have been made.
+
+ *******************
+ 3.4.5 (02 Sep 2002)
+ *******************
+
+* URGENCY: HIGH. An optional support for libwrap (TCP wrappers)
+ has been added (recommended when using the "EXTERNAL" section).
+ To add this feature, compile with './configure --with-tcp-wrappers'.
+* A serious bug in the main engine has been fixed, now it is possible
+ to make a transparent authentication with an SMTP server (ESMTP AUTH).
+* A new GPG-PASSPHRASE keyword has been added (USER MODE).
+* The REMOTE-MTA is now a default keyword for a remote mail transport
+ agent. The SERVER keyword, since now, is only an alias.
+* The SIGNATURE keyword has been renamed to SIGNATURE-FILE-ATTACH
+ to prevent any likeness with GnuPG/PGP signatures.
+* The "-h,--host" command line options have been renamed to "-r,--remote-mta".
+* A big docs improvements have been made. The TUTORIAL file has been removed.
+ Read the documentation in Texinfo (anubis.info) format instead.
+* Some additional changes and security fixes have been made.
+
+ *******************
+ 3.4.2 (22 Aug 2002)
+ *******************
+
+* URGENCY: LOW. A new documentation in Texinfo format has been added.
+ Some additional documentation changes have been made.
+* The TUTORIAL and anubis.1 files have been moved to the 'doc' directory.
+* The specgen.sh file has been updated.
+
+ *******************
+ 3.4.1 (18 Aug 2002)
+ *******************
+
+* URGENCY: MEDIUM. For security reasons, a new keyword
+ USER-NOTPRIVILEGED has been added. It specifies a user which
+ the server runs as most of the time, when doing unprivileged operations.
+* Some additional changes and fixes have been made.
+* The Tips & Hints section has been added to the documentation.
+* The THANKS file has been added.
+
+ *******************
+ 3.4.0 (01 Aug 2002)
+ *******************
+
+* URGENCY: MEDIUM. A new support for an external clients has been
+ added. Now it is possible to allow an extenal user to use the local
+ configuration file, and process outgoing mail. There is a new
+ ALLOW-EXTERNAL-PROCESSING keyword and the "remapping table" with
+ the following syntax: "external = [user@]address local = username".
+ This idea has been suggested by Mikael Ringeval.
+* Some minor changes have been made.
+
+ *******************
+ 3.3.0 (23 Jul 2002)
+ *******************
+
+* URGENCY: HIGH. A new rule system style has been introduced.
+ It has been also slightly extended by adding the '!=' (FALSE)
+ control operator. Read the TUTORIAL file for more information.
+* An external message body processor support has been added
+ (there is a new EXTERNAL-BODY-PROCESSOR keyword).
+* The BODY-FILE keyword has been renamed to BODY-ATTACH.
+* A new BODY-CLEAR-ATTACH function has been added.
+* The code has been optimized a bit. Some bugs have been fixed.
+* The specgen.sh file has been updated.
+
+ *******************
+ 3.2.3 (06 Jul 2002)
+ *******************
+
+* URGENCY: LOW. The specgen.sh file has been improved.
+* The compilation with a custom CFLAGS environment variable
+ has been fixed.
+
+ *******************
+ 3.2.2 (01 Jul 2002)
+ *******************
+
+* URGENCY: LOW. The configure scripts have been modified
+ to be compatible with GNU Autoconf 2.53 or later.
+* Another build fixes (configure.ac) by Ayamura KIKUCHI.
+
+ *******************
+ 3.2.1 (26 Jun 2002)
+ *******************
+
+* URGENCY: LOW. Some minor bugs have been fixed.
+* A small OpenSSL build fix has been made.
+ Thanks to Ayamura KIKUCHI <ayamura@ayamura.org>.
+* The default install path has been changed from /usr/sbin/
+ to /usr/local/sbin/.
+
+ *******************
+ 3.2.0 (23 Jun 2002)
+ *******************
+
+* URGENCY: MEDIUM. A new Dynamic Commands Manipulation system (aka DCM)
+ has been added. Read the TUTORIAL file for more information.
+* A useful personal logger (per-user logging) has been added.
+ There are new USER MODE keywords (LOGFILE and LOGLEVEL).
+* The ROT13SUBJECT and ROT13BODY keywords have been renamed to
+ ROT13-SUBJECT and ROT13-BODY.
+* A small fix for systems without setegid(2) and seteuid(2)
+ has been made.
+
+ *******************
+ 3.1.1 (20 Jun 2002)
+ *******************
+
+* URGENCY: LOW. The MTA-ARGS keyword has been removed.
+ The LOCAL-MTA parser has been rewritten.
+* An additional check for seteuid(2) and setegid(2)
+ has been added in the configure script.
+* The specgen.sh file has been improved.
+* A small code cleanup has been done.
+
+ *******************
+ 3.1.0 (14 Jun 2002)
+ *******************
+
+* URGENCY: HIGH. A major security fixes have been made.
+ The SETREMOTEUSER keyword has been removed.
+ Now Anubis is always changing its privileges to a client's
+ EGID, EUID, and HOME directory. Moreover a new keyword
+ for a supervisor has been added: ALLOW-LOCAL-MTA, which
+ slightly increases a security level.
+* The IDENT-ONLY keyword has been removed, now the only way
+ to authenticate a user is the TCP/IP IDENT protocol server.
+* The NOFORK macro has been removed, this means that Anubis
+ will not support systems without the fork(2) function anymore.
+* The ONEWAY-SSL keyword has been added. It can be used when your
+ MUA doesn't support the TLS/SSL encryption, but your MTA does.
+* The code has been optimized a bit.
+
+ *******************
+ 3.0.2 (10 Jun 2002)
+ *******************
+
+* URGENCY: HIGH. A serious bug has been fixed:
+ While sending more than one email in a one connection,
+ the OMP had processed every message in the same way,
+ but now this has been successfully fixed.
+* Some additional security fixes have been made.
+
+ *******************
+ 3.0.1 (08 Jun 2002)
+ *******************
+
+* URGENCY: LOW. Some minor changes have been made.
+* Some bugs have been fixed.
+* The documentation has been improved.
+* The portability has been slightly improved,
+ especially under Darwin.
+
+ *******************
+ 3.0.0 (01 Jun 2002)
+ *******************
+
+* The Anubis has become only an outgoing mail processor
+ and the SMTP tunnel between the MUA and the MTA.
+ Any other functions/features have been removed.
+
+----------------------------------------------------------------------
+ Copyright information:
+
+ Copyright (C) 2001, 2002, 2003 The Anubis Team.
+
+ Permission is granted to anyone to make or distribute verbatim copies
+ of this document as received, in any medium, provided that the
+ copyright notice and this permission notice are preserved,
+ thus giving the recipient permission to redistribute in turn.
+
+ Permission is granted to distribute modified versions
+ of this document, or of portions of it,
+ under the above conditions, provided also that they
+ carry prominent notices stating who last changed them.
+
+ EOF
+
diff --git a/README b/README
new file mode 100644
index 0000000..32b2732
--- /dev/null
+++ b/README
@@ -0,0 +1,90 @@
+
+ Introduction
+ ============
+
+ 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)
+
+ GNU Anubis is GNU software. See the home page at:
+ http://www.gnu.org/software/anubis/
+
+ License:
+ GNU Anubis is free software. Read the COPYING file.
+
+
+ SUPPORTED SOFTWARE
+ ==================
+
+ Required:
+
+ * The TCP/IP Identification Protocol (RFC 1413) server (any).
+
+ Highly recommended:
+
+ * GnuTLS -- a Transport Layer Security Library (http://www.gnutls.org/)
+ or OpenSSL -- a cryptographic package (http://www.openssl.org/).
+ * GnuPG -- The GNU Privacy Guard (http://www.gnupg.org/)
+ with GPGME -- GnuPG Made Easy (http://www.gnupg.org/gpgme.html).
+
+ Optional:
+
+ * PCRE -- Perl-Compatible Regular Expression Library
+ (ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/)
+ * PAM -- Pluggable Authentication Modules.
+ * libwrap (TCP wrappers) -- an access control library.
+
+
+ INSTALLATION
+ ============
+
+ $ ./configure
+ $ make
+ $ make install
+
+ By default, GNU Anubis will be installed in `/usr/local/sbin/anubis',
+ but this can be changed with the `--prefix' command, for instance:
+
+ $ ./configure --prefix=/usr
+ $ make
+ $ make install
+
+ For better control, use the options below.
+ Set the `./configure' script with:
+
+ `--with-pcre' to support Perl-compatible regular expressions.
+ `--with-pam' to support Pluggable Authentication Modules.
+ `--with-tcp-wrappers' to support libwrap (TCP wrappers).
+ `--with-openssl' to support OpenSSL (and disable GnuTLS).
+ `--without-gnutls' to disable GnuTLS support.
+ `--without-gpgme' to disable GNU Privacy Guard (GPGME) support.
+
+ Next, write a proper init script for your system. See the examples
+ in the `scripts' directory (part of the distribution).
+
+ NOTE: Remember about activating GNU Anubis with `ntsysv' tool
+ or similar, and configure its system configuration file (read
+ the GNU Anubis Manual about this topic).
+
+ 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/
+
+ EOF
+
diff --git a/THANKS b/THANKS
new file mode 100644
index 0000000..1608d45
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,27 @@
+
+ The GNU Anubis was originally written by Wojciech Polak
+ and Krzysztof Burghardt. Other people contributed by
+ reporting problems, suggesting various improvements,
+ porting, o