# Copyright (c) 1995-1999 Hannah Schroeter # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer, # either in a separate file included with the distribution, or # copied into the source files. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND HIS CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR HIS CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. CC=@CC@ CFLAGS=@CFLAGS@ install=@INSTALL@ queuedir=@QUEUEDIR@ #oldsendmail=@OLDSENDMAIL@ # not used anymore installmailer=@INSTALLMAILER@ mailerversion=@MAILERVERSION@ bingrp = @BINGRP@ binusr = @BINUSR@ privbin = @PRIVBINDIR@ pubbin = @PUBBINDIR@ mailerdir = @MAILERDIR@ rcsmtpalias = cbsmtp crsmtp rgsmtp rsmtpalias = bsmtp transmitters = c-cbsmtp c-rcsmtp g-rcsmtp g-rgsmtp n-rsmtp conffiles = batcher bsmtp.c bsmtp.m4.8.6 bsmtp.m4.8.7 rcsmtp rsmtp \ transmitter.c-cbsmtp transmitter.c-rcsmtp transmitter.g-rcsmtp \ transmitter.g-rgsmtp transmitter.n-rsmtp rsmtp.wrapper.c bqueue _bqueue.c \ batcher.c bsmtp.m4.8.8 contrib/andyr/deliver.pl bsmtp.m4.8.9 queueowner=@DAEMONUSER@ queuegid=@DAEMONGID@ perl=@PERL@ lockdefine=@LOCKDEFINE@ batcher=@BATCHER@ all: bsmtp rsmtp.wrapper _bqueue $(batcher) reallyall: bsmtp rsmtp.wrapper _bqueue batcher batcher.new # This should not happen, but just to be sure. batcher: batcher.in touch batcher bsmtp: bsmtp.c $(CC) $(CFLAGS) $(lockdefine) -o bsmtp bsmtp.c batcher.new: batcher.c $(CC) $(CFLAGS) $(lockdefine) -o batcher.new batcher.c rsmtp.wrapper: rsmtp.wrapper.c $(CC) $(CFLAGS) -o rsmtp.wrapper rsmtp.wrapper.c _bqueue: _bqueue.c $(CC) $(CFLAGS) -o _bqueue _bqueue.c # Note hack for install programs that insist on a directory as # last argument, and thus don't support on the fly renaming # of installed files. This is needed, because we install either # batcher or batcher.new as $(privbin)/batcher install: all @if [ ! -d $(pubbin) ]; then \ echo Making $(pubbin) ; \ set -x ; \ mkdir -p $(pubbin) || mkdir $(pubbin) || exit 0 ; \ chown $(binusr) $(pubbin) ; \ chgrp $(bingrp) $(pubbin) ; \ chmod 755 $(pubbin) ; \ fi @if [ ! -d $(privbin) ]; then \ echo Making $(privbin) ; \ set -x ; \ mkdir -p $(privbin) || mkdir $(privbin) || exit 0 ; \ chown $(binusr) $(privbin) ; \ chgrp $(bingrp) $(privbin) ; \ chmod 755 $(privbin) ; \ fi @if [ ! -d $(queuedir) ]; then \ echo Making $(queuedir) ; \ set -x ; \ mkdir -p $(queuedir) || mkdir $(queuedir) || exit 0 ; \ chown $(queueowner) $(queuedir) ; \ chgrp $(queuegid) $(queuedir) ; \ chmod 770 $(queuedir) ; \ fi @if [ ! -d $(mailerdir) ]; then \ echo Making $(mailerdir) ; \ set -x ; \ mkdir -p $(mailerdir) || mkdir $(mailerdir) || exit 0 ; \ chown $(binusr) $(mailerdir) ; \ chgrp $(bingrp) $(mailerdir) ; \ chmod 644 $(mailerdir) ; \ fi $(install) -c -o $(binusr) -g $(bingrp) -m 555 $(batcher) \ $(privbin)/batcher || ( cp $(batcher) /tmp/batcher && \ $(install) -o $(binusr) -g $(bingrp) -m 555 /tmp/batcher \ $(privbin) ) $(install) -s -c -o root -g $(bingrp) -m 4111 bsmtp $(privbin) if [ $(installmailer) = true ]; then \ $(install) -c -o $(binusr) -g $(bingrp) -m 444 \ bsmtp.m4.$(mailerversion) $(mailerdir)/bsmtp.m4 || \ ( cp bsmtp.m4.$(mailerversion) /tmp/bsmtp.m4 && \ $(install) -o $(binusr) -g $(bingrp) -m 444 /tmp/bsmtp.m4 \ $(mailerdir) ); \ fi $(install) -c -o $(binusr) -g $(bingrp) -m 555 rcsmtp $(pubbin) cd $(pubbin); set $(rcsmtpalias); while [ $$# -ne 0 ]; do \ echo ln -s -f rcsmtp $$1; ln -s -f rcsmtp $$1; shift; done $(install) -s -c -o $(binusr) -g $(bingrp) -m 555 rsmtp.wrapper \ $(pubbin)/rsmtp $(install) -c -o $(binusr) -g $(bingrp) -m 555 rsmtp $(privbin) cd $(pubbin); set $(rsmtpalias); while [ $$# -ne 0 ]; do \ echo ln -s -f rsmtp $$1; ln -s -f rsmtp $$1; shift; done set $(transmitters); while [ $$# -ne 0 ]; do \ $(install) -c -o $(binusr) -g $(bingrp) -m 555 transmitter.$$1 \ $(privbin); \ shift; \ done $(install) -c -o $(queueowner) -g $(bingrp) -m 4111 _bqueue $(pubbin) $(install) -c -o $(binusr) -g $(bingrp) -m 555 bqueue $(pubbin) clean: rm -f batcher.new bsmtp rsmtp.wrapper _bqueue core *.o *.core mostlyclean: clean rm -f $(conffiles) distclean: mostlyclean rm -f config.sed rm -f Makefile reconfig: $(perl) ./configure --redo