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

Contents of /trunk/Mix/Install

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download)
Wed Oct 31 08:19:51 2001 UTC (11 years, 6 months ago) by rabbi
File size: 17879 byte(s)
Initial revision
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.1 2001/10/31 08:19:52 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 LIBDIR=
346 INCDIR=
347 SRCDIR=zlib*
348 findlib libz.a
349 if [ "$found" = "" ]
350 then
351 readln "Continue anyway?" n
352 if [ "$ans" = "n" ]
353 then
354 echo "Please install zlib now."
355 exit 1
356 fi
357 else
358 ZLIB="$MAKELIB"
359 DEF="$DEF -DUSE_ZLIB"
360 LIBS="$LIBS $LIB"
361 LDFLAGS="$LDFLAGS $LDFLAG"
362 if [ "$INCDIR" != "" ]
363 then
364 INC="$INC -I$INCDIR"
365 fi
366 fi
367
368 LIBDIR=
369 INCDIR=
370 SRCDIR=pcre*
371 findlib libpcre.a
372 if [ "$found" != "" ]
373 then
374 PCRE="$MAKELIB"
375 DEF="$DEF -DUSE_PCRE"
376 LIBS="$LIBS $LIB"
377 LDFLAGS="$LDFLAGS $LDFLAG"
378 if [ "$INCDIR" != "" ]
379 then
380 INC="$INC -I$INCDIR"
381 fi
382 fi
383
384 opensslinfo="Please get OpenSSL 0.9.4 from http://www.openssl.org/"
385 LIBDIR=/usr/local/ssl/lib
386 INCDIR="/usr/include /usr/include/ssl /usr/lib/ssl/include /usr/local/ssl/include"
387 SRCDIR="openssl*"
388
389 if [ "$system" = win32 ]
390 then
391 findlib libeay32.a
392 else
393 findlib libcrypto.a
394 fi
395 if [ "$found" = "" ]
396 then
397 echo $opensslinfo
398 exit 1
399 fi
400
401 LIBS="$LIBS $LIB"
402 LDFLAGS="$LDFLAGS $LDFLAG"
403 if [ "$MAKELIB" != "" ]
404 then
405 OPENSSL="$found/$lib:
406 cd $found/crypto; make"
407 fi
408 if [ -d "$INCDIR/openssl" ]
409 then
410 INC="$INC -I$INCDIR"
411 else
412 # detect old SSLeay versions
413 if [ -f "$INCDIR/crypto.h" ]
414 then
415 version=800
416 if grep OPENSSL "$INCDIR/crypto.h" > /dev/null
417 then
418 version=920
419 fi
420 fi
421 fi
422
423 # Find the OpenSSL version header
424 if [ -f $INCDIR/openssl/opensslv.h ]
425 then
426 version=`grep 'SSL.*_VERSION_NUMBER.*0x' $INCDIR/openssl/opensslv.h | sed 's/.*0x0*//;s/[ ].*//;s/L$//'`
427 fi
428 if [ "$version" = "" ]
429 then
430 echo "Warning: Can't find OpenSSL version number!"
431 readln "Continue anyway?" y
432 if [ "$ans" = "n" ]
433 then
434 echo $opensslinfo
435 exit 1
436 fi
437 elif [ "$version" -lt "920" ]
438 then
439 echo "This version of SSLeay is not supported."
440 echo $opensslinfo
441 exit 1
442 elif [ "$version" -lt "903100" ]
443 then
444 echo "This version of OpenSSL is not supported."
445 echo $opensslinfo
446 exit 1
447 elif [ "$version" -gt "906000" ]
448 then
449 echo "Warning: This version of OpenSSL is untested."
450 readln "Continue anyway?" y
451 if [ "$ans" = "n" ]
452 then
453 echo $opensslinfo
454 exit 1
455 fi
456 fi
457
458 LIBDIR=
459 INCDIR=/usr/include/ncurses
460 SRCDIR=ncurses*
461 CONFIG=--enable-termcap
462 if [ "$TERMINFO" != "" ]
463 then
464 CONFIG="--datadir=$TERMINFO"
465 fi
466 if [ -d /usr/share/terminfo ]
467 then
468 CONFIG=
469 fi
470 if [ -d /usr/lib/terminfo ]
471 then
472 CONFIG=--datadir=/usr/lib/terminfo
473 fi
474
475 if [ `uname` = OpenBSD ]
476 then
477 findlib libcurses.a
478 else
479 findlib libncurses.a
480 fi
481 if [ "$found" = "" ]
482 then
483 if [ "$system" != win32 ]
484 then
485 readln "Do you want to use Mixmaster's menu-based user interface?" y
486 if [ "$ans" = "y" ]
487 then
488 echo "Please install ncurses now. It is available from
489 http://www.clark.net/pub/dickey/ncurses/ncurses.tar.gz"
490 exit 1
491 fi
492 fi
493 else
494 DEF="$DEF -DUSE_NCURSES"
495 if [ "$type" = system -o "$type" = installed ]
496 then
497 LIBS="$LIBS $LIB"
498 LDFLAGS="$LDFLAGS $LDFLAG"
499 else
500 LIBS="$LIBS $found/lib/$lib"
501 NCURSES="$found/lib/$lib:
502 cd $found/ncurses; make ../lib/$lib"
503 fi
504 if [ "$INCDIR" != "" ]
505 then
506 INC="$INC -I$INCDIR"
507 elif [ -f "/usr/include/ncurses.h" ]
508 then
509 DEF="$DEF -DHAVE_NCURSES_H"
510 fi
511 fi
512
513 # if [ "$MIXDEST" = "$HOME/Mix" ]
514 # then
515 # SPOOL=
516 # else
517 SPOOL=-DSPOOL=\'\"$MIXDEST\"\'
518 # fi
519
520 echo "Generating Makefile."
521 echo "#Makefile generated on $HOSTNAME `date`" >Makefile
522 sed -e "s#%MIXDIR#$SPOOL#" \
523 -e "s#%LIBS#$LIBS#" \
524 -e "s#%LDFLAGS#$LDFLAGS#" \
525 -e "s#%INC#$INC#" \
526 -e "s#%DEF#$DEF#" < Makefile.in >> Makefile
527 echo "$ZLIB" >>Makefile
528 echo "$PCRE" >>Makefile
529 echo "$NCURSES" >>Makefile
530 echo "$OPENSSL" >>Makefile
531 fi
532
533 ans=""
534 if [ "$remailer" = "y" ]
535 then
536 echo "Please enter a pass phrase for your remailer (must be the same
537 whenever you re-compile Mixmaster)."
538 read ans
539 fi
540
541 if [ "$ans" != "" ]
542 then
543 PASS="PASS=$ans"
544 fi
545
546 echo "Compiling. Please wait."
547 whereis gmake make
548 make=$found
549
550 if [ "$system" = win32 ]
551 then
552 (cd zlib*; make libz.a)
553 (cd pcre*; make libpcre.a)
554 if [ "$PASS" != "" ]
555 then
556 $make "$PASS" dllmix
557 else
558 $make dllmix
559 fi
560 else
561 if [ "$PASS" != "" ]
562 then
563 $make "$PASS"
564 else
565 $make
566 fi
567 fi
568
569 if [ -x mix ]
570 then
571 echo
572 else
573 echo "Error: The compilation failed. Please consult the documentation (section
574 \`Installation problems')."
575 readln "Remove the old Makefile?" y
576 if [ "$ans" = y ]
577 then
578 rm -f Makefile
579 fi
580 exit 1
581 fi
582
583 if [ -f $MIXDEST/mixmaster.conf -a ! -f $MIXDEST/mix.cfg ]
584 then
585 export MIXDEST
586 export MIXDIR
587 export MIXSRC
588 ${MIXDIR}/upgrade
589 exit 0
590 fi
591
592 if [ -f mix.exe ]
593 then
594 cp mix.exe $MIXDEST
595 else
596 cp mix $MIXDEST
597 fi
598
599 cd $MIXCFG
600 for i in mlist.txt pubring.mix rlist.txt pubring.asc type2.list
601 do
602 if [ ! -f $MIXDEST/$i ]
603 then
604 cp $i $MIXDEST
605 fi
606 done
607
608 if [ "$remailer" = "y" ]
609 then
610 cd $MIXCFG
611 for i in adminkey.txt dest.alw
612 do
613 if [ ! -f $MIXDEST/$i ]
614 then
615 cp $i $MIXDEST
616 fi
617 done
618 fi
619
620 if [ "$remailer" = "n" ]
621 then
622 if [ ! -f $MIXDEST/mix.cfg ]
623 then
624 whereis sendmail /usr/lib/sendmail /usr/sbin/sendmail
625 echo "SENDMAIL $found -t" >$MIXDEST/mix.cfg
626 cat mix.cfg >>$MIXDEST/mix.cfg
627 fi
628 echo "Client installation complete."
629 exit
630 fi
631
632 for i in *.blk
633 do
634 if [ ! -f $MIXDEST/$i ]
635 then
636 cp $i $MIXDEST
637 fi
638 done
639
640 cd $MIXDEST
641
642 installed=n
643 if [ -f mix.cfg ]
644 then
645 if grep REMAILERADDR mix.cfg >/dev/null
646 then
647 installed=y
648 fi
649 fi
650
651 if [ "$installed" = "n" ]
652 then
653 Date=`date`
654 whereis sendmail /usr/lib/sendmail /usr/sbin/sendmail
655 sendmail=$found
656
657 echo "Mixmaster can be installed in the low-maintenance \`middleman' mode.
658 In that mode, it will send mail to other remailers only, to avoid
659 complaints about anonymous messages."
660 readln "Install as middleman?" n
661 middle=$ans
662
663 readln "The e-mail address of your remailer:" `whoami`@$HOSTNAME
664 RMA=$ans
665
666 echo "Do you want Mixmaster to send auto-replies to messages it does not
667 understand (If the address <$RMA> is also used"
668 readln "for mail to be read by a human, type \`n')?" y
669 autoreply=$ans
670
671 if [ "$middle" = n ]
672 then
673 readln "An address to appear in the \`From:' line of anonymous messages:" `echo $RMA | sed 's/.*@/nobody@/'`
674 RAA=$ans
675
676 readln "Address for complaints to be sent to:" `echo $RMA | sed 's/.*@/abuse@/'`
677 CA=$ans
678 else
679 RAA=$RMA
680 CA=$RMA
681 fi
682
683 echo "Choose a name for your remailer. It will appear in remailer status messages."
684 readln "Long name:" "Anonymous Remailer"
685 RMN=$ans
686
687 if [ "$middle" = n ]
688 then
689 echo "Choose a name to be used in the \`From:' line of remailed messages."
690 readln "Anon long name:" "Anonymous"
691 RAN=$ans
692 fi
693
694 readln "A short name to appear in lists:" `echo $HOSTNAME|sed 's/\..*//'`
695 SN=$ans
696
697 readln "Accept Mixmaster (Type II) messages?" y
698 mix=$ans
699
700 readln "Accept PGP (Type I) remailer messages?" y
701 pgp=$ans
702
703 unencrypted=n
704 if [ "$pgp" = "y" ]
705 then
706 readln "Accept unencrypted remailer messages?" n
707 unencrypted=$ans
708 fi
709
710 echo "Mixmaster will log error messages and warnings. Do you want to log"
711 readln "informational messages about normal operation as well?" y
712 if [ "$ans" = y ]
713 then
714 verbose=2
715 else
716 verbose=1
717 fi
718
719 readln "Filter binary attachments?" n
720 binfilter=$ans
721
722 if [ "$middle" = n ]
723 then
724 if [ "$autoreply" = y ]
725 then
726 readln "Allow users to add themselves to the list of blocked addresses?" y
727 autoblock=$ans
728 fi
729
730 echo "Do you want to allow posting? Newsgroups can be restricted in dest.blk.
731 y)es, post locally; use m)ail-to-news gateway; n)o."
732 readln "Allow posting to Usenet?" m
733 post="$ans"
734 if [ "$ans" = y ]
735 then
736 whereis inews /usr/lib/news/inews
737 readln "News posting software:" "$found -h"
738 news=$ans
739 readln "Organization line for anonymous Usenet posts:" "Anonymous Posting Service"
740 orga=$ans
741 readln "Use anti-spam message IDs?" y
742 mid=$ans
743 elif [ "$ans" = m ]
744 then
745 readln "Mail-to-news gateway:" mail2news@nym.alias.net
746 news=$ans
747 fi
748 fi
749
750 echo "How many messages do you want to keep in the reordering pool?
751 A larger pool is more secure, but also causes higher latency.
752 0 means to remail immediately."
753 readln "Pool size:" 20
754 poolsize=$ans
755
756 mbox=
757 if [ -f ~/.forward ]
758 then
759 mbox=`head -1 ~/.forward | sed 's/^"//;s/"$//'`
760 if echo "$mbox" | grep 'mix' >/dev/null 2>/dev/null
761 then
762 mbox=
763 elif echo "$mbox" | grep 'procmail' >/dev/null 2>/dev/null
764 then
765 if grep mix ~/.procmailrc >/dev/null 2>/dev/null
766 then
767 mbox=
768 fi
769 fi
770 fi
771
772 if [ "$mbox" = "" ]
773 then
774 mbox=${MAIL:-/usr/spool/mail/$NAME}
775 touch "$mbox"
776 if [ ! -w "$mbox" ]
777 then
778 echo "$mbox is not writeable."
779 readln "Mailbox for non-remailer messages:" ${MIXDEST}/mbox
780 mbox=$ans
781 fi
782 fi
783
784 cat <<END >mix.cfg
785 # mix.cfg -- installed $Date
786 SENDMAIL $sendmail -t
787
788 # Where to store non-remailer messages:
789 MAILBOX $mbox
790 #MAILABUSE mbox.abuse
791 #MAILBLOCK mbox.block
792 #MAILUSAGE mbox.usage
793 #MAILANON mbox.anon
794 #MAILERROR mbox.error
795 #MAILBOUNCE mbox.bounce
796
797 REMAIL y
798 MIDDLEMAN $middle
799
800 BINFILTER $binfilter
801 AUTOBLOCK $autoblock
802
803 ERRLOG errlog
804 VERBOSE $verbose
805
806 # Remailer name and addresses
807 REMAILERADDR $RMA
808 ANONADDR $RAA
809 COMPLAINTS $CA
810
811 SHORTNAME $SN
812 REMAILERNAME $RMN
813 ANONNAME $RAN
814
815 # Supported formats:
816 MIX $mix
817 PGP $pgp
818 UNENCRYPTED $unencrypted
819
820 # Maximum message size in kB (0 for no limit):
821 SIZELIMIT 0
822
823 # Usenet news:
824 NEWS $news
825 ORGANIZATION $orga
826 MID $mid
827
828 # Remailing strategy:
829 SENDPOOLTIME 0h
830 POOLSIZE $poolsize
831 RATE 100
832
833 IDEXP 7d
834 PACKETEXP 7d
835
836 END
837 fi
838
839 REPLACE="s/%RMN/$RMN/g;s/%RMA/$RMA/g;s/%CA/$CA/g;s/%RAA/$RAA/g"
840 if [ "$installed" = "n" ]
841 then
842 cd $MIXCFG
843 if [ ! -f $MIXDEST/help.txt ]
844 then
845 sed "$REPLACE" < intro.hlp >$MIXDEST/help.txt
846 if [ "$mix" = y ]
847 then
848 sed "$REPLACE" < mix.hlp >>$MIXDEST/help.txt
849 fi
850 if [ "$unencrypted" = y ]
851 then
852 sed "$REPLACE" < type1.hlp >>$MIXDEST/help.txt
853 if [ "$pgp" = y ]
854 then
855 sed "$REPLACE" < pgp.hlp >>$MIXDEST/help.txt
856 fi
857 elif [ "$pgp" = y ]
858 then
859 sed "$REPLACE" < pgponly.hlp >>$MIXDEST/help.txt
860 fi
861 if [ "$post" = y ]
862 then
863 if [ "$pgp" = y -o "$unencrypted" = y ]
864 then
865 sed "$REPLACE" < news.hlp >>$MIXDEST/help.txt
866 fi
867 fi
868 sed "$REPLACE" < end.hlp >>$MIXDEST/help.txt
869 fi
870
871 for i in *.txt.in
872 do
873 j=`echo $i | sed 's/\.in$//'`
874 if [ ! -f $MIXDEST/$j ]
875 then
876 sed "$REPLACE" < $i >$MIXDEST/$j
877 fi
878 done
879 cd $MIXDEST
880 fi
881
882 echo
883 if [ ! -f secring.mix ]
884 then
885 echo "Generating secret keys. This may take a while..."
886 else
887 echo "Updating secret keys..."
888 fi
889 ./mix -K
890 if [ -f key.txt ]
891 then
892 echo "Done."
893 echo
894 else
895 echo "Installation failed. Please consult the Mixmaster documentation."
896 exit 1
897 fi
898
899 if [ "$system" = msdos -o "$system" = win32 ]
900 then
901 exit
902 fi
903
904 umask 033
905
906 # Set .forward?
907 set=y
908
909 if grep procmail ~/.forward >/dev/null 2>/dev/null
910 then
911 if grep mix ~/.procmailrc >/dev/null 2>/dev/null
912 then
913 echo "Mixmaster is installed in your .procmailrc file."
914 set=n
915 fi
916 fi
917
918 if [ "$set" = y -a -f ~/.forward ]
919 then
920 echo "Your current .forward is:"
921 cat ~/.forward
922 echo
923 if grep mix ~/.forward >/dev/null 2>/dev/null
924 then
925 echo "Mixmaster already is installed in your .forward file."
926 set=n
927 elif [ "$mbox" != "" ]
928 then
929 if echo "$mbox" | grep '|' >/dev/null 2>/dev/null
930 then
931 echo "Mixmaster will pipe messages to $mbox"
932 elif echo $mbox | grep '@' >/dev/null 2>/dev/null
933 then
934 echo "Mixmaster will forward messages to $mbox"
935 else
936 echo "Mixmaster will store messages to $mbox"
937 fi
938 fi
939 fi
940
941 if [ "$set" = y ]
942 then
943 echo "Set .forward to the following line:"
944 echo "\"|${MIXDEST}/mix -RM\""
945 if [ -f ~/.forward ]
946 then
947 readln "Overwrite now?" n
948 else
949 readln "Do that now?" y
950 fi
951 if [ "$ans" = "y" ]
952 then
953 echo "\"|${MIXDEST}/mix -RM\"" >~/.forward
954 fi
955 fi
956
957 if [ "$RMA" != "" ]
958 then
959 echo "
960 Mixmaster will send the following files as auto-replies:
961 Mail to <$RMA> with Subject: remailer-help => help.txt"
962 echo "Mail to <$RMA> with Subject: remailer-adminkey => adminkey.txt
963 Remember to add your Remailer Admin public PGP key to the adminkey.txt file."
964 if [ "$autoblock" = y ]
965 then
966 echo "Mail to <$RMA> with line DESTINATION-BLOCK => blocked.txt"
967 fi
968 if [ "$autoreply" = y ]
969 then
970 echo "Other mail to <$RMA> => usage.txt"
971 echo
972 if [ "$CA" != "$RMA" ]
973 then
974 echo "If you arrange for mail to <$CA> and <$RAA>
975 to be forwarded to <$RMA>:
976 Mail to <$CA> => abuse.txt
977 Mail to <$RAA> => reply.txt"
978 fi
979 fi
980 fi
981
982 echo
983 echo "Mixmaster installation complete."
984

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5