/[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 163 - (show annotations) (download)
Wed Aug 21 19:28:04 2002 UTC (10 years, 10 months ago) by weaselp
File MIME type: text/plain
File size: 8689 byte(s)
Make sure to deliver to the right directory with Maildir deliveries. Since
we do not chdir() to the Mixmaster base directory we need to take care of
this whenever we do file or directory operations. Fortunatly the function
mixfile() helps here. mixfile() was extended to handle paths starting
with "~/". '~' is replaced by the HOME environment variable if defined.

Implement MAILIN option: If set Mixmaster reads mails from either a mbox
or a Maildir mail folder when processing its queue (-M or daemon). After
reading the mail folder is emtpied. If MAILIN ends with / it is expected
to be a Maildir, mbox oterhwise.

I hope that I did not break anything with the change to mixfile(). Maildir
drop and reading from both Maildir and mbox has been tested a little. Seems
to work fine so far.
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.11 2002/08/21 19:28:04 weaselp 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 /* 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 /* #define USE_IDEA */
48 /* Use AES algorithm? - should be handled by Install script setting compiler option -DUSE_AES */
49 /* #define USE_AES */
50 /* 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 #if defined(WIN32) && !defined(_USRDLL)
127 #define DLLIMPORT __declspec(dllimport)
128 #else
129 #define DLLIMPORT
130 #endif
131
132 /** Constants *********************************************************/
133
134 /* Give up if a file is larger than BUFFER_MAX bytes: */
135 /* #define BUFFER_MAX 64*1024*1024 */
136
137 #define PATHMAX 512
138 #define LINELEN 128
139 #define BUFSIZE 4096
140
141 /** if it is a systemwide installation defined GLOBALMIXCONF **********/
142 /* #define GLOBALMIXCONF "/etc/mix.cfg" */
143
144 /* The path to append to a user's homedirectory for his local Mix dir */
145 #ifndef HOMEMIXDIR
146 #define HOMEMIXDIR "Mix"
147 #endif
148
149 /** file names ********************************************************/
150
151 #define DEFAULT_MIXCONF "mix.cfg" /* mixmaster configuration file */
152 #define DEFAULT_DISCLAIMFILE "disclaim.txt"
153 #define DEFAULT_FROMDSCLFILE "fromdscl.txt"
154 #define DEFAULT_POP3CONF "pop3.cfg"
155 #define DEFAULT_HELPFILE "help.txt"
156 #define DEFAULT_ABUSEFILE "abuse.txt"
157 #define DEFAULT_REPLYFILE "reply.txt"
158 #define DEFAULT_USAGEFILE "usage.txt"
159 #define DEFAULT_USAGELOG "usage.log"
160 #define DEFAULT_BLOCKFILE "blocked.txt"
161 #define DEFAULT_ADMKEYFILE "adminkey.txt"
162 #define DEFAULT_KEYFILE "key.txt"
163 #define DEFAULT_PGPKEY "pgpkey.txt"
164 #define DEFAULT_DSAPARAMS "dsaparam.mix"
165 #define DEFAULT_DHPARAMS "dhparam.mix"
166 #define DEFAULT_MIXRAND "mixrand.bin"
167 #define DEFAULT_SECRING "secring.mix"
168 #define DEFAULT_PUBRING "pubring.mix"
169 #define DEFAULT_IDLOG "id.log"
170 #define DEFAULT_STATS "stats.log"
171 /* To enable multiple dest.blk files, edit the following line. */
172 /* Filenames must be seperated by one space. */
173 #define DEFAULT_DESTBLOCK "dest.blk rab.blk"
174 #define DEFAULT_DESTALLOW "dest.alw"
175 #define DEFAULT_SOURCEBLOCK "source.blk"
176 #define DEFAULT_HDRFILTER "header.blk"
177 #define DEFAULT_REGULAR "time.log"
178 #define DEFAULT_POOL "pool" /* remailer pool subdirectory */
179 #define DEFAULT_TYPE1LIST "rlist.txt"
180 #define DEFAULT_TYPE2REL "mlist.txt"
181 #ifdef SHORTNAMES
182 #define DEFAULT_TYPE2LIST "type2.lis"
183 #else
184 #define DEFAULT_TYPE2LIST "type2.list"
185 #endif
186
187 #define DEFAULT_PGPREMPUBRING "pubring.pgp"
188 #define DEFAULT_PGPREMPUBASC "pubring.asc"
189 #define DEFAULT_PGPREMSECRING "secring.pgp"
190 #define DEFAULT_NYMSECRING "nymsec.pgp"
191 #define DEFAULT_NYMDB "secrets.mix"
192
193 extern char MIXCONF[];
194 extern char DISCLAIMFILE[];
195 extern char FROMDSCLFILE[];
196 extern char POP3CONF[];
197 extern char HELPFILE[];
198 extern char ABUSEFILE[];
199 extern char REPLYFILE[];
200 extern char USAGEFILE[];
201 extern char USAGELOG[];
202 extern char BLOCKFILE[];
203 extern char ADMKEYFILE[];
204 extern char KEYFILE[];
205 extern char PGPKEY[];
206 extern char DSAPARAMS[];
207 extern char DHPARAMS[];
208 extern char MIXRAND[];
209 extern char SECRING[];
210 extern char PUBRING[];
211 extern char IDLOG[];
212 extern char STATS[];
213 extern char DESTBLOCK[];
214 extern char DESTALLOW[];
215 extern char SOURCEBLOCK[];
216 extern char HDRFILTER[];
217 extern char REGULAR[];
218 extern char POOL[];
219 extern char TYPE1LIST[];
220 extern char TYPE2REL[];
221 extern char TYPE2LIST[];
222
223 extern char PGPREMPUBRING[];
224 extern char PGPREMPUBASC[];
225 extern char PGPREMSECRING[];
226 DLLIMPORT extern char NYMSECRING[];
227 extern char NYMDB[];
228
229 /* string constants */
230 #define remailer_type "Remailer-Type: Mixmaster "
231 #define begin_remailer "-----BEGIN REMAILER MESSAGE-----"
232 #define end_remailer "-----END REMAILER MESSAGE-----"
233 #define begin_key "-----Begin Mix Key-----"
234 #define end_key "-----End Mix Key-----"
235 #define begin_pgp "-----BEGIN PGP "
236 #define end_pgp "-----END PGP "
237 #define begin_pgpmsg "-----BEGIN PGP MESSAGE-----"
238 #define end_pgpmsg "-----END PGP MESSAGE-----"
239 #define begin_pgpkey "-----BEGIN PGP PUBLIC KEY BLOCK-----"
240 #define end_pgpkey "-----END PGP PUBLIC KEY BLOCK-----"
241 #define begin_pgpsigned "-----BEGIN PGP SIGNED MESSAGE-----"
242 #define begin_pgpsig "-----BEGIN PGP SIGNATURE-----"
243 #define end_pgpsig "-----END PGP SIGNATURE-----"
244 #define info_beginpgp "=====BEGIN PGP MESSAGE====="
245 #define info_endpgp "=====END PGP MESSAGE====="
246 #define info_pgpsig "=====Sig: "
247
248
249 /***********************************************************************
250 * The following variables are read from mix.cfg, with default values
251 * defined in mix.c */
252
253 int REMAIL;
254 int MIX;
255 int PGP;
256 int UNENCRYPTED;
257 int REMIX;
258 int REPGP;
259 extern char MIXDIR[];
260 extern char POOLDIR[];
261 extern char SENDMAIL[];
262 extern char SENDANONMAIL[];
263 extern char SMTPRELAY[];
264 extern char NEWS[];
265 extern char MAILtoNEWS[];
266 extern char ORGANIZATION[];
267 extern char MID[];
268 extern char TYPE1[];
269 extern char ERRLOG[];
270 extern char NAME[];
271 extern char ADDRESS[];
272 extern char REMAILERADDR[];
273 extern char ANONADDR[];
274 extern char REMAILERNAME[];
275 extern char ANONNAME[];
276 extern char COMPLAINTS[];
277 extern int AUTOREPLY;
278 extern char HELONAME[];
279 extern char ENVFROM[];
280 extern char SHORTNAME[];
281 extern int POOLSIZE;
282 extern int RATE;
283 extern int MIDDLEMAN;
284 extern int AUTOBLOCK;
285 extern char FORWARDTO[];
286 extern int SIZELIMIT;
287 extern int INFLATEMAX;
288 extern int MAXRANDHOPS;
289 extern int BINFILTER;
290 extern long PACKETEXP;
291 extern long IDEXP;
292 DLLIMPORT extern int VERBOSE;
293 extern long SENDPOOLTIME;
294 extern int NUMCOPIES;
295 extern char CHAIN[];
296 extern int DISTANCE;
297 extern int MINREL;
298 extern int RELFINAL;
299 extern long MAXLAT;
300 DLLIMPORT extern char PGPPUBRING[];
301 DLLIMPORT extern char PGPSECRING[];
302 extern char PASSPHRASE[];
303 extern long POP3TIME;
304 extern int POP3DEL;
305 extern int POP3SIZELIMIT;
306 extern char MAILBOX[];
307 extern char MAILIN[];
308 extern char MAILABUSE[];
309 extern char MAILBLOCK[];
310 extern char MAILUSAGE[];
311 extern char MAILANON[];
312 extern char MAILERROR[];
313 extern char MAILBOUNCE[];
314
315 #endif

  ViewVC Help
Powered by ViewVC 1.1.5