From: martini@heaven7.in-berlin.de (Martin P. Ibert)
Newsgroups: comp.mail.uucp
Subject: Re: Mail efficiency over UUCP...
Date: 29 Sep 92 20:12:44 GMT
Organization: The Seventh Heaven, Berlin, Germany
X-Reason: This message has been reposted because of configuration errors at heaven7.in-berlin.de.

root@solaria.mil.wi.us (Joe Greco) writes:
> Can somebody suggest why it is that while news can be sent compressed over
> a UUCP link, nobody seems to have done this for mail?
No, because your assumption that "nobody seems to have done this for mail"
is wrong. At least in Germany, batched & compressed mail is quite common,
and all my high-volume links use it (if possible).

Software for this is widely available. Smail 3.1.28 (and some previous
versions) sort of support it out of the box (so to say), so do several
packages for smaller machines. I know this to be true for Atari STs (because
I wrote that package), and I've heard it holds for Amigas under AmigaDOS.

BTW, I wonder that so many people seem to use compress(1) for news and mail
compression. Your phone rates must be way lower than ours (here in Germany),
since freeze(1) is clearly becoming the tool of choice for compression of
both news and mail.

The problem with batching and compressing mail (as someone pointed out in
another reply) is that

a) the envelope information has to be preserved somehow (that's what SMTP is
   for)

b) compressing is only worthwhile if you apply it to several messages at once
   (so you have to accumulate messages somehow)

I'll give a general description on how things are done here in Germany.

First, both sites of the link have to agree on how to batch and compress
mail.

Then, messages are no longer queued in rmail-Format, but wrapped up in a
SMTP envelope. That is, the mail is transformed into one side of a SMTP
interactive session (described in RFC821), with the responses of the receiving
computer removed. This gift packages can now be sent to rsmtp on the remote
machine for processing:

	... | uux - -r -gC host!rsmtp

This of course doesn't give any advantage over a normal rmail-based link.
But hold on.

One package passed to rsmtp can really contain more than one mail (because
one SMTP session can transfer more than one mail too), so we might just as
well batch several mails together and still send them to rsmtp on the remote
machine.

To do this, we first accumulate mails in a directory (depending on the
package, this is done as one SMTP session file per mail with the opening
and closing left off, or as one file for the message and one for the envelope
information). Every so often (via a crontab-like feature, or every time we
poll another system, or both), we batch up the whole bunch of mail for one
site and uux the batch to rsmtp. That's batching mail. A script that does
it is contained in the Smail 3.1.28 docs; although that doesn't work just
as it is (or so it seemed to me), you can easily improve it.

Now for compression. While we are at it, we might as well compress the
batch and arrange for them to be uncompressed on the other site of the link.
This is quite simply done like this:

	... | freeze | uux - -r -gC host|rfsmtp

Or, if you must,

	... | compress | uux - -r -gC host!rcsmtp

Voil`! Batched and compressed mail!

> Are people doing this already and I have just never heard of it?  Or is
> there a practical (or obvious) problem with it that I am not seeing?
Obviously the former.
-- 
___*___  Martin P. Ibert - Westendallee 100 d, D-1000 Berlin 19 - +4930-3056541
=======  E-mail to martini@{heaven7.{in-berlin.de|sub.org}|cloud9.in-berlin.de}
||| |||  ----------------------------------------------------------------------
||| |||  ------ Everybody wants to go to heaven, but nobody wants to die ------
Newsgroups: comp.mail.uucp,comp.sys.sun.misc