Updated Summary: How I replaced Xenix rmail.
Tony Olekshy
tony at oha.UUCP
Fri Jun 8 02:54:48 AEST 1990
Here is an updated version of the Xenix + pathalias + smail + deliver
installation that I am now running, based on comments from readers of
my previous summary. If you are passing mail to a smart host I seriously
suggest that you do this too.
First, I obtained and installed pathalias (version 9, from volume 12 of
comp.sources.unix), smail (version 2.5, shown as smail3 in volume 11 of
comp.sources.unix, patched with Chip Rosenthal's Xenix patches), and
deliver (version 2.0 from volume 20 of comp.sources.unix, patched - with
help from Chip Salzenberg - to level 11 from comp.sources.bugs).
The installation of pathalias was uneventful, I set Xenix stuff in config.h
and told Makefile not to use DBM.
Using smail 2.5 + the Rosenthal patches, I edited defs.h to select DELIVER,
LMAIL_REMOTE, MYDOM ".uucp", ROUTING ALWAYS, and QUEUECOST 205 (immediate
non-toll calls), and I edited the installation paths as necessary.
I also modified the Makefile to just so a simple install where I wanted
it, since I had already renamed the Xenix routines that were being replaced.
I set up the deliver config.h to define USG, set signal type to int, define
SETVBUF_TYPE_BUF, added the local bin directory to SAFEPATH, set the MBX_MODE
to 0600 and MBX_GROUP to "mail", and modified path names as appropriate. I
also modified the Makefile to install things where I wanted them.
After saving copies of the originals with .sco suffixes, smail gets linked to
/usr/bin/rmail and /usr/lib/mail/execmail, and deliver gets linked to
/usr/lib/mail/mail.local.
Then, honoring the path names I set up in the various configuration files,
I set up a pathalias input file containing:
oha = .oha.UUCP
alberta = .cs.UAlberta.CA
smart-host = alberta
oha alberta(DIRECT)
oha thor(DIRECT)
oha vacuum(DIRECT)
and used:
pathalias -f pathalias.in | (cd /lcl/cmd/smail; pathproc) > paths
to generate the paths file for smail. I also generated a full name alias
file with the input:
tony Tony Olekshy (A.G.)
al Alison Machum (A.A.)
using:
(cd /lcl/cmd/smail; mkfnames -) < fullnames.in > fullnames
Also, I created an smail aliases file with entries like:
ctree tony
ctree-info tony
ctree-request tony
edm-announce tony
postmaster tony
root tony
uucp tony
For deliver, I created the following three delivery files. The system
delivery file contains:
:
# System-wide Deliver File.
for user in ${1+"$@"}; do
echo $user;
done
The error delivery file contains:
:
# Error Handling Delivery File.
# Send a copy to the postmaster.
( echo "Subject: Trouble Delivering Mail...\n"
echo "\t[See /sys/etc/deliver/ErrorLog.]\n"
sed 's/^/| /' $HEADER $BODY
) | smail postmaster
# Send to requested users.
for user in ${1+"$@"}; do
echo $user;
done
And the post-user delivery file contains:
:
# Post-user Deliver File.
getsit=1 # Will be set to 0 to turn off ~/mail/post.
FROM=`header -f from $HEADER`
case "$FROM" in
"oha!ctree") getsit=0 ;;
*) ;;
esac
# See if the sender is one of the recepients.
for user in ${1+"$@"}; do
[ "$user" = "$SENDER" ] && getsit=0
done
# Copy to the sender?
homedir=`echo $SENDER | sed 's/^oha!//'`
[ $getsit = 1 -a -w "/u/$homedir/mail/post" ] && {
cat $HEADER $BODY | deliver -n -b "/u/$homedir/mail/post"
}
# Send to requested users.
for user in ${1+"$@"}; do
echo "$user";
done
I turned off recording of out-going messages in my mush startup code,
so now I get a copy of the actual outgoing message, including message
id, in the sender's ~mail/post file, via the PostUser deliver file,
unless the message is to the user or from one of the special users.
In addition, I told mush to go back to replying via the From: line.
I also added the log file names to my log-file clean-up daemon's list.
Finally, I modified by mailing-list posting routine to build its own letter
for each subscriber, with headers specifying From: oha!ctree, and send it
with:
smail $subscriber < $letter
--
Yours etc., Tony Olekshy. Internet: oha!tony at CS.UAlberta.CA
uucp: alberta!oha!tony
More information about the Comp.unix.xenix
mailing list