| 1 |
/* Mixmaster version 3 -- (C) 1999 Anonymizer Inc.
|
| 2 |
|
| 3 |
Mixmaster may be redistributed and modified under certain conditions.
|
| 4 |
This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
| 5 |
ANY KIND, either express or implied. See the file COPYRIGHT for
|
| 6 |
details.
|
| 7 |
|
| 8 |
Configuration
|
| 9 |
$Id: config.h,v 1.1 2001/10/31 08:19:53 rabbi Exp $ */
|
| 10 |
|
| 11 |
|
| 12 |
#ifndef _CONFIG_H
|
| 13 |
#define _CONFIG_H
|
| 14 |
#include "version.h"
|
| 15 |
|
| 16 |
/* Disclaimer to be inserted in all anonymous messages: */
|
| 17 |
#define DISCLAIMER \
|
| 18 |
"Comments: This message did not originate from the Sender address above.\n" \
|
| 19 |
"\tIt was remailed automatically by anonymizing remailer software.\n" \
|
| 20 |
"\tPlease report problems or inappropriate use to the\n" \
|
| 21 |
"\tremailer administrator at <%s>.\n" /* (%s is the complaints address) */
|
| 22 |
|
| 23 |
/* Additional disclaimer to be inserted in the body of messages with
|
| 24 |
* user-supplied From lines, e.g.
|
| 25 |
* "NOTE: The above From: line has not been authenticated!\n\n" */
|
| 26 |
#define FROMDISCLAIMER ""
|
| 27 |
|
| 28 |
/* Comment to be inserted when a binary attachment is filtered out: */
|
| 29 |
#define BINDISCLAIMER \
|
| 30 |
"[...]"
|
| 31 |
|
| 32 |
/* Passphrase used to protect our secret keys */
|
| 33 |
#ifndef PASSPHRASE
|
| 34 |
#define PASSPHRASE ""
|
| 35 |
#endif
|
| 36 |
|
| 37 |
/* Character set for MIME-encoded mail header lines */
|
| 38 |
#define MIMECHARSET "iso-8859-1"
|
| 39 |
#if 1
|
| 40 |
#define DEFLTENTITY ""
|
| 41 |
#else
|
| 42 |
#define DEFLTENTITY "text/plain; charset=" MIMECHARSET
|
| 43 |
#endif
|
| 44 |
|
| 45 |
/** Libraries and library functions **********************************/
|
| 46 |
|
| 47 |
/* Use the OpenSSL crypto library (required) */
|
| 48 |
#define USE_OPENSSL
|
| 49 |
/* Use the RSA cryptosystem? */
|
| 50 |
#define USE_RSA
|
| 51 |
/* Use IDEA algorithm? (See file idea.txt) */
|
| 52 |
#define USE_IDEA
|
| 53 |
/* Support the OpenPGP message format? */
|
| 54 |
#define USE_PGP
|
| 55 |
|
| 56 |
/* the following are defined in the Makefile */
|
| 57 |
#if 0
|
| 58 |
/* Use the PCRE regular expression library for destination blocking? */
|
| 59 |
#define USE_PCRE
|
| 60 |
/* Use zlib for compression? */
|
| 61 |
#define USE_ZLIB
|
| 62 |
/* Use ncurses? */
|
| 63 |
#define USE_NCURSES
|
| 64 |
/* Use the WIN GUI? */
|
| 65 |
#define USE_WINGUI
|
| 66 |
/* Use sockets to deliver mail */
|
| 67 |
#define USE_SOCK
|
| 68 |
#endif
|
| 69 |
|
| 70 |
/** System dependencies **********************************************/
|
| 71 |
/* Macros: UNIX for Unix-style systems
|
| 72 |
POSIX for systems with POSIX header files (including DJGPP)
|
| 73 |
MSDOS for 32 bit DOS
|
| 74 |
WIN32 for Windows 95/NT */
|
| 75 |
|
| 76 |
#if defined(_WIN32) && !defined(WIN32)
|
| 77 |
#define WIN32
|
| 78 |
#endif
|
| 79 |
|
| 80 |
#if defined(__RSXNT__) && !defined(WIN32)
|
| 81 |
#define WIN32
|
| 82 |
#endif
|
| 83 |
|
| 84 |
#if !defined(UNIX) && !defined(WIN32) && !defined(MSDOS)
|
| 85 |
#define UNIX
|
| 86 |
#endif
|
| 87 |
|
| 88 |
#if defined(UNIX) && !defined(POSIX)
|
| 89 |
#define POSIX
|
| 90 |
#endif
|
| 91 |
|
| 92 |
#ifdef UNIX
|
| 93 |
#define HAVE_UNAME
|
| 94 |
#define HAVE_GECOS
|
| 95 |
#define DEV_URANDOM "/dev/urandom"
|
| 96 |
#ifdef __OpenBSD__
|
| 97 |
#define DEV_RANDOM "/dev/srandom"
|
| 98 |
#else
|
| 99 |
#define DEV_RANDOM "/dev/random"
|
| 100 |
#endif
|
| 101 |
#endif
|
| 102 |
|
| 103 |
#if defined(POSIX) || defined(USE_SOCK)
|
| 104 |
#define HAVE_GETHOSTNAME
|
| 105 |
#endif
|
| 106 |
|
| 107 |
#ifdef POSIX
|
| 108 |
#define HAVE_TERMIOS
|
| 109 |
/* not a POSIX function, but avaiable on virtually all Unix systems */
|
| 110 |
#define HAVE_GETTIMEOFDAY
|
| 111 |
#endif
|
| 112 |
|
| 113 |
#ifdef linux
|
| 114 |
#define HAVE_GETDOMAINNAME
|
| 115 |
#endif
|
| 116 |
|
| 117 |
#ifdef MSDOS
|
| 118 |
#define SHORTNAMES
|
| 119 |
#ifndef WIN32
|
| 120 |
#define HAVE_GETKEY
|
| 121 |
#undef USE_SOCK
|
| 122 |
#endif
|
| 123 |
#endif
|
| 124 |
|
| 125 |
#if defined(USE_WINGUI) && !defined(WIN32)
|
| 126 |
#error "The GUI requires Win32!"
|
| 127 |
#endif
|
| 128 |
|
| 129 |
/** Constants *********************************************************/
|
| 130 |
|
| 131 |
/* Give up if a file is larger than BUFFER_MAX bytes: */
|
| 132 |
/* #define BUFFER_MAX 64*1024*1024 */
|
| 133 |
|
| 134 |
#define PATHMAX 512
|
| 135 |
#define LINELEN 128
|
| 136 |
#define BUFSIZE 4096
|
| 137 |
|
| 138 |
/** file names ********************************************************/
|
| 139 |
|
| 140 |
#define MIXCONF "mix.cfg" /* mixmaster configuration file */
|
| 141 |
#define DISCLAIMFILE "disclaim.txt"
|
| 142 |
#define FROMDSCLFILE "fromdscl.txt"
|
| 143 |
#define POP3CONF "pop3.cfg"
|
| 144 |
#define HELPFILE "help.txt"
|
| 145 |
#define ABUSEFILE "abuse.txt"
|
| 146 |
#define REPLYFILE "reply.txt"
|
| 147 |
#define USAGEFILE "usage.txt"
|
| 148 |
#define USAGELOG "usage.log"
|
| 149 |
#define BLOCKFILE "blocked.txt"
|
| 150 |
#define ADMKEYFILE "adminkey.txt"
|
| 151 |
#define KEYFILE "key.txt"
|
| 152 |
#define PGPKEY "pgpkey.txt"
|
| 153 |
#define DSAPARAMS "dsaparam.mix"
|
| 154 |
#define DHPARAMS "dhparam.mix"
|
| 155 |
#define MIXRAND "mixrand.bin"
|
| 156 |
#define SECRING "secring.mix"
|
| 157 |
#define PUBRING "pubring.mix"
|
| 158 |
#define IDLOG "id.log"
|
| 159 |
#define STATS "stats.log"
|
| 160 |
/* To enable multiple dest.blk files, edit the following line. */
|
| 161 |
/* Filenames must be seperated by one space. */
|
| 162 |
#define DESTBLOCK "dest.blk rab.blk"
|
| 163 |
#define DESTALLOW "dest.alw"
|
| 164 |
#define SOURCEBLOCK "source.blk"
|
| 165 |
#define HDRFILTER "header.blk"
|
| 166 |
#define REGULAR "time.log"
|
| 167 |
#define POOL "pool" /* remailer pool subdirectory */
|
| 168 |
#define TYPE1LIST "rlist.txt"
|
| 169 |
#define TYPE2REL "mlist.txt"
|
| 170 |
#ifdef SHORTNAMES
|
| 171 |
#define TYPE2LIST "type2.lis"
|
| 172 |
#else
|
| 173 |
#define TYPE2LIST "type2.list"
|
| 174 |
#endif
|
| 175 |
|
| 176 |
#define PGPREMPUBRING "pubring.pgp"
|
| 177 |
#define PGPREMPUBASC "pubring.asc"
|
| 178 |
#define PGPREMSECRING "secring.pgp"
|
| 179 |
#define NYMSECRING "nymsec.pgp"
|
| 180 |
#define NYMDB "secrets.mix"
|
| 181 |
|
| 182 |
/* string constants */
|
| 183 |
#define remailer_type "Remailer-Type: Mixmaster "
|
| 184 |
#define begin_remailer "-----BEGIN REMAILER MESSAGE-----"
|
| 185 |
#define end_remailer "-----END REMAILER MESSAGE-----"
|
| 186 |
#define begin_key "-----Begin Mix Key-----"
|
| 187 |
#define end_key "-----End Mix Key-----"
|
| 188 |
#define begin_pgp "-----BEGIN PGP "
|
| 189 |
#define end_pgp "-----END PGP "
|
| 190 |
#define begin_pgpmsg "-----BEGIN PGP MESSAGE-----"
|
| 191 |
#define end_pgpmsg "-----END PGP MESSAGE-----"
|
| 192 |
#define begin_pgpkey "-----BEGIN PGP PUBLIC KEY BLOCK-----"
|
| 193 |
#define end_pgpkey "-----END PGP PUBLIC KEY BLOCK-----"
|
| 194 |
#define begin_pgpsigned "-----BEGIN PGP SIGNED MESSAGE-----"
|
| 195 |
#define begin_pgpsig "-----BEGIN PGP SIGNATURE-----"
|
| 196 |
#define end_pgpsig "-----END PGP SIGNATURE-----"
|
| 197 |
#define info_beginpgp "=====BEGIN PGP MESSAGE====="
|
| 198 |
#define info_endpgp "=====END PGP MESSAGE====="
|
| 199 |
#define info_pgpsig "=====Sig: "
|
| 200 |
|
| 201 |
|
| 202 |
/***********************************************************************
|
| 203 |
* The following variables are read from mix.cfg, with default values
|
| 204 |
* defined in mix.c */
|
| 205 |
|
| 206 |
int REMAIL;
|
| 207 |
int MIX;
|
| 208 |
int PGP;
|
| 209 |
int UNENCRYPTED;
|
| 210 |
int REMIX;
|
| 211 |
extern char MIXDIR[];
|
| 212 |
extern char POOLDIR[];
|
| 213 |
extern char SENDMAIL[];
|
| 214 |
extern char SENDANONMAIL[];
|
| 215 |
extern char SMTPRELAY[];
|
| 216 |
extern char NEWS[];
|
| 217 |
extern char MAILtoNEWS[];
|
| 218 |
extern char ORGANIZATION[];
|
| 219 |
extern char MID[];
|
| 220 |
extern char TYPE1[];
|
| 221 |
extern char ERRLOG[];
|
| 222 |
extern char NAME[];
|
| 223 |
extern char ADDRESS[];
|
| 224 |
extern char REMAILERADDR[];
|
| 225 |
extern char ANONADDR[];
|
| 226 |
extern char REMAILERNAME[];
|
| 227 |
extern char ANONNAME[];
|
| 228 |
extern char COMPLAINTS[];
|
| 229 |
extern int AUTOREPLY;
|
| 230 |
extern char HELONAME[];
|
| 231 |
extern char ENVFROM[];
|
| 232 |
extern char SHORTNAME[];
|
| 233 |
extern int POOLSIZE;
|
| 234 |
extern int RATE;
|
| 235 |
extern int MIDDLEMAN;
|
| 236 |
extern int AUTOBLOCK;
|
| 237 |
extern char FORWARDTO[];
|
| 238 |
extern int SIZELIMIT;
|
| 239 |
extern int INFLATEMAX;
|
| 240 |
extern int MAXRANDHOPS;
|
| 241 |
extern int BINFILTER;
|
| 242 |
extern long PACKETEXP;
|
| 243 |
extern long IDEXP;
|
| 244 |
extern int VERBOSE;
|
| 245 |
extern long SENDPOOLTIME;
|
| 246 |
extern int NUMCOPIES;
|
| 247 |
extern char CHAIN[];
|
| 248 |
extern int DISTANCE;
|
| 249 |
extern int MINREL;
|
| 250 |
extern int RELFINAL;
|
| 251 |
extern long MAXLAT;
|
| 252 |
extern char PGPPUBRING[];
|
| 253 |
extern char PGPSECRING[];
|
| 254 |
extern long POP3TIME;
|
| 255 |
extern int POP3DEL;
|
| 256 |
extern int POP3SIZELIMIT;
|
| 257 |
extern char MAILBOX[];
|
| 258 |
extern char MAILABUSE[];
|
| 259 |
extern char MAILBLOCK[];
|
| 260 |
extern char MAILUSAGE[];
|
| 261 |
extern char MAILANON[];
|
| 262 |
extern char MAILERROR[];
|
| 263 |
extern char MAILBOUNCE[];
|
| 264 |
|
| 265 |
#endif
|