| 1 |
rabbi |
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 |
weaselp |
105 |
$Id: config.h,v 1.9 2002/07/24 09:00:11 weaselp Exp $ */
|
| 10 |
rabbi |
1 |
|
| 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 |
|
|
/* Character set for MIME-encoded mail header lines */
|
| 33 |
|
|
#define MIMECHARSET "iso-8859-1"
|
| 34 |
|
|
#if 1
|
| 35 |
|
|
#define DEFLTENTITY ""
|
| 36 |
|
|
#else
|
| 37 |
|
|
#define DEFLTENTITY "text/plain; charset=" MIMECHARSET
|
| 38 |
|
|
#endif
|
| 39 |
|
|
|
| 40 |
|
|
/** Libraries and library functions **********************************/
|
| 41 |
|
|
|
| 42 |
|
|
/* Use the OpenSSL crypto library (required) */
|
| 43 |
|
|
#define USE_OPENSSL
|
| 44 |
|
|
/* Use the RSA cryptosystem? */
|
| 45 |
|
|
#define USE_RSA
|
| 46 |
|
|
/* Use IDEA algorithm? (See file idea.txt) */
|
| 47 |
weaselp |
103 |
/* #define USE_IDEA */
|
| 48 |
rabbi |
98 |
/* Use AES algorithm? - should be handled by Install script setting compiler option -DUSE_AES */
|
| 49 |
|
|
/* #define USE_AES */
|
| 50 |
rabbi |
1 |
/* Support the OpenPGP message format? */
|
| 51 |
|
|
#define USE_PGP
|
| 52 |
|
|
|
| 53 |
|
|
/* the following are defined in the Makefile */
|
| 54 |
|
|
#if 0
|
| 55 |
|
|
/* Use the PCRE regular expression library for destination blocking? */
|
| 56 |
|
|
#define USE_PCRE
|
| 57 |
|
|
/* Use zlib for compression? */
|
| 58 |
|
|
#define USE_ZLIB
|
| 59 |
|
|
/* Use ncurses? */
|
| 60 |
|
|
#define USE_NCURSES
|
| 61 |
|
|
/* Use the WIN GUI? */
|
| 62 |
|
|
#define USE_WINGUI
|
| 63 |
|
|
/* Use sockets to deliver mail */
|
| 64 |
|
|
#define USE_SOCK
|
| 65 |
|
|
#endif
|
| 66 |
|
|
|
| 67 |
|
|
/** System dependencies **********************************************/
|
| 68 |
|
|
/* Macros: UNIX for Unix-style systems
|
| 69 |
|
|
POSIX for systems with POSIX header files (including DJGPP)
|
| 70 |
|
|
MSDOS for 32 bit DOS
|
| 71 |
|
|
WIN32 for Windows 95/NT */
|
| 72 |
|
|
|
| 73 |
|
|
#if defined(_WIN32) && !defined(WIN32)
|
| 74 |
|
|
#define WIN32
|
| 75 |
|
|
#endif
|
| 76 |
|
|
|
| 77 |
|
|
#if defined(__RSXNT__) && !defined(WIN32)
|
| 78 |
|
|
#define WIN32
|
| 79 |
|
|
#endif
|
| 80 |
|
|
|
| 81 |
|
|
#if !defined(UNIX) && !defined(WIN32) && !defined(MSDOS)
|
| 82 |
|
|
#define UNIX
|
| 83 |
|
|
#endif
|
| 84 |
|
|
|
| 85 |
|
|
#if defined(UNIX) && !defined(POSIX)
|
| 86 |
|
|
#define POSIX
|
| 87 |
|
|
#endif
|
| 88 |
|
|
|
| 89 |
|
|
#ifdef UNIX
|
| 90 |
|
|
#define HAVE_UNAME
|
| 91 |
|
|
#define HAVE_GECOS
|
| 92 |
|
|
#define DEV_URANDOM "/dev/urandom"
|
| 93 |
|
|
#ifdef __OpenBSD__
|
| 94 |
|
|
#define DEV_RANDOM "/dev/srandom"
|
| 95 |
|
|
#else
|
| 96 |
|
|
#define DEV_RANDOM "/dev/random"
|
| 97 |
|
|
#endif
|
| 98 |
|
|
#endif
|
| 99 |
|
|
|
| 100 |
|
|
#if defined(POSIX) || defined(USE_SOCK)
|
| 101 |
|
|
#define HAVE_GETHOSTNAME
|
| 102 |
|
|
#endif
|
| 103 |
|
|
|
| 104 |
|
|
#ifdef POSIX
|
| 105 |
|
|
#define HAVE_TERMIOS
|
| 106 |
|
|
/* not a POSIX function, but avaiable on virtually all Unix systems */
|
| 107 |
|
|
#define HAVE_GETTIMEOFDAY
|
| 108 |
|
|
#endif
|
| 109 |
|
|
|
| 110 |
|
|
#ifdef linux
|
| 111 |
|
|
#define HAVE_GETDOMAINNAME
|
| 112 |
|
|
#endif
|
| 113 |
|
|
|
| 114 |
|
|
#ifdef MSDOS
|
| 115 |
|
|
#define SHORTNAMES
|
| 116 |
|
|
#ifndef WIN32
|
| 117 |
|
|
#define HAVE_GETKEY
|
| 118 |
|
|
#undef USE_SOCK
|
| 119 |
|
|
#endif
|
| 120 |
|
|
#endif
|
| 121 |
|
|
|
| 122 |
|
|
#if defined(USE_WINGUI) && !defined(WIN32)
|
| 123 |
|
|
#error "The GUI requires Win32!"
|
| 124 |
|
|
#endif
|
| 125 |
|
|
|
| 126 |
|
|
/** Constants *********************************************************/
|
| 127 |
|
|
|
| 128 |
|
|
/* Give up if a file is larger than BUFFER_MAX bytes: */
|
| 129 |
|
|
/* #define BUFFER_MAX 64*1024*1024 */
|
| 130 |
|
|
|
| 131 |
|
|
#define PATHMAX 512
|
| 132 |
|
|
#define LINELEN 128
|
| 133 |
|
|
#define BUFSIZE 4096
|
| 134 |
|
|
|
| 135 |
weaselp |
105 |
/** if it is a systemwide installation defined GLOBALMIXCONF **********/
|
| 136 |
|
|
/* #define GLOBALMIXCONF "/etc/mix.cfg" */
|
| 137 |
|
|
|
| 138 |
|
|
/* The path to append to a user's homedirectory for his local Mix dir */
|
| 139 |
|
|
#ifndef HOMEMIXDIR
|
| 140 |
|
|
#define HOMEMIXDIR "Mix"
|
| 141 |
|
|
#endif
|
| 142 |
|
|
|
| 143 |
rabbi |
1 |
/** file names ********************************************************/
|
| 144 |
|
|
|
| 145 |
weaselp |
105 |
#define DEFAULT_MIXCONF "mix.cfg" /* mixmaster configuration file */
|
| 146 |
|
|
#define DEFAULT_DISCLAIMFILE "disclaim.txt"
|
| 147 |
|
|
#define DEFAULT_FROMDSCLFILE "fromdscl.txt"
|
| 148 |
|
|
#define DEFAULT_POP3CONF "pop3.cfg"
|
| 149 |
|
|
#define DEFAULT_HELPFILE "help.txt"
|
| 150 |
|
|
#define DEFAULT_ABUSEFILE "abuse.txt"
|
| 151 |
|
|
#define DEFAULT_REPLYFILE "reply.txt"
|
| 152 |
|
|
#define DEFAULT_USAGEFILE "usage.txt"
|
| 153 |
|
|
#define DEFAULT_USAGELOG "usage.log"
|
| 154 |
|
|
#define DEFAULT_BLOCKFILE "blocked.txt"
|
| 155 |
|
|
#define DEFAULT_ADMKEYFILE "adminkey.txt"
|
| 156 |
|
|
#define DEFAULT_KEYFILE "key.txt"
|
| 157 |
|
|
#define DEFAULT_PGPKEY "pgpkey.txt"
|
| 158 |
|
|
#define DEFAULT_DSAPARAMS "dsaparam.mix"
|
| 159 |
|
|
#define DEFAULT_DHPARAMS "dhparam.mix"
|
| 160 |
|
|
#define DEFAULT_MIXRAND "mixrand.bin"
|
| 161 |
|
|
#define DEFAULT_SECRING "secring.mix"
|
| 162 |
|
|
#define DEFAULT_PUBRING "pubring.mix"
|
| 163 |
|
|
#define DEFAULT_IDLOG "id.log"
|
| 164 |
|
|
#define DEFAULT_STATS "stats.log"
|
| 165 |
rabbi |
1 |
/* To enable multiple dest.blk files, edit the following line. */
|
| 166 |
|
|
/* Filenames must be seperated by one space. */
|
| 167 |
weaselp |
105 |
#define DEFAULT_DESTBLOCK "dest.blk rab.blk"
|
| 168 |
|
|
#define DEFAULT_DESTALLOW "dest.alw"
|
| 169 |
|
|
#define DEFAULT_SOURCEBLOCK "source.blk"
|
| 170 |
|
|
#define DEFAULT_HDRFILTER "header.blk"
|
| 171 |
|
|
#define DEFAULT_REGULAR "time.log"
|
| 172 |
|
|
#define DEFAULT_POOL "pool" /* remailer pool subdirectory */
|
| 173 |
|
|
#define DEFAULT_TYPE1LIST "rlist.txt"
|
| 174 |
|
|
#define DEFAULT_TYPE2REL "mlist.txt"
|
| 175 |
rabbi |
1 |
#ifdef SHORTNAMES
|
| 176 |
weaselp |
105 |
#define DEFAULT_TYPE2LIST "type2.lis"
|
| 177 |
rabbi |
1 |
#else
|
| 178 |
weaselp |
105 |
#define DEFAULT_TYPE2LIST "type2.list"
|
| 179 |
rabbi |
1 |
#endif
|
| 180 |
weaselp |
105 |
|
| 181 |
|
|
#define DEFAULT_PGPREMPUBRING "pubring.pgp"
|
| 182 |
|
|
#define DEFAULT_PGPREMPUBASC "pubring.asc"
|
| 183 |
|
|
#define DEFAULT_PGPREMSECRING "secring.pgp"
|
| 184 |
|
|
#define DEFAULT_NYMSECRING "nymsec.pgp"
|
| 185 |
|
|
#define DEFAULT_NYMDB "secrets.mix"
|
| 186 |
rabbi |
1 |
|
| 187 |
weaselp |
105 |
extern char MIXCONF[];
|
| 188 |
|
|
extern char DISCLAIMFILE[];
|
| 189 |
|
|
extern char FROMDSCLFILE[];
|
| 190 |
|
|
extern char POP3CONF[];
|
| 191 |
|
|
extern char HELPFILE[];
|
| 192 |
|
|
extern char ABUSEFILE[];
|
| 193 |
|
|
extern char REPLYFILE[];
|
| 194 |
|
|
extern char USAGEFILE[];
|
| 195 |
|
|
extern char USAGELOG[];
|
| 196 |
|
|
extern char BLOCKFILE[];
|
| 197 |
|
|
extern char ADMKEYFILE[];
|
| 198 |
|
|
extern char KEYFILE[];
|
| 199 |
|
|
extern char PGPKEY[];
|
| 200 |
|
|
extern char DSAPARAMS[];
|
| 201 |
|
|
extern char DHPARAMS[];
|
| 202 |
|
|
extern char MIXRAND[];
|
| 203 |
|
|
extern char SECRING[];
|
| 204 |
|
|
extern char PUBRING[];
|
| 205 |
|
|
extern char IDLOG[];
|
| 206 |
|
|
extern char STATS[];
|
| 207 |
|
|
extern char DESTBLOCK[];
|
| 208 |
|
|
extern char DESTALLOW[];
|
| 209 |
|
|
extern char SOURCEBLOCK[];
|
| 210 |
|
|
extern char HDRFILTER[];
|
| 211 |
|
|
extern char REGULAR[];
|
| 212 |
|
|
extern char POOL[];
|
| 213 |
|
|
extern char TYPE1LIST[];
|
| 214 |
|
|
extern char TYPE2REL[];
|
| 215 |
|
|
extern char TYPE2LIST[];
|
| 216 |
rabbi |
1 |
|
| 217 |
weaselp |
105 |
extern char PGPREMPUBRING[];
|
| 218 |
|
|
extern char PGPREMPUBASC[];
|
| 219 |
|
|
extern char PGPREMSECRING[];
|
| 220 |
|
|
extern char NYMSECRING[];
|
| 221 |
|
|
extern char NYMDB[];
|
| 222 |
|
|
|
| 223 |
rabbi |
1 |
/* string constants */
|
| 224 |
|
|
#define remailer_type "Remailer-Type: Mixmaster "
|
| 225 |
|
|
#define begin_remailer "-----BEGIN REMAILER MESSAGE-----"
|
| 226 |
|
|
#define end_remailer "-----END REMAILER MESSAGE-----"
|
| 227 |
|
|
#define begin_key "-----Begin Mix Key-----"
|
| 228 |
|
|
#define end_key "-----End Mix Key-----"
|
| 229 |
|
|
#define begin_pgp "-----BEGIN PGP "
|
| 230 |
|
|
#define end_pgp "-----END PGP "
|
| 231 |
|
|
#define begin_pgpmsg "-----BEGIN PGP MESSAGE-----"
|
| 232 |
|
|
#define end_pgpmsg "-----END PGP MESSAGE-----"
|
| 233 |
|
|
#define begin_pgpkey "-----BEGIN PGP PUBLIC KEY BLOCK-----"
|
| 234 |
|
|
#define end_pgpkey "-----END PGP PUBLIC KEY BLOCK-----"
|
| 235 |
|
|
#define begin_pgpsigned "-----BEGIN PGP SIGNED MESSAGE-----"
|
| 236 |
|
|
#define begin_pgpsig "-----BEGIN PGP SIGNATURE-----"
|
| 237 |
|
|
#define end_pgpsig "-----END PGP SIGNATURE-----"
|
| 238 |
|
|
#define info_beginpgp "=====BEGIN PGP MESSAGE====="
|
| 239 |
|
|
#define info_endpgp "=====END PGP MESSAGE====="
|
| 240 |
|
|
#define info_pgpsig "=====Sig: "
|
| 241 |
|
|
|
| 242 |
|
|
|
| 243 |
|
|
/***********************************************************************
|
| 244 |
|
|
* The following variables are read from mix.cfg, with default values
|
| 245 |
|
|
* defined in mix.c */
|
| 246 |
|
|
|
| 247 |
|
|
int REMAIL;
|
| 248 |
|
|
int MIX;
|
| 249 |
|
|
int PGP;
|
| 250 |
|
|
int UNENCRYPTED;
|
| 251 |
|
|
int REMIX;
|
| 252 |
rabbi |
62 |
int REPGP;
|
| 253 |
rabbi |
1 |
extern char MIXDIR[];
|
| 254 |
|
|
extern char POOLDIR[];
|
| 255 |
|
|
extern char SENDMAIL[];
|
| 256 |
|
|
extern char SENDANONMAIL[];
|
| 257 |
|
|
extern char SMTPRELAY[];
|
| 258 |
|
|
extern char NEWS[];
|
| 259 |
|
|
extern char MAILtoNEWS[];
|
| 260 |
|
|
extern char ORGANIZATION[];
|
| 261 |
|
|
extern char MID[];
|
| 262 |
|
|
extern char TYPE1[];
|
| 263 |
|
|
extern char ERRLOG[];
|
| 264 |
|
|
extern char NAME[];
|
| 265 |
|
|
extern char ADDRESS[];
|
| 266 |
|
|
extern char REMAILERADDR[];
|
| 267 |
|
|
extern char ANONADDR[];
|
| 268 |
|
|
extern char REMAILERNAME[];
|
| 269 |
|
|
extern char ANONNAME[];
|
| 270 |
|
|
extern char COMPLAINTS[];
|
| 271 |
|
|
extern int AUTOREPLY;
|
| 272 |
|
|
extern char HELONAME[];
|
| 273 |
|
|
extern char ENVFROM[];
|
| 274 |
|
|
extern char SHORTNAME[];
|
| 275 |
|
|
extern int POOLSIZE;
|
| 276 |
|
|
extern int RATE;
|
| 277 |
|
|
extern int MIDDLEMAN;
|
| 278 |
|
|
extern int AUTOBLOCK;
|
| 279 |
|
|
extern char FORWARDTO[];
|
| 280 |
|
|
extern int SIZELIMIT;
|
| 281 |
|
|
extern int INFLATEMAX;
|
| 282 |
|
|
extern int MAXRANDHOPS;
|
| 283 |
|
|
extern int BINFILTER;
|
| 284 |
|
|
extern long PACKETEXP;
|
| 285 |
|
|
extern long IDEXP;
|
| 286 |
|
|
extern int VERBOSE;
|
| 287 |
|
|
extern long SENDPOOLTIME;
|
| 288 |
|
|
extern int NUMCOPIES;
|
| 289 |
|
|
extern char CHAIN[];
|
| 290 |
|
|
extern int DISTANCE;
|
| 291 |
|
|
extern int MINREL;
|
| 292 |
|
|
extern int RELFINAL;
|
| 293 |
|
|
extern long MAXLAT;
|
| 294 |
|
|
extern char PGPPUBRING[];
|
| 295 |
|
|
extern char PGPSECRING[];
|
| 296 |
rabbi |
102 |
extern char PASSPHRASE[];
|
| 297 |
rabbi |
1 |
extern long POP3TIME;
|
| 298 |
|
|
extern int POP3DEL;
|
| 299 |
|
|
extern int POP3SIZELIMIT;
|
| 300 |
|
|
extern char MAILBOX[];
|
| 301 |
|
|
extern char MAILABUSE[];
|
| 302 |
|
|
extern char MAILBLOCK[];
|
| 303 |
|
|
extern char MAILUSAGE[];
|
| 304 |
|
|
extern char MAILANON[];
|
| 305 |
|
|
extern char MAILERROR[];
|
| 306 |
|
|
extern char MAILBOUNCE[];
|
| 307 |
|
|
|
| 308 |
|
|
#endif
|