Sun Microsystems Sun Workstation 100U System Manager's Manual page 319

Table of Contents

Advertisement

SENDMAIL
4
2.2.2. SMTP over plpea
The SMTP protocol [Postel82) can be used
to
run an interactive lock-step inter-
race with the mailer. A subprocess
is
still created, but no recipient addresses are passed
to the mailer via the argument list. Instead, they are passed one
at
a time in com-
mands sent to the processes standard input. Anything appearing on the standard out-
put must be a reply code in a special format.
2.2.3. SMTP over an IPC connection
This technique is similar to the previous technique, except that it uses a 4.2BSD
IPC channel
(UNIX83).
This method is exceptionally flexible in that the mailer need
not reside on the same machine. It is normally used to connect
to
a sendmail process
on another machine.
2.3. Operational Description
When a sender wants to send a message, it issues a request to BendmtJiI using one of
the three methods described above. SendmtJiI operates in two distinct phases. In the first
phase, it collects and stores the message. In the second phase, message delivery occurs. If
there were errors during processing during the second phase, BendmtJiI creates and returns a
new message describing the error and/or returns an status code telling what went wrong.
2.3.1. Argument proceulng and addr_ par.Ing
If aendmtJil is called using one of the two subprocess techniques, the arguments are
first scanned and option specifications are processed. Recipient addresses are then col-
lected, either from the command line or from the SMTP RePT command, and a list 01
recipients is created. Aliases are expanded at this step, including mailing lists.
As
much validation as possible of the addresses is done at this step: syntax is checked, and
local addresses are verified, but detailed checking of host names and addresses is
deferred until delivery. Forwarding is also performed as the local addresses are verified.
Sendmail appends each address
to
the recipient list after parsing. When a name is
aliased or forwarded, the old name is retained in the list, and a flag is set that tells the
delivery phase to ignore this recipient. This list is kept free from duplicates, preventin&
alias loops and duplicate messages deliverd to the same recipient, as might occur if a
person is in two groups.
2.3.2. Meaaale coUectlon
Send mail then collects the message. The message should have a header at the
beginning. No rormatting requirements are imposed on the message except that they
must be lines or text (in other words, binary data is not allowed). The header is parsed
and stored in memory, and the body
01
the message is saved in a temporary file.
To simpliry the program interface, the message is collected even if no addresses
were valid. The message will be returned with an error.
2.3.3. Message deDvery
For each unique mailer and host in the recipient list, BendmtJiI calls the appropri-
ate mailer. Each mailer invocation sends
to
all users receiving the message on one host.
Mailers that only accept one recipient at a time are handled properly.
The message is sent to the mailer using one of the same three interfaces used to
submit a message to sendmail. Each copy of the message is prepended by a customized
header. The mailer status code
is
caught and checked, and a suitable error message
given as appropriate. The exit code must conform to a system standard or a generic
message ("Service unavailable") is given.
Ver.lon 4.1
DRAFT
Last Mod 8/JO/83

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sun workstation 150u

Table of Contents