BATCHMAI
========

Purpose:
--------

To convert the *.bm files (see bm(4)) generated by the RMAIL program
(see rmail(1)) to a format suitable for transmission to the remote
system.

Usage:
------

	batchmai -s [-c<bits>] [-b<size>] smailsite ...
	batchmai -s [-f] [-g] [-b<size>] smailsite ...
	batchmai -r rmailsite ...
	batchmai site ...

Normally, UUWORK and LOGIN automatically call BATCHMAI. It is
advisable to call BATCHMAI as part of the doqueue script for
every site that polls your system to collect mail to save time
in the uucico startup phase. Failure to do so may result in
the remote system giving up because of a timeout.

BATCHMAI works in one of two modes: rmail mode (compatible with
every UUCP implementation, but less efficient) and smtp mode.
Smtp mode supports various sub-modes: plain, compressed, frozen,
and gzipped. The -r options specifies rmail mode, the -s option 
smtp mode. If none are given, the MAILMODE file is searched 
(see mailmode(4)), rmail being the default if that fails.

SMTP MODE

In smtp mode, mails are collected into batches (size specifies the
maximum size before compression, in Kbytes), and the batches are
sent to the r-command "rsmtp" (if no compression occurs, i e bits is
missing or zero), "rcsmtp" (if compression occurs), "rfsmtp" (if
freeze(1) is used for compression, selected by the -f option). or
"rgsmtp" (if gzip(1) is used for compressen, selected by the -g option).
The SMTP mail format is described in RFC821. In fact, RFC821 describes
interactive SMTP sessions, but the batches are just the part of the
sending system collected into a file. If no batch size is specified,
every mail is sent as a batch of its own.

You must have a MDBS file (see mdbs(1) and mdbs(4)) to use smtp mode.

RMAIL MODE

This is the standard mode for UUCP mail exchange. If you do not know if
your neighbors understand SMTP batches, use RMAIL mode (or ask :-).
