chip@tct.com (Chip Salzenberg) (06/25/91)
According to emv@msen.com (Ed Vielmetti):
>Chip, could you give a tutorial on compressed batched SMTP?
Thumbnail sketch of Batch SMTP for Smail 3.1 users:
Somehow arrange to use the "hbsmtp" (Half-baked BSMTP) transport for
those sites to which you wish to send SMTP. (Half-baked BSMTP is SMTP
without the HELO/QUIT wrapper.) Your "transports" entry for "hbsmtp"
might look something like this:
# hbsmtp - write half-baked batch SMTP to a spool file
hbsmtp: driver = appendfile, # append to spool file
hbsmtp, # send half-baked batch SMTP commands
uucp, # write envelope address as bang path
-max_addrs, # there is no limit on the number or
-max_chars; # total size of recipient addresses.
dir = /usr/smail/spool/outq/$host, # location of spool files
user = root, # user to own spool files
mode = 0600 # only owner can read and write file
This transport arranges for each message to the given host(s) to be
written to a file with a unique name (which always begins with "q"),
in the directory /usr/smail/spool/outq/hostname.
Then, once in a while (I use once an hour), you run this script:
: sendbsmtp
# Send all batch SMTP traffic
SPOOLDIR=/usr/smail/spool/outq
# HOST="`uuname -l`.uucp" || exit 1
HOST="your.domain.here"
cd $SPOOLDIR || exit 1
for d in *
do
test -d $d || continue
(
cd $d || exit
f="`ls q* 2>/dev/null`"
test -n "$f" || exit
(
echo "HELO <${HOST}>"
cat $f
echo "QUIT"
) | /usr/bin/uux -r - "$d!rsmtp" && rm -f $f
)
done
This script concatenates all the the half-baked SMTP files in each
host's directory, turns it into real BSMTP with leading HELO and
trailing QUIT lines, and feeds it into a remote execution of the
"rsmtp" command.
Note that I do not use compression on my BSMTP. To add compression,
you change the uux line in the "sendbsmtp" script to something like:
) | compress | /usr/bin/uux -r - "$d!rcsmtp" && rm -f $f
Note that the command is now "rcsmtp". Then, on the *other* system,
arrange for this script to be executable under the name "rcsmtp":
: rcsmtp
# Receive compressed BSMTP.
uncompress | rsmtp
That should be clear as mud. Questions?
--
Chip Salzenberg at Teltronics/TCT <chip@tct.com>, <uunet!pdn!tct!chip>
"I want to mention that my opinions whether real or not are MY opinions."
-- the inevitable William "Billy" Steinmetz