Last update 25-Jul-1999

# MBSE BBS - Internet Gateway - sendmail.

###

SETUP Sendmail

You need to install the sendmail configuration sources on your system to make this setup. All filenames mentioned here are relative to the sendmail configuration files, on my Slackware 4.0 system that is /usr/src/sendmail

First, add the file cf/mailer/fido.m4, original written by Marc A. Selig, see the file sendmail.m4-selig in the ifmail package.

    PUSHDIVERT(-1)
    #
    # Copyright (c) 1983 Eric P. Allman
    # Copyright (c) 1988, 1993
    #       The Regents of the University of California.  All rights reserved.
    #
    # 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.
    # 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.
    # 3. All advertising materials mentioning features or use of this software
    #    must display the following acknowledgement:
    #       This product includes software developed by the University of
    #       California, Berkeley and its contributors.
    # 4. Neither the name of the University nor the names of its contributors
    #    may be used to endorse or promote products derived from this software
    #    without specific prior written permission.
    #
    # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND 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 REGENTS OR 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.
    #

    ifdef(`IFMAIL_MAILER_PATH',,
            `define(`IFMAIL_MAILER_PATH', /opt/mbse/bin/ifmail)')
    POPDIVERT
    #####################################
    ###   FIDO Mailer specification   ###
    #####################################

    VERSIONID(`@(#)fido.m4		0.0 (Marc A. Selig) 5/25/95')

    Mfido,          P=IFMAIL_MAILER_PATH, F=msDFMuC, S=11, R=21,
                    A=ifmail -r $h $u
    # "-r $h" is required as ifmail requires packet routing address.

Next you need to add the domain file for your own internet domain. Since I use mbse.nl the file is named cf/domain/mbse.nl.m4

    divert(-1)
    #
    # Copyright (c) 1983 Eric P. Allman
    # Copyright (c) 1988, 1993
    #	The Regents of the University of California.  All rights reserved.
    #
    # 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.
    # 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.
    # 3. All advertising materials mentioning features or use of this software
    #    must display the following acknowledgement:
    #	This product includes software developed by the University of
    #	California, Berkeley and its contributors.
    # 4. Neither the name of the University nor the names of its contributors
    #    may be used to endorse or promote products derived from this software
    #    without specific prior written permission.
    #
    # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND 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 REGENTS OR 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.
    #

    divert(0)
    VERSIONID(`@(#)mbse.nl.m4	0.0 (mbse) 20-Apr-1999')
    define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward')dnl
    define(`UUCP_RELAY', `seaport.mbse.nl')dnl
    define(`FAX_RELAY', `seaport.mbse.nl')dnl
    FEATURE(redirect)dnl
    FEATURE(use_cw_file)dnl

The last file is your systems main configuration file, cf/cf/seaport.mc, note that I don't have configured any real internet or uucp mailservers, only my local bbs.

    divert(-1)
    #
    # Copyright (c) 1983 Eric P. Allman
    # Copyright (c) 1988, 1993
    #	The Regents of the University of California.  All rights reserved.
    #
    # 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.
    # 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.
    # 3. All advertising materials mentioning features or use of this software
    #    must display the following acknowledgement:
    #	This product includes software developed by the University of
    #	California, Berkeley and its contributors.
    # 4. Neither the name of the University nor the names of its contributors
    #    may be used to endorse or promote products derived from this software
    #    without specific prior written permission.
    #
    # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND 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 REGENTS OR 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.
    #

    # Fidonet <--> Internet gateway using ifmail. Addresses:
    #
    # Fidonet side			Internet side
    # f899.n2801.z2.fidonet		p888.f899.n2801.z2.fidonet.org
    # f88.n100.z92.bibnet		f88.n100.z2.bibnet.org

    divert(0)dnl
    include(`../m4/cf.m4')
    VERSIONID(`@(#)seaport.mc	0.2 (mbse) 13-May-1999')dnl
    OSTYPE(linux)
    define(`confUSE_ERRORS_TO', `True')dnl
    define(`confCOPY_ERRORS_TO', `postmaster')dnl
    define(`confMIME_FORMAT_ERRORS', `'False')dnl
    define(`confMATCH_GECOS', `True')dnl

    DOMAIN(mbse.nl)
    MASQUERADE_AS(seaport.mbse.nl)

    FEATURE(notsticky)dnl
    FEATURE(mailertable,hash -o /etc/mailertable)dnl
    FEATURE(nodns)dnl
    FEATURE(always_add_domain)dnl
    FEATURE(nocanonify)dnl

    MAILER(local)dnl
    MAILER(smtp)dnl
    MAILER(fido)dnl
    undefine(`UUCP_RELAY')dnl
    undefine(`FAX_RELAY')dnl

    LOCAL_RULE_3
    # if this is fidonet take it as canonized
    # note: insert any domains here that should be passed to ifmail!
    R$+ < @ $+ . fidonet . org > $*	$@ $1 < @ $2 . fidonet . org . > $3
    R$+ < @ $+ . fidonet > $*	$@ $1 < @ $2 . fidonet . org . > $3
    R$+ < @ $+ . bibnet . org > $*	$@ $1 < @ $2 . bibnet . org . > $3
    R$+ < @ $+ . bibnet > $*	$@ $1 < @ $2 . bibnet . org . > $3

    LOCAL_RULE_0
    #
    # Internet sides of the link:
    # 2:2801/899.888@fidonet.org
    # 92:100/88@bibnet.org
    #
    R$* < @ p 888 . f899 . n2801 . z2 . fidonet . org . > $*
    	$#local $: $1
    R$* < @ f88 . n100 . z92 . bibnet . org . > $*
    	$#local $: $1

    # Uplink routing, the fidonet sides of the link.
    # 2:2801/899@fidonet
    # 92:100/99@bibnet
    R$* < @ $+ . fidonet . org . > $*
    	$#fido $@ f899.n2801.z2 $: $1 < @ $2 . fidonet . org > $3
    R$* < @ $+ . bibnet . org . > $*
    	$#fido $@ f99.n100.z92 $: $1 < @ $2 . bibnet . org > $3

Finally, modify the cf/cf/Makefile, to put your system configuration file in it, in my case that is seaport.mc so that the resulting file is seaport.cf

    #
    #  Makefile for configuration files.
    #
    #	@(#)Makefile	8.17 (Berkeley) 4/2/1998
    #

    #
    #  Create configuration files using "m4 ../m4/cf.m4 file.mc > file.cf";
    #  this may be easier than tweaking the Makefile.  You do need to
    #  have a fairly modern M4 available (GNU m4 works).  On SunOS, use
    #  /usr/5bin/m4.
    #

    M4=	m4
    CFDIR=	..
    CHMOD=	chmod
    ROMODE=	444
    RM=	rm -f

    .SUFFIXES:  .mc .cf

    .mc.cf:
    	$(RM) $@
    	$(M4) ${CFDIR}/m4/cf.m4 $*.mc > $@ || ( $(RM) $@ && exit 1 )
    	$(CHMOD) $(ROMODE) $@

    ALL=	generic-bsd4.4.cf generic-hpux9.cf generic-hpux10.cf \
    		generic-osf1.cf generic-solaris2.cf \
    		generic-sunos4.1.cf generic-ultrix4.cf \
    	cs-hpux9.cf cs-osf1.cf cs-solaris2.cf \
    		cs-sunos4.1.cf cs-ultrix4.cf \
    	s2k-osf1.cf s2k-ultrix4.cf \
    	chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \
    		python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf knecht.cf \
    	seaport.cf

    all: $(ALL)

    seaport: seaport.cf

    clean cleandir:
    	$(RM) $(ALL) core

    depend install:

    # this is overkill, but....
    M4FILES=\
    	${CFDIR}/domain/Berkeley.EDU.m4 \
    	${CFDIR}/domain/CS.Berkeley.EDU.m4 \
    	${CFDIR}/domain/EECS.Berkeley.EDU.m4 \
    	${CFDIR}/domain/S2K.Berkeley.EDU.m4 \
    	${CFDIR}/domain/berkeley-only.m4 \
    	${CFDIR}/domain/generic.m4 \
    	${CFDIR}/feature/accept_unqualified_senders.m4 \
    	${CFDIR}/feature/accept_unresolvable_domains.m4 \
    	${CFDIR}/feature/access_db.m4 \
    	${CFDIR}/feature/allmasquerade.m4 \
    	${CFDIR}/feature/always_add_domain.m4 \
    	${CFDIR}/feature/bestmx_is_local.m4 \
    	${CFDIR}/feature/bitdomain.m4 \
    	${CFDIR}/feature/blacklist_recipients.m4 \
    	${CFDIR}/feature/loose_relay_check.m4 \
    	${CFDIR}/feature/domaintable.m4 \
    	${CFDIR}/feature/genericstable.m4 \
    	${CFDIR}/feature/limited_masquerade.m4 \
    	${CFDIR}/feature/local_lmtp.m4 \
    	${CFDIR}/feature/local_procmail.m4 \
    	${CFDIR}/feature/mailertable.m4 \
    	${CFDIR}/feature/masquerade_entire_domain.m4 \
    	${CFDIR}/feature/masquerade_envelope.m4 \
    	${CFDIR}/feature/nocanonify.m4 \
    	${CFDIR}/feature/nodns.m4 \
    	${CFDIR}/feature/notsticky.m4 \
    	${CFDIR}/feature/nouucp.m4 \
    	${CFDIR}/feature/nullclient.m4 \
    	${CFDIR}/feature/promiscuous_relay.m4 \
    	${CFDIR}/feature/rbl.m4 \
    	${CFDIR}/feature/redirect.m4 \
    	${CFDIR}/feature/relay_based_on_MX.m4 \
    	${CFDIR}/feature/relay_entire_domain.m4 \
    	${CFDIR}/feature/relay_hosts_only.m4 \
    	${CFDIR}/feature/relay_local_from.m4 \
    	${CFDIR}/feature/smrsh.m4 \
    	${CFDIR}/feature/stickyhost.m4 \
    	${CFDIR}/feature/use_ct_file.m4 \
    	${CFDIR}/feature/use_cw_file.m4 \
    	${CFDIR}/feature/uucpdomain.m4 \
    	${CFDIR}/feature/virtusertable.m4 \
    	${CFDIR}/hack/cssubdomain.m4 \
    	${CFDIR}/m4/cf.m4 \
    	${CFDIR}/m4/cfhead.m4 \
    	${CFDIR}/m4/nullrelay.m4 \
    	${CFDIR}/m4/proto.m4 \
    	${CFDIR}/m4/version.m4 \
    	${CFDIR}/mailer/cyrus.m4 \
    	${CFDIR}/mailer/fax.m4 \
    	${CFDIR}/mailer/local.m4 \
    	${CFDIR}/mailer/mail11.m4 \
    	${CFDIR}/mailer/pop.m4 \
    	${CFDIR}/mailer/procmail.m4 \
    	${CFDIR}/mailer/smtp.m4 \
    	${CFDIR}/mailer/usenet.m4 \
    	${CFDIR}/mailer/uucp.m4 \
    	${CFDIR}/ostype/aix2.m4 \
    	${CFDIR}/ostype/aix3.m4 \
    	${CFDIR}/ostype/altos.m4 \
    	${CFDIR}/ostype/amdahl-uts.m4 \
    	${CFDIR}/ostype/aux.m4 \
    	${CFDIR}/ostype/bsd4.3.m4 \
    	${CFDIR}/ostype/bsd4.4.m4 \
    	${CFDIR}/ostype/bsdi1.0.m4 \
    	${CFDIR}/ostype/bsdi2.0.m4 \
    	${CFDIR}/ostype/dgux.m4 \
    	${CFDIR}/ostype/domainos.m4 \
    	${CFDIR}/ostype/dynix3.2.m4 \
    	${CFDIR}/ostype/gnuhurd.m4 \
    	${CFDIR}/ostype/hpux10.m4 \
    	${CFDIR}/ostype/hpux9.m4 \
    	${CFDIR}/ostype/irix4.m4 \
    	${CFDIR}/ostype/irix5.m4 \
    	${CFDIR}/ostype/irix6.m4 \
    	${CFDIR}/ostype/linux.m4 \
    	${CFDIR}/ostype/maxion.m4 \
    	${CFDIR}/ostype/mklinux.m4 \
    	${CFDIR}/ostype/nextstep.m4 \
    	${CFDIR}/ostype/osf1.m4 \
    	${CFDIR}/ostype/powerux.m4 \
    	${CFDIR}/ostype/ptx2.m4 \
    	${CFDIR}/ostype/qnx.m4 \
    	${CFDIR}/ostype/riscos4.5.m4 \
    	${CFDIR}/ostype/sco-uw-2.1.m4 \
    	${CFDIR}/ostype/sco3.2.m4 \
    	${CFDIR}/ostype/solaris2.m4 \
    	${CFDIR}/ostype/solaris2.ml.m4 \
    	${CFDIR}/ostype/sunos3.5.m4 \
    	${CFDIR}/ostype/sunos4.1.m4 \
    	${CFDIR}/ostype/svr4.m4 \
    	${CFDIR}/ostype/ultrix4.m4 \
    	${CFDIR}/ostype/unknown.m4 \
    	${CFDIR}/ostype/uxpds.m4 \
    	${CFDIR}/siteconfig/uucp.cogsci.m4 \
    	${CFDIR}/siteconfig/uucp.old.arpa.m4 \
    	${CFDIR}/siteconfig/uucp.ucbarpa.m4 \
    	${CFDIR}/siteconfig/uucp.ucbvax.m4 \

    $(ALL):  $(M4FILES)

In the directory cf/cf type make seaport. This will create the file seaport.cf As root copy this file to /etc/sendmail.cf Still as root create or edit the files /etc/sendmail.cw and etc/mailertable

    # sendmail.cw  Mailer aliases
    p888.f899.n2801.z2.fidonet.org
    f88.n100.z92.bibnet.org
    # end of sendmail.cw

    # mailertable for sendmail
    fido:fidonet.org
    fido:bibnet.org
    # end of mailertable

Now that all sendmail files are in place you have to restart sendmail.

Go back Go to main