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

Contents of /trunk/Mix/Install

Parent Directory Parent Directory | Revision Log Revision Log


Revision 93 - (hide annotations) (download)
Thu Jul 11 02:39:33 2002 UTC (10 years, 10 months ago) by rabbi
File size: 18782 byte(s)
Modified the Install script to properly locate opensslv.h. It now checks
in both $INCDIR/openssl and $INCDIR/ for the file.

Also, I reverted back to the version checking that was done in 2.9beta23,
and added special case exceptions for the four OpenSSL versions with
alphanumeric designations prior to the main version check, since Bourne
shell cannot handle multiple bases and bash is not universal.

Also,I modifed the "upgrade" script for clarity, and changed the default
from "y" to "n" for activating Type I remailers on installation.

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

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5