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

Contents of /trunk/Mix/Install

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8 - (hide annotations) (download)
Fri Nov 2 21:48:21 2001 UTC (11 years, 6 months ago) by rabbi
File size: 18302 byte(s)
Make Mix 2.9beta31 work on OpenBSD:
OpenBSD has no /usr/include/ssl/openssl, just /usr/include/ssl.
OpenBSD SSL has no patented algorithm IDEA.  Use other libidea.a.

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

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5