mixmaster

mixmaster 3.0 patched for libressl
git clone git://parazyd.org/mixmaster.git
Log | Files | Refs | README

config.h (11206B)


      1 /* Mixmaster version 3.0  --  (C) 1999 - 2008 Anonymizer Inc. and others.
      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 973 2008-03-03 16:55:38Z rabbi $ */
     10 
     11 
     12 #ifndef _CONFIG_H
     13 #define _CONFIG_H
     14 #include "version.h"
     15 #ifndef WIN32
     16 #include "sys/param.h"
     17 #endif /* WIN32 */
     18 
     19 /* Disclaimer to be inserted in all anonymous messages: */
     20 #define DISCLAIMER \
     21  "Comments: This message did not originate from the Sender address above.\n" \
     22  "\tIt was remailed automatically by anonymizing remailer software.\n" \
     23  "\tPlease report problems or inappropriate use to the\n" \
     24  "\tremailer administrator at <%s>.\n"	/* (%s is the complaints address) */
     25 
     26 /* Additional disclaimer to be inserted in the body of messages with
     27  * user-supplied From lines, e.g.
     28  * "NOTE: The above From: line has not been authenticated!\n\n" */
     29 #define FROMDISCLAIMER ""
     30 
     31 /* Additional disclaimer to be inserted at the bottom of the body of all
     32  * messages */
     33 #define MSGFOOTER ""
     34 
     35 /* Comment to be inserted when a binary attachment is filtered out: */
     36 #define BINDISCLAIMER \
     37  "[...]"
     38 
     39 /* Character set for MIME-encoded mail header lines */
     40 #define MIMECHARSET "iso-8859-1"
     41 #if 1
     42 #define DEFLTENTITY ""
     43 #else
     44 #define DEFLTENTITY "text/plain; charset=" MIMECHARSET
     45 #endif
     46 
     47 #ifdef WIN32
     48 /* Use the PCRE regular expression library for destination blocking? */
     49 #define USE_PCRE
     50 /* Use zlib for compression? */
     51 #define USE_ZLIB
     52 /* Use ncurses? */
     53 #define USE_NCURSES
     54 /* Use the WIN GUI? */
     55 #define USE_WINGUI
     56 /* Use sockets to deliver mail */
     57 #define USE_SOCK
     58 /* Compile in Win32 service support */
     59 #define WIN32SERVICE
     60 #endif /* WIN32 */
     61 
     62 /** System dependencies **********************************************/
     63 /* Macros: UNIX  for Unix-style systems
     64            POSIX for systems with POSIX header files (including DJGPP)
     65            MSDOS for 32 bit DOS
     66            WIN32 for Windows 95/NT */
     67 
     68 #if defined(_WIN32) && !defined(WIN32)
     69 #define WIN32
     70 #endif
     71 
     72 #if defined(__RSXNT__) && !defined(WIN32)
     73 #define WIN32
     74 #endif
     75 
     76 #if !defined(UNIX) && !defined(WIN32) && !defined(MSDOS)
     77 #define UNIX
     78 #endif
     79 
     80 #if defined(UNIX) && !defined(POSIX)
     81 #define POSIX
     82 #endif
     83 
     84 #ifdef UNIX
     85 #define DEV_URANDOM "/dev/urandom"
     86 #ifdef __OpenBSD__
     87 #define DEV_RANDOM "/dev/arandom"
     88 #else
     89 #define DEV_RANDOM "/dev/random"
     90 #endif
     91 #endif
     92 
     93 #ifdef POSIX
     94 # define HAVE_TERMIOS
     95 #endif /* POSIX */
     96 
     97 #ifdef MSDOS
     98 #define SHORTNAMES
     99 #ifndef WIN32
    100 #define HAVE_GETKEY
    101 #undef USE_SOCK
    102 #endif
    103 #endif
    104 
    105 #if defined(USE_WINGUI) && !defined(WIN32)
    106 #error "The GUI requires Win32!"
    107 #endif
    108 
    109 #if defined(WIN32) && !defined(_USRDLL)
    110 #define DLLIMPORT __declspec(dllimport)
    111 #else
    112 #define DLLIMPORT
    113 #endif
    114 
    115 /* This block includes the config.h created by autoconf/configure.
    116  * Eventually this old config.h stuff should be merged with the autoconf
    117  * stuff perhaps. */
    118 #ifdef HAVE_CONFIG_H
    119 # include "../config.h"
    120 #else /* End of HAVE_CONFIG_H */
    121 
    122 /* Setup for stuff that happens when autoconf isn't run.  This should be 
    123  * removed once we finally nuke that damn Install script. */
    124 
    125 /** Libraries and library functions **********************************/
    126 
    127 /* Use the OpenSSL crypto library (required) */
    128 #define USE_OPENSSL
    129 /* Use IDEA algorithm? (See file idea.txt) */
    130 /* #define USE_IDEA */
    131 /* Use AES algorithm? - should be handled by Install script setting compiler option -DUSE_AES */
    132 /* #define USE_AES */
    133 /* Support the OpenPGP message format? */
    134 #define USE_PGP
    135 
    136 #ifdef UNIX
    137 # define HAVE_UNAME
    138 # define HAVE_GECOS
    139 #endif
    140 
    141 #if defined(POSIX) || defined(USE_SOCK)
    142 # define HAVE_GETHOSTNAME
    143 #endif
    144 
    145 #ifdef POSIX
    146 /* not a POSIX function, but avaiable on virtually all Unix systems */
    147 # define HAVE_GETTIMEOFDAY
    148 #endif
    149 
    150 #ifdef linux
    151 # define HAVE_GETDOMAINNAME
    152 #endif
    153 
    154 #ifdef WIN32
    155 # ifdef _MSC_VER
    156 #pragma warning(disable: 4018) /* signed/unsigned mismatch */
    157 #pragma warning(disable: 4761) /* integral size mismatch */
    158 # endif
    159 #endif
    160 
    161 
    162 #endif /* End of not HAVE_CONFIG_H */
    163 
    164 /** Constants *********************************************************/
    165 
    166 /* Give up if a file is larger than BUFFER_MAX bytes: */
    167 /* #define BUFFER_MAX 64*1024*1024 */
    168 
    169 #ifdef MAXPATHLEN
    170 #define PATHMAX MAXPATHLEN
    171 #else /* MAXPATHLEN */
    172 #ifdef _MSC
    173 #define PATHMAX MAX_PATH
    174 #else /* _MSC */
    175 #define PATHMAX 512
    176 #endif /* not _MSC */
    177 #endif /* not MAXPATHLEN */
    178 #define LINELEN 128
    179 #define BUFSIZE 4096
    180 
    181 /** if it is a systemwide installation defined GLOBALMIXCONF **********/
    182 /* #define GLOBALMIXCONF "/etc/mix.cfg" */
    183 
    184 /* The path to append to a user's homedirectory for his local Mix dir */
    185 #ifndef HOMEMIXDIR
    186 #define HOMEMIXDIR "Mix"
    187 #endif
    188 
    189 /** file names ********************************************************/
    190 
    191 #ifdef WIN32
    192 #define DEFAULT_MIXCONF "mix.cfg"  /* change to mix.ini eventually  */
    193 #else
    194 #define DEFAULT_MIXCONF "mix.cfg"      /* mixmaster configuration file */
    195 #endif
    196 #define DEFAULT_DISCLAIMFILE "disclaim.txt"
    197 #define DEFAULT_FROMDSCLFILE "fromdscl.txt"
    198 #define DEFAULT_MSGFOOTERFILE "footer.txt"
    199 #ifdef WIN32
    200 #define DEFAULT_POP3CONF "pop3.cfg"  /* change to pop3.ini eventually */
    201 #else
    202 #define DEFAULT_POP3CONF "pop3.cfg"
    203 #endif
    204 #define DEFAULT_HELPFILE "help.txt"
    205 #define DEFAULT_REQUESTDIR "requests"
    206 #define DEFAULT_ABUSEFILE "abuse.txt"
    207 #define DEFAULT_REPLYFILE "reply.txt"
    208 #define DEFAULT_USAGEFILE "usage.txt"
    209 #define DEFAULT_USAGELOG "usage.log"
    210 #define DEFAULT_BLOCKFILE "blocked.txt"
    211 #define DEFAULT_ADMKEYFILE "adminkey.txt"
    212 #define DEFAULT_KEYFILE "key.txt"
    213 #define DEFAULT_PGPKEY "pgpkey.txt"
    214 #define DEFAULT_DSAPARAMS "dsaparam.mix"
    215 #define DEFAULT_DHPARAMS "dhparam.mix"
    216 #define DEFAULT_MIXRAND "mixrand.bin"
    217 #define DEFAULT_SECRING "secring.mix"
    218 #define DEFAULT_PUBRING "pubring.mix"
    219 #define DEFAULT_IDLOG "id.log"
    220 #define DEFAULT_STATS "stats.log"
    221 #define DEFAULT_PGPMAXCOUNT "pgpmaxcount.log"
    222 /* To enable multiple dest.blk files, edit the following line. */
    223 /* Filenames must be seperated by one space.                   */
    224 #define DEFAULT_DESTBLOCK "dest.blk rab.blk"
    225 #define DEFAULT_DESTALLOW "dest.alw"
    226 #define DEFAULT_DESTALLOW2 "dest.alw.nonpublished"
    227 #define DEFAULT_SOURCEBLOCK "source.blk"
    228 #define DEFAULT_HDRFILTER "header.blk"
    229 #define DEFAULT_REGULAR "time.log"
    230 #define DEFAULT_POOL "pool"            /* remailer pool subdirectory */
    231 #define DEFAULT_TYPE1LIST "rlist.txt"
    232 #define DEFAULT_TYPE2REL "mlist.txt"
    233 #define DEFAULT_PIDFILE "mixmaster.pid"
    234 #define DEFAULT_STATSSRC "stats-src.txt"
    235 
    236 #define DEFAULT_PGPREMPUBRING "pubring.pgp"
    237 #define DEFAULT_PGPREMPUBASC "pubring.asc"
    238 #define DEFAULT_PGPREMSECRING "secring.pgp"
    239 #define DEFAULT_NYMSECRING "nymsec.pgp"
    240 #define DEFAULT_NYMDB "secrets.mix"
    241 #define DEFAULT_STAREX "starex.txt"
    242 #define DEFAULT_ALLPINGERSURL "http://www.noreply.org/allpingers/allpingers.txt"
    243 #define DEFAULT_ALLPINGERSFILE "allpingers.txt"
    244 #define DEFAULT_WGET "wget"
    245 
    246 DLLIMPORT extern char MIXCONF[];
    247 extern char DISCLAIMFILE[];
    248 extern char FROMDSCLFILE[];
    249 extern char MSGFOOTERFILE[];
    250 extern char POP3CONF[];
    251 extern char HELPFILE[];
    252 extern char REQUESTDIR[];
    253 extern char ABUSEFILE[];
    254 extern char REPLYFILE[];
    255 extern char USAGEFILE[];
    256 extern char USAGELOG[];
    257 extern char BLOCKFILE[];
    258 extern char ADMKEYFILE[];
    259 extern char KEYFILE[];
    260 extern char PGPKEY[];
    261 extern char DSAPARAMS[];
    262 extern char DHPARAMS[];
    263 extern char MIXRAND[];
    264 extern char SECRING[];
    265 extern char PUBRING[];
    266 extern char IDLOG[];
    267 extern char STATS[];
    268 extern char PGPMAXCOUNT[];
    269 extern char DESTBLOCK[];
    270 extern char DESTALLOW[];
    271 extern char DESTALLOW2[];
    272 extern char SOURCEBLOCK[];
    273 extern char HDRFILTER[];
    274 extern char REGULAR[];
    275 extern char POOL[];
    276 extern char TYPE1LIST[];
    277 extern char TYPE2REL[];
    278 extern char PIDFILE[];
    279 extern char STAREX[];
    280 
    281 extern char PGPREMPUBRING[];
    282 extern char PGPREMPUBASC[];
    283 extern char PGPREMSECRING[];
    284 DLLIMPORT extern char NYMSECRING[];
    285 extern char NYMDB[];
    286 
    287 /* string constants */
    288 #define remailer_type "Remailer-Type: Mixmaster "
    289 #define mixmaster_protocol "2"
    290 #define begin_remailer "-----BEGIN REMAILER MESSAGE-----"
    291 #define end_remailer "-----END REMAILER MESSAGE-----"
    292 #define begin_key "-----Begin Mix Key-----"
    293 #define end_key "-----End Mix Key-----"
    294 #define begin_pgp "-----BEGIN PGP "
    295 #define end_pgp "-----END PGP "
    296 #define begin_pgpmsg "-----BEGIN PGP MESSAGE-----"
    297 #define end_pgpmsg "-----END PGP MESSAGE-----"
    298 #define begin_pgpkey "-----BEGIN PGP PUBLIC KEY BLOCK-----"
    299 #define end_pgpkey "-----END PGP PUBLIC KEY BLOCK-----"
    300 #define begin_pgpseckey "-----BEGIN PGP PRIVATE KEY BLOCK-----"
    301 #define end_pgpseckey "-----END PGP PRIVATE KEY BLOCK-----"
    302 #define begin_pgpsigned "-----BEGIN PGP SIGNED MESSAGE-----"
    303 #define begin_pgpsig "-----BEGIN PGP SIGNATURE-----"
    304 #define end_pgpsig "-----END PGP SIGNATURE-----"
    305 #define info_beginpgp "=====BEGIN PGP MESSAGE====="
    306 #define info_endpgp "=====END PGP MESSAGE====="
    307 #define info_pgpsig "=====Sig: "
    308 
    309 
    310 /***********************************************************************
    311  * The following variables are read from mix.cfg, with default values
    312  * defined in mix.c */
    313 
    314 int REMAIL;
    315 int MIX;
    316 int PGP;
    317 int UNENCRYPTED;
    318 int REMIX;
    319 int REPGP;
    320 extern char MIXDIR[];
    321 extern char POOLDIR[];
    322 extern char EXTFLAGS[];
    323 extern char SENDMAIL[];
    324 extern char SENDANONMAIL[];
    325 extern char PRECEDENCE[];
    326 extern char SMTPRELAY[];
    327 extern char SMTPUSERNAME[];
    328 extern char SMTPPASSWORD[];
    329 extern char NEWS[];
    330 extern char MAILtoNEWS[];
    331 extern char ORGANIZATION[];
    332 extern char MID[];
    333 extern char TYPE1[];
    334 extern char ERRLOG[];
    335 extern char NAME[];
    336 extern char ADDRESS[];
    337 extern char REMAILERADDR[];
    338 extern char ANONADDR[];
    339 extern char REMAILERNAME[];
    340 extern char ANONNAME[];
    341 extern char COMPLAINTS[];
    342 extern int AUTOREPLY;
    343 extern char HELONAME[];
    344 extern char ENVFROM[];
    345 extern char SHORTNAME[];
    346 extern int POOLSIZE;
    347 DLLIMPORT extern int RATE;
    348 extern int INDUMMYP;
    349 extern int OUTDUMMYP;
    350 extern int MIDDLEMAN;
    351 extern int AUTOBLOCK;
    352 extern int STATSDETAILS;
    353 extern char FORWARDTO[];
    354 extern int SIZELIMIT;
    355 extern int INFLATEMAX;
    356 extern int MAXRANDHOPS;
    357 extern int BINFILTER;
    358 extern int LISTSUPPORTED;
    359 extern long PACKETEXP;
    360 extern long IDEXP;
    361 DLLIMPORT extern int VERBOSE;
    362 DLLIMPORT extern long SENDPOOLTIME;
    363 extern long MAILINTIME;
    364 extern long KEYLIFETIME;
    365 extern long KEYOVERLAPPERIOD;
    366 extern long KEYGRACEPERIOD;
    367 extern int NUMCOPIES;
    368 extern char CHAIN[];
    369 extern int DISTANCE;
    370 extern int MINREL;
    371 extern int RELFINAL;
    372 extern long MAXLAT;
    373 extern long MINLAT;
    374 DLLIMPORT extern char PGPPUBRING[];
    375 DLLIMPORT extern char PGPSECRING[];
    376 DLLIMPORT extern char PASSPHRASE[];
    377 extern long POP3TIME;
    378 extern int POP3DEL;
    379 extern int POP3SIZELIMIT;
    380 extern char MAILBOX[];
    381 extern char MAILIN[];
    382 extern char MAILABUSE[];
    383 extern char MAILBLOCK[];
    384 extern char MAILUSAGE[];
    385 extern char MAILANON[];
    386 extern char MAILERROR[];
    387 extern char MAILBOUNCE[];
    388 DLLIMPORT extern int CLIENTAUTOFLUSH;
    389 extern int MAXRECIPIENTS;
    390 extern long TIMESKEW_FORWARD;
    391 extern long TIMESKEW_BACK;
    392 extern int TEMP_FAIL;
    393 extern char ALLPINGERSURL[];
    394 extern char ALLPINGERSFILE[];
    395 
    396 extern char WGET[];
    397 extern char STATSSRC[];
    398 extern int STATSAUTOUPDATE;
    399 extern long STATSINTERVAL;
    400 
    401 DLLIMPORT extern char ENTEREDPASSPHRASE[LINELEN];
    402 
    403 #endif