Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!uunet!mcsun!Germany.EU.net!ira.uka.de!smurf.sub.org!rnihd!rnivh!acwbust!andrew
From: andrew@acwbust.sub.org (A.W. Root)
Newsgroups: comp.unix.bsd
Subject: Patch for smail (Re: UUCP woes with 386BSD)
Message-ID: <Bt6C0n.38w@acwbust.sub.org>
Date: 18 Aug 92 10:05:08 GMT
References: <HNFDPB1w163w@coyote.datalog.com> <1992Aug15.170940.13095@unixland.natick.ma.us>
Organization: A.Wheadon,6140-Bensheim-4,FRG
Lines: 606
In article <1992Aug15.170940.13095@unixland.natick.ma.us> bill@unixland.natick.ma.us (Bill Heiser) writes:
>mink@coyote.datalog.com (Clint Ruoho) writes:
>
>However I have not had any luck getting MAIL to work in a UUCP environment.
>I tried to set up sendmail.cf to use UUCP, but it still fails with
>"hostname lookup failed" errors. Seems maybe it's trying to use a nameserver?
>Anyone have outbound mail working on 386BSD in a UUCP environment?
All you need to do is replace sendmail with smail-3.1.25 which after
changing mkdefs.sh to run with ash or bash will compile with practically
no problems.
Attached is a patch to get smail running, I still seem to have a problem
with bind and smail as a daemon but used normally it works perfectly.
You can't use ndbm as smail wants some type of ndbm_fileno or something
which doesn't exist.
Patch follows
diff +context +recursive ./conf/EDITME ../smail-3.1.25.new/conf/EDITME
*** ./conf/EDITME Wed Jul 22 18:14:54 1992
--- ../smail-3.1.25.new/conf/EDITME Wed Jul 22 02:53:08 1992
***************
*** 113,119 ****
# This may save some disk space at the expence of the ability to do
# symbolic debugging.
! #STRIP=yes
# USE_SYMLINKS - define this if you wish to use symlinks when installing
--- 113,119 ----
# This may save some disk space at the expence of the ability to do
# symbolic debugging.
! STRIP=yes
# USE_SYMLINKS - define this if you wish to use symlinks when installing
***************
*** 127,133 ****
# one copy of the smail binary to be installed. Do not define this
# if your system does not have symbolic links.
! #USE_SYMLINKS=yes
# OS_TYPE - define the operating system type for your machine
--- 127,133 ----
# one copy of the smail binary to be installed. Do not define this
# if your system does not have symbolic links.
! USE_SYMLINKS=yes
# OS_TYPE - define the operating system type for your machine
***************
*** 282,288 ****
# doesn't work for you, try defining OBSOLETE_RESOLVER.
#MISC_DEFINES=ISC_SOCKET_TIME_BUG
! #MISC_DEFINES=NO_FORWARDTO_FILE # recommended for BSD systems
#MISC_DEFINES=ISC_SOCKET_TIME_BUG:NO_FORWARDTO_FILE
#MISC_DEFINES=OBSOLETE_RESOLVER
--- 282,288 ----
# doesn't work for you, try defining OBSOLETE_RESOLVER.
#MISC_DEFINES=ISC_SOCKET_TIME_BUG
! MISC_DEFINES=NO_FORWARDTO_FILE # recommended for BSD systems
#MISC_DEFINES=ISC_SOCKET_TIME_BUG:NO_FORWARDTO_FILE
#MISC_DEFINES=OBSOLETE_RESOLVER
***************
*** 386,392 ****
# transports, inet_uusmtp and inet_demand_uusmtp use compliant
# protocols.
! #UUCP_ZONE=true # this site is in the UUCP zone
#UUCP_ZONE= # this site is on the Internet
--- 386,392 ----
# transports, inet_uusmtp and inet_demand_uusmtp use compliant
# protocols.
! UUCP_ZONE=true # this site is in the UUCP zone
#UUCP_ZONE= # this site is on the Internet
***************
*** 427,433 ****
# wish to be able to receive mail from anywhere in the world
# should get a registered domain.
! DOMAINS=uucp # common
#DOMAINS=ussr.comm:uucp # example only
--- 427,433 ----
# wish to be able to receive mail from anywhere in the world
# should get a registered domain.
! DOMAINS=sub.org:uucp # common
#DOMAINS=ussr.comm:uucp # example only
***************
*** 509,515 ****
# is os-type dependent, and is commonly nobody for BSD- and sun-derived
# systems.
! #NOBODY=nobody
#NOBODY=unknown # some sites have this in their passwd file
--- 509,515 ----
# is os-type dependent, and is commonly nobody for BSD- and sun-derived
# systems.
! NOBODY=nobody
#NOBODY=unknown # some sites have this in their passwd file
***************
*** 549,557 ****
# under SMAIL_BIN_DIR. The SMAIL_BIN_DIR should be a directory
# that is commonly in users search path (i.e., $PATH).
! SMAIL_BIN_DIR=/usr/local # BSD local convention
#SMAIL_BIN_DIR=/usr/amdahl/bin # convention for UTS/580
! #SMAIL_BIN_DIR=/usr/local/bin # yet another convention
#SMAIL_BIN_DIR=/usr/smail/bin # I use this right now
--- 549,557 ----
# under SMAIL_BIN_DIR. The SMAIL_BIN_DIR should be a directory
# that is commonly in users search path (i.e., $PATH).
! #SMAIL_BIN_DIR=/usr/local # BSD local convention
#SMAIL_BIN_DIR=/usr/amdahl/bin # convention for UTS/580
! SMAIL_BIN_DIR=/usr/local/bin # yet another convention
#SMAIL_BIN_DIR=/usr/smail/bin # I use this right now
***************
*** 574,581 ****
# to the null string. This will prevent the smail src/Makefile from
# installing it as $SMAIL_BIN_DIR/smail twice.
! SMAIL_NAME=/usr/lib/sendmail # common convention
! #SMAIL_NAME= # use smail in bin directory
# OTHER_SMAIL_NAMES - other names under which to install smail
--- 574,581 ----
# to the null string. This will prevent the smail src/Makefile from
# installing it as $SMAIL_BIN_DIR/smail twice.
! #SMAIL_NAME=/usr/sbin/sendmail # common convention
! SMAIL_NAME= # use smail in bin directory
# OTHER_SMAIL_NAMES - other names under which to install smail
***************
*** 596,602 ****
#
# NOTE: A pathname CANNOT be in both SMAIL_NAME and OTHER_SMAIL_NAMES.
! OTHER_SMAIL_NAMES=/bin/rmail # common
#OTHER_SMAIL_NAMES=/usr/lib/sendmail # could use this rather
# than putting it into
# SMAIL_NAME
--- 596,602 ----
#
# NOTE: A pathname CANNOT be in both SMAIL_NAME and OTHER_SMAIL_NAMES.
! OTHER_SMAIL_NAMES=/bin/rmail:/usr/sbin/sendmail # common
#OTHER_SMAIL_NAMES=/usr/lib/sendmail # could use this rather
# than putting it into
# SMAIL_NAME
***************
*** 621,627 ****
# is required by the smail binary as it is released. See smail(5)
# and smail(8) for more details on this and related topics.
! LIB_DIR=/usr/lib/smail # common convention
#LIB_DIR=/usr/local/lib/smail
#LIB_DIR=/usr/smail/lib # I use this right now
--- 621,627 ----
# is required by the smail binary as it is released. See smail(5)
# and smail(8) for more details on this and related topics.
! LIB_DIR=/usr/libexec/smail # common convention
#LIB_DIR=/usr/local/lib/smail
#LIB_DIR=/usr/smail/lib # I use this right now
***************
*** 652,658 ****
#NEWALIASES=$UTIL_BIN_DIR/newaliases
#NEWALIASES=/usr/local/bin/newaliases
! NEWALIASES=/usr/ucb/newaliases # BSD location
#NEWALIASES=/usr/lib/newaliases # UTS/580 location
--- 652,658 ----
#NEWALIASES=$UTIL_BIN_DIR/newaliases
#NEWALIASES=/usr/local/bin/newaliases
! NEWALIASES=/usr/bin/newaliases # BSD location
#NEWALIASES=/usr/lib/newaliases # UTS/580 location
***************
*** 746,753 ****
# YP maps. In any case, use whatever works in your
# environment.
! ALIASES_FILE=/usr/lib/aliases # compatible with sendmail
! #ALIASES_FILE=aliases # for file under LIB_DIR
#ALIASES_FILE=mail.aliases # for use over Sun YP
#ALIASES_TYPE=dbm # compatible with sendmail
--- 746,753 ----
# YP maps. In any case, use whatever works in your
# environment.
! #ALIASES_FILE=/usr/lib/aliases # compatible with sendmail
! ALIASES_FILE=aliases # for file under LIB_DIR
#ALIASES_FILE=mail.aliases # for use over Sun YP
#ALIASES_TYPE=dbm # compatible with sendmail
***************
*** 788,794 ****
# directories should be colon-separated and may contain only one spool
# directory if desired.
! SPOOL_DIRS=/usr/spool/smail # common
#SPOOL_DIRS=/usr/spool/smail:/usr2/spool/smail # use of alternate filesystem
#SPOOL_DIRS=/usr/smail/spool # I use this right now
--- 788,794 ----
# directories should be colon-separated and may contain only one spool
# directory if desired.
! SPOOL_DIRS=/var/spool/smail # common
#SPOOL_DIRS=/usr/spool/smail:/usr2/spool/smail # use of alternate filesystem
#SPOOL_DIRS=/usr/smail/spool # I use this right now
***************
*** 825,831 ****
# If UNSHAR_MAP_DIR is not defined, then the getmap and uuwho utilities
# will not function.
! UNSHAR_MAP_DIR=/usr/spool/uumaps
# NEWS_SPOOL_DIR - where news articles are stored
--- 825,831 ----
# If UNSHAR_MAP_DIR is not defined, then the getmap and uuwho utilities
# will not function.
! UNSHAR_MAP_DIR=/var/spool/uumaps
# NEWS_SPOOL_DIR - where news articles are stored
***************
*** 838,844 ****
# the news articles from comp.mail.maps.
#NEWS_SPOOL_DIR=/usr/spool/news
! #NEWS_SPOOL_DIR=/var/spool/news
# UUWHO_FILE - file used to store the uuwho file
--- 838,844 ----
# the news articles from comp.mail.maps.
#NEWS_SPOOL_DIR=/usr/spool/news
! NEWS_SPOOL_DIR=/var/spool/news
# UUWHO_FILE - file used to store the uuwho file
***************
*** 890,896 ****
# It is therefore recommended that TMP_DIR not be globally writable.
#TMP_DIR=$UNSHAR_MAP_DIR/tmp # common for unsecure /tmp
! #TMP_DIR=/usr/tmp # if /usr/tmp is sticky
#TMP_DIR=$LIB_DIR/tmp
--- 890,896 ----
# It is therefore recommended that TMP_DIR not be globally writable.
#TMP_DIR=$UNSHAR_MAP_DIR/tmp # common for unsecure /tmp
! TMP_DIR=/usr/tmp # if /usr/tmp is sticky
#TMP_DIR=$LIB_DIR/tmp
***************
*** 904,910 ****
# normal users. A common directory for smail utilities to append to
# SECURE_PATH is UTIL_BIN_DIR.
! #SECURE_PATH=/bin:/usr/bin:/usr/ucb # common for BSD systems
#SECURE_PATH=/bin:/usr/bin:/usr/amdahl/bin # common for UTS/580 systems
#SECURE_PATH=/bin:/usr/bin # common for System V system
--- 904,910 ----
# normal users. A common directory for smail utilities to append to
# SECURE_PATH is UTIL_BIN_DIR.
! SECURE_PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin # common for BSD systems
#SECURE_PATH=/bin:/usr/bin:/usr/amdahl/bin # common for UTS/580 systems
#SECURE_PATH=/bin:/usr/bin # common for System V system
***************
*** 968,978 ****
# will read the compressed file: filename$DOT_Z and write the
# plain text to standard output while leaving the file compressed.
! #COMPRESS=compress # common
! #COMP_FLAG="-f"
! #UNCOMPRESS=uncompress
! #ZCAT=zcat
! #DOT_Z=".Z"
#COMPRESS=pack # System V standard
#COMP_FLAG="-f"
--- 968,978 ----
# will read the compressed file: filename$DOT_Z and write the
# plain text to standard output while leaving the file compressed.
! COMPRESS=compress # common
! COMP_FLAG="-f"
! UNCOMPRESS=uncompress
! ZCAT=zcat
! DOT_Z=".Z"
#COMPRESS=pack # System V standard
#COMP_FLAG="-f"
diff +context +recursive ./conf/lib/mkdefs.sh ../smail-3.1.25.new/conf/lib/mkdefs.sh
*** ./conf/lib/mkdefs.sh Tue Dec 24 04:02:58 1991
--- ../smail-3.1.25.new/conf/lib/mkdefs.sh Tue Jul 21 23:54:04 1992
***************
*** 376,386 ****
list=$OTHER_SMAIL_NAMES
OTHER_SMAIL_NAMES=
IFS=$sep
! for i in $list; do
case "$OTHER_SMAIL_NAMES" in
?*) OTHER_SMAIL_NAMES="$OTHER_SMAIL_NAMES $i";;
*) OTHER_SMAIL_NAMES="$i";
! esac
done
IFS=$save_IFS
--- 376,386 ----
list=$OTHER_SMAIL_NAMES
OTHER_SMAIL_NAMES=
IFS=$sep
! for i in $list; do if [ "$i" != "" ] ; then
case "$OTHER_SMAIL_NAMES" in
?*) OTHER_SMAIL_NAMES="$OTHER_SMAIL_NAMES $i";;
*) OTHER_SMAIL_NAMES="$i";
! esac ; fi
done
IFS=$save_IFS
***************
*** 436,456 ****
# Write out the simple variables
eval "cat <<EOF
! `for v in $VARS $LISTS $NLISTS; do echo \"\$v='\\\$\$v'\"; done`
EOF
"
# write out the positive boolean list variables
! (IFS="$sep"; for i in $HAVE; do echo HAVE_$i=yes; done)
! (IFS="$sep"; for i in $OSNAMES; do echo $i=yes; done)
# clear the negative boolean list variables
! (IFS="$sep"; for i in $NO_HAVE; do echo HAVE_$i=; done)
# write the extensible set of variables that may have values
(IFS="$sep"
! for i in $MISC_DEFINES; do
! echo "$i"
done | sed -n -e 's/^\(.[^=]*\)$/\1=yes/p' \
-e 's/^\(.[^=]*\)=\(.*\)/\1='\2'/p'
)
--- 436,458 ----
# Write out the simple variables
eval "cat <<EOF
! `for v in $VARS $LISTS $NLISTS; do echo "$v='\$$v'"; done`
EOF
"
# write out the positive boolean list variables
! #(IFS="$sep"; for i in $HAVE; do echo HAVE_$i=yes; done)
! (IFS="$sep"; for i in $HAVE; do if [ "$i" != "" ] ; then echo HAVE_$i=yes; fi ; done)
! #(IFS="$sep"; for i in $OSNAMES; do echo $i=yes; done)
! (IFS="$sep"; for i in $OSNAMES; do if [ "$i" != "" ] ; then echo $i=yes; fi ; done)
# clear the negative boolean list variables
! (IFS="$sep"; for i in $NO_HAVE; do if [ "$i" != "" ] ; then echo HAVE_$i=; fi ; done)
# write the extensible set of variables that may have values
(IFS="$sep"
! for i in $MISC_DEFINES; do if [ "$i" != "" ] ; then
! echo "$i" ; fi
done | sed -n -e 's/^\(.[^=]*\)$/\1=yes/p' \
-e 's/^\(.[^=]*\)=\(.*\)/\1='\2'/p'
)
***************
*** 563,578 ****
EOF
# write out the positibe boolean list variables
! (IFS="$sep"; for i in $HAVE; do echo "#define HAVE_$i"; done)
! (IFS="$sep"; for i in $OSNAMES; do echo "#define $i"; done)
# clear the negative boolean list variables
! (IFS="$sep"; for i in $NO_HAVE; do echo "#undef HAVE_$i"; done)
# write the extensible set of variables that may have values
(IFS="$sep"
! for i in $MISC_DEFINES; do
! echo "$i"
done | sed -n -e 's/^\(.[^=]*\)$/#define \1/p' \
-e 's/^\(.[^=]*\)=\(.*\)/#define \1 \2/p'
)
--- 565,580 ----
EOF
# write out the positibe boolean list variables
! (IFS="$sep"; for i in $HAVE; do if [ "$i" != "" ] ; then echo "#define HAVE_$i" ; fi; done)
! (IFS="$sep"; for i in $OSNAMES; do if [ "$i" != "" ] ; then echo "#define $i" ; fi; done)
# clear the negative boolean list variables
! (IFS="$sep"; for i in $NO_HAVE; do if [ "$i" != "" ] ; then echo "#undef HAVE_$i" ; fi; done)
# write the extensible set of variables that may have values
(IFS="$sep"
! for i in $MISC_DEFINES; do if [ "$i" != "" ] ; then
! echo "$i" ; fi
done | sed -n -e 's/^\(.[^=]*\)$/#define \1/p' \
-e 's/^\(.[^=]*\)=\(.*\)/#define \1 \2/p'
)
***************
*** 644,663 ****
fi
# clear the negative boolean list variables
! (IFS="$sep"; for i in $NO_HAVE; do echo "s|X_HAVE_${i}_X||g"; done)
# write out the positive boolean list variables
! (IFS="$sep"; for i in $HAVE; do echo "s|X_HAVE_${i}_X|yes|g"; done)
! (IFS="$sep"; for i in $OSNAMES; do echo "s|X_${i}_X|yes|g"; done)
# If this OS cannot correctly use #!/bin/sh at the beginning of bourne
# shell scripts, then convert them not to do this.
(IFS="$sep";
sed_hash_bang=true
! for i in $HAVE; do
case "$i" in
HAVE_HASH_BANG) sed_hash_bang=false;;
! esac
done
if $sed_hash_bang; then
echo '1s|^#! */bin/sh|: /bin/sh|'
--- 646,665 ----
fi
# clear the negative boolean list variables
! (IFS="$sep"; for i in $NO_HAVE; do if [ "$i" != "" ] ; then echo "s|X_HAVE_${i}_X||g" ; fi; done)
# write out the positive boolean list variables
! (IFS="$sep"; for i in $HAVE; do if [ "$i" != "" ] ; then echo "s|X_HAVE_${i}_X|yes|g" ; fi; done)
! (IFS="$sep"; for i in $OSNAMES; do if [ "$i" != "" ] ; then echo "s|X_${i}_X|yes|g" ; fi; done)
# If this OS cannot correctly use #!/bin/sh at the beginning of bourne
# shell scripts, then convert them not to do this.
(IFS="$sep";
sed_hash_bang=true
! for i in $HAVE; do if [ "$i" != "" ] ; then
case "$i" in
HAVE_HASH_BANG) sed_hash_bang=false;;
! esac ; fi
done
if $sed_hash_bang; then
echo '1s|^#! */bin/sh|: /bin/sh|'
diff +context +recursive ./conf/os/bsd4.3 ../smail-3.1.25.new/conf/os/bsd4.3
*** ./conf/os/bsd4.3 Sun Oct 27 08:21:43 1991
--- ../smail-3.1.25.new/conf/os/bsd4.3 Wed Jul 22 02:01:30 1992
***************
*** 18,24 ****
FLOCK_MAILBOX=yes
# MAILBOX_DIR - in which directory are user mailbox files
! MAILBOX_DIR=/usr/spool/mail
# CONSOLE - name of the console device file
CONSOLE=/dev/console
--- 18,24 ----
FLOCK_MAILBOX=yes
# MAILBOX_DIR - in which directory are user mailbox files
! MAILBOX_DIR=/var/mail
# CONSOLE - name of the console device file
CONSOLE=/dev/console
***************
*** 31,40 ****
"
# SECURE_PATH - directories containing system-supplied user programs
! SECURE_PATH=/usr/ucb:/bin:/usr/bin
# OSLIBS - name any object libraries containing routines we will need
! OSLIBS=-ldbm
# DRIVER_CONFIGURATION - configuration file describing smail drivers
DRIVER_CONFIGURATION=bsd-network
--- 31,40 ----
"
# SECURE_PATH - directories containing system-supplied user programs
! # SECURE_PATH=/usr/ucb:/bin:/usr/bin
# OSLIBS - name any object libraries containing routines we will need
! # OSLIBS=-ldbm
# DRIVER_CONFIGURATION - configuration file describing smail drivers
DRIVER_CONFIGURATION=bsd-network
***************
*** 43,53 ****
RANLIB=ranlib
# CHOWN - command to use for accessing the chown program
! CHOWN=/etc/chown
# HAVE - what features should be used with this operating system
HAVE=RENAME:MKDIR:BSD_NETWORKING:SYSEXITS:DBM:NDBM:BSTRING:SYS5STRLIB
HAVE=$HAVE:GETOPT:GETHOSTNAME:HASH_BANG:DUP2:READDIR:SETGROUPS:FSYNC
# UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
! UUCP_SYSTEM_FILE=/usr/lib/uucp/L.sys
--- 43,54 ----
RANLIB=ranlib
# CHOWN - command to use for accessing the chown program
! CHOWN=/usr/sbin/chown
# HAVE - what features should be used with this operating system
HAVE=RENAME:MKDIR:BSD_NETWORKING:SYSEXITS:DBM:NDBM:BSTRING:SYS5STRLIB
HAVE=$HAVE:GETOPT:GETHOSTNAME:HASH_BANG:DUP2:READDIR:SETGROUPS:FSYNC
+ HAVE=$HAVE:HDB_UUCP:VFPRINTF
# UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
! UUCP_SYSTEM_FILE=/etc/uucp/sys
diff +context +recursive ./src/lookup.c ../smail-3.1.25.new/src/lookup.c
*** ./src/lookup.c Mon Oct 28 07:40:28 1991
--- ../smail-3.1.25.new/src/lookup.c Wed Jul 22 02:01:13 1992
***************
*** 668,674 ****
priv->proto = proto;
priv->name = name;
*db = (char *)priv;
! #ifdef lock_fd_rd_wait
if (lock_fd_rd_wait(dbm_pagfno(priv->db)) < 0) {
*error = "database is locked, try again later";
return FILE_AGAIN;
--- 668,674 ----
priv->proto = proto;
priv->name = name;
*db = (char *)priv;
! #ifndef lock_fd_rd_wait
if (lock_fd_rd_wait(dbm_pagfno(priv->db)) < 0) {
*error = "database is locked, try again later";
return FILE_AGAIN;
diff +context +recursive ./util/dbm_compat.h ../smail-3.1.25.new/util/dbm_compat.h
*** ./util/dbm_compat.h Tue Dec 24 04:03:10 1991
--- ../smail-3.1.25.new/util/dbm_compat.h Wed Jul 22 00:34:40 1992
***************
*** 1,5 ****
/* @(#)util/dbm_compat.h 1.3 09 Dec 1991 01:37:41 */
!
/*
* dbm_compat.h:
* Low-functionality compatibility header for dbm and ndbm.
--- 1,5 ----
/* @(#)util/dbm_compat.h 1.3 09 Dec 1991 01:37:41 */
! #include <sys/types.h>
/*
* dbm_compat.h:
* Low-functionality compatibility header for dbm and ndbm.
--
He ought to be put in his place | He has a brain | andrew@acwbust.sub.org
Is there a shovel around ? <mr> | but it hasn't reached his head yet. ;->