/[pkg-mixmaster]/trunk/Mix/Install
ViewVC logotype

Contents of /trunk/Mix/Install

Parent Directory Parent Directory | Revision Log Revision Log


Revision 125 - (show annotations) (download)
Fri Aug 9 18:00:06 2002 UTC (10 years, 10 months ago) by rabbi
File size: 19457 byte(s)
Added identification logic for the new OpenSSL versions (0.9.6e{e,f,g}).
Now prints a warning if using OpenSSL 0.9.4 through 0.9.6e. Still allows
building with these versions.
1 #!/bin/sh
2 # Mixmaster version 3 -- (C) 1999 Anonymizer Inc.
3
4 # Mixmaster may be redistributed and modified under certain conditions.
5 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
6 # ANY KIND, either express or implied. See the file COPYRIGHT for
7 # details.
8
9 # $Id: Install,v 1.8 2002/08/09 18:00:06 rabbi Exp $
10
11 #whereis program default-path
12 whereis()
13 {
14 #echo "Looking for $1..."
15 found=""
16 for i in $* `which $1 2>&1`
17 do
18 if [ -f "$i" -a -x "$i" ]
19 then
20 found=$i
21 fi
22 done
23 if [ "$found" = "" ]
24 then
25 found=$2
26 # echo "$1 not found. Using $found."
27 # else
28 # echo "$1 is at $found."
29 fi
30 }
31
32 if echo -n | grep n >/dev/null
33 then
34 echo1=""
35 echo2="\c"
36 else
37 echo1="-n"
38 echo2=""
39 fi
40
41 # readln text default
42 readln()
43 {
44 echo $echo1 "$1 [$2] $echo2"
45 read ans
46 if [ -z "$ans" ]
47 then
48 ans="$2"
49 fi
50 }
51
52 # findlib libxxx.a -- find and configure libraries
53 # Input:
54 # $1 library name
55 # $CONFIG library configure options
56 # $INCDIR possible include directories
57 # $SRCDIR possible library source directories
58 # $LIBDIR possible library binary directories
59 #
60 # Output:
61 # $found library directory
62 # $lib library name
63 # $INCDIR include directory if required, empty otherwise
64 # $LDFLAG linker options
65 # $LIB path to library file
66 # $MAKELIB Makefile entry to compile library
67 findlib()
68 {
69 lib=$1
70 libso=`echo $lib | sed 's/\.a$/.so/'`
71 echo "Looking for $lib..."
72
73 found=
74 source=
75 type=
76 LIB=
77 LDFLAG=
78 MAKELIB=
79
80 for i in /usr/local/lib /usr/lib /lib
81 do
82 if [ -r $i/$lib -o -r $i/$libso ]
83 then
84 found=$i
85 type=system
86 fi
87 done
88
89 for i in $LIBDIR
90 do
91 if [ -r $i/$lib -o -r $i/$libso ]
92 then
93 found=$i
94 type=installed
95 fi
96 done
97
98 for i in $SRCDIR
99 do
100 if [ -r $i/$lib -o -r $i/lib/$lib ]
101 then
102 found=$i
103 type=binary
104 fi
105 done
106
107 if [ -r "$found/$libso" ]
108 then
109 echo "Found at $found/$libso."
110 elif [ -r "$found/$lib" ]
111 then
112 echo "Found at $found/$lib."
113 elif [ -r "$found/lib/$lib" ]
114 then
115 echo "Found at $found/lib/$lib."
116 fi
117
118 for i in $SRCDIR
119 do
120 if [ -d $i -a ! "$type" = binary ]
121 then
122 source=$i
123 fi
124 done
125
126 if [ "$source" != "" ]
127 then
128 echo "Found source directory $source."
129 if [ "$found" = "" ]
130 then
131 ans=y
132 else
133 echo "Use the source if the pre-installed library causes compilation problems."
134 readln "Use source?" n
135 fi
136 if [ "$ans" = "y" ]
137 then
138 found=$source
139 type=source
140 fi
141 fi
142
143 if [ "$found" = "" ]
144 then
145 echo "Not found."
146 fi
147
148 if [ -r $found/lib/$lib ]
149 then
150 LIB=$found/lib/$lib
151 else
152 LIB=$found/$lib
153 fi
154 if [ "$type" = system ]
155 then
156 LIB=
157 LDFLAG=-l`echo $lib | sed 's/^lib//;s/\.a$//'`
158 fi
159
160 incdir=$INCDIR
161 INCDIR=
162 for i in $incdir
163 do
164 if [ -d $i ]
165 then
166 INCDIR=$i
167 fi
168 done
169
170 if [ "$type" = source -o "$type" = binary ]
171 then
172 if [ ! -r $found/lib/$lib ]
173 then
174 MAKELIB="$found/$lib:
175 cd $found; make $lib"
176 fi
177 if [ -d $found/include ]
178 then
179 INCDIR=$found/include
180 else
181 INCDIR=$found
182 fi
183 fi
184
185 if [ "$type" = source ]
186 then
187 dir=`pwd`
188 if [ "$dir" = "" ]
189 then
190 dir=$PWD
191 fi
192
193 cd $found
194 if [ -x configure ]
195 then
196 echo "Configuring..."
197 ./configure $CONFIG
198 fi
199 if [ "$lib" = "libcrypto.a" ]
200 then
201 if [ -f config ]
202 then
203 sh config
204 elif [ -x Configure ]
205 then
206 ./Configure 2>tmp.$$
207 cat tmp.$$
208 readln "Your system?" `cat tmp.$$ | tr ' ' '\n' | grep -i \`uname\` | tail -1`
209 rm -f tmp.$$
210 echo "Configuring..."
211 ./Configure $ans
212 fi
213 fi
214 cd $dir
215 fi
216 }
217
218 ##########################################################################
219 umask 077
220
221 if [ `whoami` = root ]
222 then
223 echo "Please create a new user, e.g, \`mix', and install Mixmaster under that
224 user id. Installing Mixmaster as root is not recommended."
225 readln "Continue anyway?" n
226 if [ "$ans" = n ]
227 then
228 exit 1
229 fi
230 fi
231
232 MIXDIR=$PWD
233 if [ "$MIXDIR" = "" ]
234 then
235 MIXDIR=`pwd`
236 fi
237 MIXCFG=$MIXDIR/conf
238 MIXSRC=$MIXDIR/Src
239 MIXDEST0=${MIXPATH:-$HOME/Mix}
240
241 system=`uname`
242 if [ "$system" = "MS-DOS" ]
243 then
244 system=msdos
245 fi
246
247 if [ "$HOSTNAME" = "" ]
248 then
249 HOSTNAME=`hostname`
250 fi
251 if [ "$HOSTNAME" = "" ]
252 then
253 HOSTNAME=msdos
254 system=msdos
255 fi
256
257 if [ "$system" = msdos ]
258 then
259 MIXDEST0=${MIXPATH:-C:/Mix}
260 fi
261
262 if [ -f $MIXSRC/Makefile ]
263 then
264 if grep "#Makefile generated.*$HOSTNAME" $MIXSRC/Makefile
265 then
266 echo "Found a Makefile."
267 else
268 readln "Remove old Makefile?" y
269 if [ "$ans" = y ]
270 then
271 rm -f $MIXSRC/Makefile
272 fi
273 fi
274 fi
275
276 if [ -f $MIXSRC/Makefile ]
277 then
278 MIXDEST=`grep "DSPOOL=" $MIXSRC/Makefile | sed 's/.*DSPOOL=..//;s/\".*//'`
279 if [ "$MIXDEST" = "" ]
280 then
281 MIXDEST="$MIXDEST0"
282 fi
283 fi
284
285 if [ "$MIXDEST" = "" ]
286 then
287 readln "Mixmaster directory?" $MIXDEST0
288 MIXDEST=$ans
289 else
290 echo "Mixmaster directory: $MIXDEST"
291 fi
292
293 if [ ! -d $MIXDEST ]
294 then
295 echo "Creating directory $MIXDEST"
296 mkdir $MIXDEST
297 fi
298
299 if [ ! -d $MIXDEST ]
300 then
301 echo "Cannot not create $MIXDEST"
302 exit 1
303 fi
304
305 if [ -f $MIXDEST/mix.cfg ]
306 then
307 if [ -f $MIXDEST/secring.mix ]
308 then
309 remailer=y
310 else
311 readln "Do you want to set up a remailer?" n
312 remailer=$ans
313 fi
314 elif [ -f $MIXDEST/mixmaster.conf ]
315 then
316 echo "Upgrading from Mixmaster 2.0.*"
317 remailer=n
318 else
319 readln "Do you want to set up a remailer?" y
320 remailer=$ans
321 fi
322
323 cd $MIXSRC
324 if [ ! -f Makefile ]
325 then
326 LIBS=
327 INC=
328 DEF=
329 LDFLAGS=
330
331 if [ "$system" = msdos ]
332 then
333 readln "Use WIN32 GUI?" y
334 if [ "$ans" = y ]
335 then
336 system=win32
337 LDFLAGS=-lwsock32
338 fi
339 fi
340 if [ "$system" = SunOS ]
341 then
342 LDFLAGS="-lsocket -lnsl"
343 fi
344
345 if [ "$system" = OpenBSD ]
346 then
347 LIBDIR=
348 INCDIR=
349 SRCDIR=idea*
350 findlib libidea.a
351 if [ "$found" = "" ]
352 then
353 echo "Please build libidea.a or install OpenSSL with IDEA now."
354 exit 1
355 else
356 DEF="$DEF -DUSE_IDEA"
357 IDEALIB="$MAKELIB"
358 LIBS="$LIBS $LIB"
359 LDFLAGS="$LDFLAGS $LDFLAG"
360 if [ "$INCDIR" != "" ]
361 then
362 INC="$INC -I$INCDIR"
363 fi
364 fi
365 else
366 DEF="$DEF -DUSE_IDEA"
367 fi
368
369 LIBDIR=
370 INCDIR=
371 SRCDIR=zlib*
372 findlib libz.a
373 if [ "$found" = "" ]
374 then
375 readln "Continue anyway?" n
376 if [ "$ans" = "n" ]
377 then
378 echo "Please install zlib 1.1.4 or greater now."
379 exit 1
380 fi
381 else
382 ZLIB="$MAKELIB"
383 DEF="$DEF -DUSE_ZLIB"
384 LIBS="$LIBS $LIB"
385 LDFLAGS="$LDFLAGS $LDFLAG"
386 if [ "$INCDIR" != "" ]
387 then
388 INC="$INC -I$INCDIR"
389 fi
390 fi
391
392 LIBDIR=
393 INCDIR=
394 SRCDIR=pcre*
395 findlib libpcre.a
396 if [ "$found" != "" ]
397 then
398 PCRE="$MAKELIB"
399 DEF="$DEF -DUSE_PCRE"
400 LIBS="$LIBS $LIB"
401 LDFLAGS="$LDFLAGS $LDFLAG"
402 if [ "$INCDIR" != "" ]
403 then
404 INC="$INC -I$INCDIR"
405 fi
406 fi
407
408 opensslinfo="Please get OpenSSL 0.9.6f or greater from http://www.openssl.org/"
409 opensslwarning="WARNING: This version of OpenSSL contains known vulnerabilities. Please upgrade to OpenSSL 0.9.6f or greater!"
410 LIBDIR=/usr/local/ssl/lib
411 INCDIR="/usr/include /usr/include/ssl /usr/lib/ssl/include /usr/local/ssl/include"
412 SRCDIR="openssl*"
413
414 if [ "$system" = win32 ]
415 then
416 findlib libeay32.a
417 else
418 findlib libcrypto.a
419 fi
420 if [ "$found" = "" ]
421 then
422 echo $opensslinfo
423 exit 1
424 fi
425
426 LIBS="$LIBS $LIB"
427 LDFLAGS="$LDFLAGS $LDFLAG"
428 if [ "$MAKELIB" != "" ]
429 then
430 OPENSSL="$found/$lib:
431 cd $found/crypto; make"
432 fi
433 if [ -d "$INCDIR/openssl" ]
434 then
435 INC="$INC -I$INCDIR"
436 else
437 # detect old SSLeay versions
438 if [ -f "$INCDIR/crypto.h" ]
439 then
440 version=800
441 if grep OPENSSL "$INCDIR/crypto.h" > /dev/null
442 then
443 version=920
444 fi
445 fi
446 fi
447
448 # Find the OpenSSL version header
449 if [ -f $INCDIR/openssl/opensslv.h ]
450 then
451 version=`grep 'SSL.*_VERSION_NUMBER.*0x' $INCDIR/openssl/opensslv.h | sed 's/.*0x0*//;s/[ ].*//;s/L$//'`
452 elif [ -f $INCDIR/opensslv.h ]
453 then
454 version=`grep 'SSL.*_VERSION_NUMBER.*0x' $INCDIR/opensslv.h | sed 's/.*0x0*//;s/[ ].*//;s/L$//'`
455 fi
456 if [ "$version" = "" ]
457 then
458 echo "Warning: Can't find OpenSSL version number!"
459 readln "Continue anyway?" y
460 if [ "$ans" = "n" ]
461 then
462 echo $opensslinfo
463 exit 1
464 fi
465 elif [ "16#$version" = "16#90581f" ]
466 then
467 echo "Compiling with OpenSSL 0.9.5a."
468 echo $opensslwarning
469 elif [ "16#$version" = "16#90601f" ]
470 then
471 echo "Compiling with OpenSSL 0.9.6a."
472 echo $opensslwarning
473 elif [ "16#$version" = "16#90602f" ]
474 then
475 echo "Compiling with OpenSSL 0.9.6b."
476 echo $opensslwarning
477 elif [ "16#$version" = "16#90603f" ]
478 then
479 echo "Compiling with OpenSSL 0.9.6c."
480 echo $opensslwarning
481 elif [ "16#$version" = "16#90604f" ]
482 then
483 echo "Compiling with OpenSSL 0.9.6d."
484 echo $opensslwarning
485 elif [ "16#$version" = "16#90605f" ]
486 then
487 echo "Compiling with OpenSSL 0.9.6e."
488 echo $opensslwarning
489 elif [ "16#$version" = "16#90606f" ]
490 then
491 echo "Compiling with OpenSSL 0.9.6f."
492 elif [ "16#$version" = "16#90607f" ]
493 then
494 echo "Compiling with OpenSSL 0.9.6g."
495 elif [ "$version" -lt "920" ]
496 then
497 echo "This version: ${version} of SSLeay is not supported."
498 echo $opensslinfo
499 exit 1
500 elif [ "$version" -lt "903100" ]
501 then
502 echo "This version: ${version} of OpenSSL is not supported."
503 echo $opensslinfo
504 exit 1
505 elif [ "$version" -gt "906000" ]
506 then
507 echo "Warning: This version: ${version} of OpenSSL is untested."
508 readln "Continue anyway?" y
509 if [ "$ans" = "n" ]
510 then
511 echo $opensslinfo
512 exit 1
513 fi
514 fi
515
516 LIBDIR=
517 INCDIR=/usr/include/ncurses
518 SRCDIR=ncurses*
519 CONFIG=--enable-termcap
520 if [ "$TERMINFO" != "" ]
521 then
522 CONFIG="--datadir=$TERMINFO"
523 fi
524 if [ -d /usr/share/terminfo ]
525 then
526 CONFIG=
527 fi
528 if [ -d /usr/lib/terminfo ]
529 then
530 CONFIG=--datadir=/usr/lib/terminfo
531 fi
532
533 if [ `uname` = OpenBSD ]
534 then
535 findlib libcurses.a
536 else
537 findlib libncurses.a
538 fi
539 if [ "$found" = "" ]
540 then
541 if [ "$system" != win32 ]
542 then
543 readln "Do you want to use Mixmaster's menu-based user interface?" y
544 if [ "$ans" = "y" ]
545 then
546 echo "Please install ncurses now. It is available from
547 http://www.clark.net/pub/dickey/ncurses/ncurses.tar.gz"
548 exit 1
549 fi
550 fi
551 else
552 DEF="$DEF -DUSE_NCURSES"
553 if [ "$type" = system -o "$type" = installed ]
554 then
555 LIBS="$LIBS $LIB"
556 LDFLAGS="$LDFLAGS $LDFLAG"
557 else
558 LIBS="$LIBS $found/lib/$lib"
559 NCURSES="$found/lib/$lib:
560 cd $found/ncurses; make ../lib/$lib"
561 fi
562 if [ "$INCDIR" != "" ]
563 then
564 INC="$INC -I$INCDIR"
565 elif [ -f "/usr/include/ncurses.h" ]
566 then
567 DEF="$DEF -DHAVE_NCURSES_H"
568 fi
569 fi
570
571 # if [ "$MIXDEST" = "$HOME/Mix" ]
572 # then
573 # SPOOL=
574 # else
575 SPOOL=-DSPOOL=\'\"$MIXDEST\"\'
576 # fi
577
578 echo "Generating Makefile."
579 echo "#Makefile generated on $HOSTNAME `date`" >Makefile
580 sed -e "s#%MIXDIR#$SPOOL#" \
581 -e "s#%LIBS#$LIBS#" \
582 -e "s#%LDFLAGS#$LDFLAGS#" \
583 -e "s#%INC#$INC#" \
584 -e "s#%DEF#$DEF#" < Makefile.in >> Makefile
585 echo "$ZLIB" >>Makefile
586 echo "$PCRE" >>Makefile
587 echo "$IDEALIB" >>Makefile
588 echo "$NCURSES" >>Makefile
589 echo "$OPENSSL" >>Makefile
590 fi
591
592 ans=""
593 if [ "$remailer" = "y" ]
594 then
595 echo "Please enter a pass phrase for your remailer (must be the same
596 whenever you re-compile Mixmaster)."
597 read ans
598 fi
599
600 if [ "$ans" != "" ]
601 then
602 PASS="PASS=$ans"
603 fi
604
605 echo "Compiling. Please wait."
606 whereis gmake make
607 make=$found
608
609 if [ "$system" = win32 ]
610 then
611 (cd zlib*; make libz.a)
612 (cd pcre*; make libpcre.a)
613 if [ "$PASS" != "" ]
614 then
615 $make "$PASS" dllmix
616 else
617 $make dllmix
618 fi
619 else
620 if [ "$PASS" != "" ]
621 then
622 $make "$PASS"
623 else
624 $make
625 fi
626 fi
627
628 if [ -x mix ]
629 then
630 echo
631 else
632 echo "Error: The compilation failed. Please consult the documentation (section
633 \`Installation problems')."
634 readln "Remove the old Makefile?" y
635 if [ "$ans" = y ]
636 then
637 rm -f Makefile
638 fi
639 exit 1
640 fi
641
642 if [ -f $MIXDEST/mixmaster.conf -a ! -f $MIXDEST/mix.cfg ]
643 then
644 export MIXDEST
645 export MIXDIR
646 export MIXSRC
647 ${MIXDIR}/upgrade
648 exit 0
649 fi
650
651 if [ -f mix.exe ]
652 then
653 cp mix.exe $MIXDEST
654 else
655 cp mix $MIXDEST
656 fi
657
658 cd $MIXCFG
659 for i in mlist.txt pubring.mix rlist.txt pubring.asc type2.list
660 do
661 if [ ! -f $MIXDEST/$i ]
662 then
663 cp $i $MIXDEST
664 fi
665 done
666
667 if [ "$remailer" = "y" ]
668 then
669 cd $MIXCFG
670 for i in adminkey.txt dest.alw
671 do
672 if [ ! -f $MIXDEST/$i ]
673 then
674 cp $i $MIXDEST
675 fi
676 done
677 fi
678
679 if [ "$remailer" = "n" ]
680 then
681 if [ ! -f $MIXDEST/mix.cfg ]
682 then
683 whereis sendmail /usr/lib/sendmail /usr/sbin/sendmail
684 echo "SENDMAIL $found -t" >$MIXDEST/mix.cfg
685 cat mix.cfg >>$MIXDEST/mix.cfg
686 fi
687 echo "Client installation complete."
688 exit
689 fi
690
691 for i in *.blk
692 do
693 if [ ! -f $MIXDEST/$i ]
694 then
695 cp $i $MIXDEST
696 fi
697 done
698
699 cd $MIXDEST
700
701 installed=n
702 if [ -f mix.cfg ]
703 then
704 if grep REMAILERADDR mix.cfg >/dev/null
705 then
706 installed=y
707 fi
708 fi
709
710 if [ "$installed" = "n" ]
711 then
712 Date=`date`
713 whereis sendmail /usr/lib/sendmail /usr/sbin/sendmail
714 sendmail=$found
715
716 echo "Mixmaster can be installed in the low-maintenance \`middleman' mode.
717 In that mode, it will send mail to other remailers only, to avoid
718 complaints about anonymous messages."
719 readln "Install as middleman?" n
720 middle=$ans
721
722 readln "The e-mail address of your remailer:" `whoami`@$HOSTNAME
723 RMA=$ans
724
725 echo "Do you want Mixmaster to send auto-replies to messages it does not
726 understand (If the address <$RMA> is also used"
727 readln "for mail to be read by a human, type \`n')?" y
728 autoreply=$ans
729
730 if [ "$middle" = n ]
731 then
732 readln "An address to appear in the \`From:' line of anonymous messages:" `echo $RMA | sed 's/.*@/nobody@/'`
733 RAA=$ans
734
735 readln "Address for complaints to be sent to:" `echo $RMA | sed 's/.*@/abuse@/'`
736 CA=$ans
737 else
738 RAA=$RMA
739 CA=$RMA
740 fi
741
742 echo "Choose a name for your remailer. It will appear in remailer status messages."
743 readln "Long name:" "Anonymous Remailer"
744 RMN=$ans
745
746 if [ "$middle" = n ]
747 then
748 echo "Choose a name to be used in the \`From:' line of remailed messages."
749 readln "Anon long name:" "Anonymous"
750 RAN=$ans
751 fi
752
753 readln "A short name to appear in lists:" `echo $HOSTNAME|sed 's/\..*//'`
754 SN=$ans
755
756 readln "Accept Mixmaster (Type II) messages?" y
757 mix=$ans
758
759 readln "Accept PGP (Type I) remailer messages?" n
760 pgp=$ans
761
762 unencrypted=n
763 if [ "$pgp" = "y" ]
764 then
765 readln "Accept unencrypted remailer messages?" n
766 unencrypted=$ans
767 fi
768
769 echo "Mixmaster will log error messages and warnings. Do you want to log"
770 readln "informational messages about normal operation as well?" y
771 if [ "$ans" = y ]
772 then
773 verbose=2
774 else
775 verbose=1
776 fi
777
778 readln "Filter binary attachments?" n
779 binfilter=$ans
780
781 if [ "$middle" = n ]
782 then
783 if [ "$autoreply" = y ]
784 then
785 readln "Allow users to add themselves to the list of blocked addresses?" y
786 autoblock=$ans
787 fi
788
789 echo "Do you want to allow posting? Newsgroups can be restricted in dest.blk.
790 y)es, post locally; use m)ail-to-news gateway; n)o."
791 readln "Allow posting to Usenet?" m
792 post="$ans"
793 if [ "$ans" = y ]
794 then
795 whereis inews /usr/lib/news/inews
796 readln "News posting software:" "$found -h"
797 news=$ans
798 readln "Organization line for anonymous Usenet posts:" "Anonymous Posting Service"
799 orga=$ans
800 readln "Use anti-spam message IDs?" y
801 mid=$ans
802 elif [ "$ans" = m ]
803 then
804 readln "Mail-to-news gateway:" mail2news@nym.alias.net
805 news=$ans
806 fi
807 fi
808
809 echo "How many messages do you want to keep in the reordering pool?
810 A larger pool is more secure, but also causes higher latency.
811 0 means to remail immediately."
812 readln "Pool size:" 20
813 poolsize=$ans
814
815 mbox=
816 if [ -f ~/.forward ]
817 then
818 mbox=`head -1 ~/.forward | sed 's/^"//;s/"$//'`
819 if echo "$mbox" | grep 'mix' >/dev/null 2>/dev/null
820 then
821 mbox=
822 elif echo "$mbox" | grep 'procmail' >/dev/null 2>/dev/null
823 then
824 if grep mix ~/.procmailrc >/dev/null 2>/dev/null
825 then
826 mbox=
827 fi
828 fi
829 fi
830
831 if [ "$mbox" = "" ]
832 then
833 mbox=${MAIL:-/usr/spool/mail/$NAME}
834 touch "$mbox"
835 if [ ! -w "$mbox" ]
836 then
837 echo "$mbox is not writeable."
838 readln "Mailbox for non-remailer messages:" ${MIXDEST}/mbox
839 mbox=$ans
840 fi
841 fi
842
843 cat <<END >mix.cfg
844 # mix.cfg -- installed $Date
845 SENDMAIL $sendmail -t
846
847 # Where to store non-remailer messages:
848 MAILBOX $mbox
849 #MAILABUSE mbox.abuse
850 #MAILBLOCK mbox.block
851 #MAILUSAGE mbox.usage
852 #MAILANON mbox.anon
853 #MAILERROR mbox.error
854 #MAILBOUNCE mbox.bounce
855
856 REMAIL y
857 MIDDLEMAN $middle
858
859 BINFILTER $binfilter
860 AUTOBLOCK $autoblock
861
862 ERRLOG error.log
863 VERBOSE $verbose
864
865 # Remailer name and addresses
866 REMAILERADDR $RMA
867 ANONADDR $RAA
868 COMPLAINTS $CA
869
870 SHORTNAME $SN
871 REMAILERNAME $RMN
872 ANONNAME $RAN
873
874 # Supported formats:
875 MIX $mix
876 PGP $pgp
877 UNENCRYPTED $unencrypted
878
879 # Maximum message size in kB (0 for no limit):
880 SIZELIMIT 0
881
882 # Usenet news:
883 NEWS $news
884 ORGANIZATION $orga
885 MID $mid
886
887 # Remailing strategy:
888 SENDPOOLTIME 0h
889 POOLSIZE $poolsize
890 RATE 100
891
892 IDEXP 7d
893 PACKETEXP 7d
894
895 END
896 fi
897
898 REPLACE="s/%RMN/$RMN/g;s/%RMA/$RMA/g;s/%CA/$CA/g;s/%RAA/$RAA/g"
899 if [ "$installed" = "n" ]
900 then
901 cd $MIXCFG
902 if [ ! -f $MIXDEST/help.txt ]
903 then
904 sed "$REPLACE" < intro.hlp >$MIXDEST/help.txt
905 if [ "$mix" = y ]
906 then
907 sed "$REPLACE" < mix.hlp >>$MIXDEST/help.txt
908 fi
909 if [ "$unencrypted" = y ]
910 then
911 sed "$REPLACE" < type1.hlp >>$MIXDEST/help.txt
912 if [ "$pgp" = y ]
913 then
914 sed "$REPLACE" < pgp.hlp >>$MIXDEST/help.txt
915 fi
916 elif [ "$pgp" = y ]
917 then
918 sed "$REPLACE" < pgponly.hlp >>$MIXDEST/help.txt
919 fi
920 if [ "$post" = y ]
921 then
922 if [ "$pgp" = y -o "$unencrypted" = y ]
923 then
924 sed "$REPLACE" < news.hlp >>$MIXDEST/help.txt
925 fi
926 fi
927 sed "$REPLACE" < end.hlp >>$MIXDEST/help.txt
928 fi
929
930 for i in *.txt.in
931 do
932 j=`echo $i | sed 's/\.in$//'`
933 if [ ! -f $MIXDEST/$j ]
934 then
935 sed "$REPLACE" < $i >$MIXDEST/$j
936 fi
937 done
938 cd $MIXDEST
939 fi
940
941 echo
942 if [ ! -f secring.mix ]
943 then
944 echo "Generating secret keys. This may take a while..."
945 else
946 echo "Updating secret keys..."
947 fi
948 ./mix -K
949 if [ -f key.txt ]
950 then
951 echo "Done."
952 echo
953 else
954 echo "Installation failed. Please consult the Mixmaster documentation."
955 exit 1
956 fi
957
958 if [ "$system" = msdos -o "$system" = win32 ]
959 then
960 exit
961 fi
962
963 umask 033
964
965 # Set .forward?
966 set=y
967
968 if grep procmail ~/.forward >/dev/null 2>/dev/null
969 then
970 if grep mix ~/.procmailrc >/dev/null 2>/dev/null
971 then
972 echo "Mixmaster is installed in your .procmailrc file."
973 set=n
974 fi
975 fi
976
977 if [ "$set" = y -a -f ~/.forward ]
978 then
979 echo "Your current .forward is:"
980 cat ~/.forward
981 echo
982 if grep mix ~/.forward >/dev/null 2>/dev/null
983 then
984 echo "Mixmaster already is installed in your .forward file."
985 set=n
986 elif [ "$mbox" != "" ]
987 then
988 if echo "$mbox" | grep '|' >/dev/null 2>/dev/null
989 then
990 echo "Mixmaster will pipe messages to $mbox"
991 elif echo $mbox | grep '@' >/dev/null 2>/dev/null
992 then
993 echo "Mixmaster will forward messages to $mbox"
994 else
995 echo "Mixmaster will store messages to $mbox"
996 fi
997 fi
998 fi
999
1000 if [ "$set" = y ]
1001 then
1002 echo "Set .forward to the following line:"
1003 echo "\"|${MIXDEST}/mix -RM\""
1004 if [ -f ~/.forward ]
1005 then
1006 readln "Overwrite now?" n
1007 else
1008 readln "Do that now?" n
1009 fi
1010 if [ "$ans" = "y" ]
1011 then
1012 echo "\"|${MIXDEST}/mix -RM\"" >~/.forward
1013 fi
1014 fi
1015
1016 if [ "$RMA" != "" ]
1017 then
1018 echo "
1019 Mixmaster will send the following files as auto-replies:
1020 Mail to <$RMA> with Subject: remailer-help => help.txt"
1021 echo "Mail to <$RMA> with Subject: remailer-adminkey => adminkey.txt
1022 Remember to add your Remailer Admin public PGP key to the adminkey.txt file."
1023 if [ "$autoblock" = y ]
1024 then
1025 echo "Mail to <$RMA> with line DESTINATION-BLOCK => blocked.txt"
1026 fi
1027 if [ "$autoreply" = y ]
1028 then
1029 echo "Other mail to <$RMA> => usage.txt"
1030 echo
1031 if [ "$CA" != "$RMA" ]
1032 then
1033 echo "If you arrange for mail to <$CA> and <$RAA>
1034 to be forwarded to <$RMA>:
1035 Mail to <$CA> => abuse.txt
1036 Mail to <$RAA> => reply.txt"
1037 fi
1038 fi
1039 fi
1040
1041 echo
1042 echo "Mixmaster installation complete."
1043

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5