[net.mail] sending mail via rmail with multiple arguments

gnu@hoptoad.uucp (John Gilmore) (09/26/86)

I made a similar change to the Sun sendmail, which I believe has survived
into the 4.3BSD sendmail.  (You need to turn it on in sendmail.cf, as
explained below.)  If multiple recipients of a message are at the same
host (or the next hop in the path is the same), your system will only
send one copy of the message, and run an "rmail user1 user2 user3..."
command via uux.  I asked around at the time, how likely this was to
break things, and the response was that the command line would likely
have a length limit around 512 bytes, but that was all.  

Since then I have heard it rumored that the "rmail" programs in V7 and
4.1BSD will not accept multiple arguments.  However, I have 38 mail
links and no mail is getting lost, so I must not be talking to any V7
or 4.1BSD sites.  (Utzoo doesn't count, that's only the ghost of
V7 yet-to-come.)

Here's how you turn on the feature in Sun or 4.3 /usr/lib/sendmail.cf.
It's a text file which you can edit to configure your mailer.
There is a short section that defines the uucp mailer.  It starts
with a line with "Muucp" at the left margin, e.g. like this:

Muucp,	P=/usr/bin/uux, F=sDFMhuU, S=13, R=23,
	A=uux - -r $h!rmail ($u)

This says that mail resolving to a "uucp" address should run program 
/usr/bin/uux with various flags, various arguments, and various rules for
munging the to and from addresses.

You have to add the "m" flag, which says "multiple recipients OK to
send out via this mailer", and specify the maximum argument length.  I
use 250 because it's a lot less than 512.  (By the way, the L= value
does NOT count the chars that are explicitly specified in the A=
parameter; it only counts the characters of the recipients' addresses.)
It looks like this:

Muucp,	P=/usr/bin/uux, F=sDFMhuUm, S=13, R=23, L=250,
	A=uux - -r $h!rmail ($u)

After editing in the change and writing the file back (you'll need to
be root to do this), run "sendmail -bz" which will "compile" the new
configuration into a binary file which is fast to run with.

This causes the eventual command used if you mail to sun!avb and sun!wnj
to be:

	  uux - -r sun!rmail avb wnj

This is especially useful if you send out a large mailing list, or are
a relay point for such a site.  Gateways to SMTP based networks would also
be helped by having this fix.
-- 
John Gilmore  {sun,ptsfa,lll-crg,ihnp4}!hoptoad!gnu   jgilmore@lll-crg.arpa
		     May the Source be with you!

mark@cbosgd.ATT.COM (Mark Horton) (09/28/86)

In article <1138@hoptoad.uucp> gnu@hoptoad.uucp (John Gilmore) writes:
>
>Since then I have heard it rumored that the "rmail" programs in V7 and
>4.1BSD will not accept multiple arguments.  However, I have 38 mail
>links and no mail is getting lost, so I must not be talking to any V7
>or 4.1BSD sites.  (Utzoo doesn't count, that's only the ghost of
>V7 yet-to-come.)

Let me clear up the rumor.

The 4.1BSD version of rmail has a usage check which basically says
	if (argc < 2 || argc > 3)
		print usage message and exit

Since I wrote the 4.1BSD rmail, this is my fault.  It seemed like a
good idea at the time.

The problem applies ONLY to 4.1BSD (and 4.0BSD, I think.)  In V7,
and I think in 3BSD, rmail was a link to mail, and mail doesn't
care how many arguments it gets, it's just like a user command.

The problem has been fixed in 4.2BSD, which handles multiple arguments
to rmail properly.

The problem does not apply to System III or V, since their rmail is
still a link to mail.

There are probably still a few sites out there running 4.1BSD derived
rmail's, but they seem to be pretty rare these days.  The benefits of
sending only one copy of a piece of mail, in our opinion on the UUCP
Project, outweigh the rmail usage problems.  If anyone has a neighbor
that can't handle multiple arguments, that neighbor can tweak their
sendmail.cf  to not batch to that neighbor.

Alternatively, it's easy to fix the problem, if you have source, just
correct the usage check, which should read
	if (argc < 2)
		print usage message and exit.
If you don't have source, the 4.2BSD rmail contains no AT&T code and
can be legally gotten from any 4.2BSD site and recompiled.  I think
the invocation of sendmail must be changed to delivermail on 4.1,
and there may be minor changes to the arguments (I don't have a copy
of the 4.1 rmail around any longer to check) but it should be easy
to get right.

	Mark