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

Contents of /trunk/Mix/Install

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5