/[pkg-mixmaster]/trunk/Mix/Src/config.h
ViewVC logotype

Contents of /trunk/Mix/Src/config.h

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id

  ViewVC Help
Powered by ViewVC 1.1.5