There are three ways
both in receiving and in sending mail.
using the conventional UNIX system argument vector/return status
speaking SMTP over a pair of UNIX system pipes
speaking SMTP over a socket
For simplicity, the following descriptions of these three
methods assume sendmail is sending to a mailer.
Argument vector/exit status
This technique is the standard UNIX system method
for communicating with a process.
A list of recipients is sent in the argument vector,
and the message is sent on the standard input.
This is the method by which sendmail communicates with
execmail, rmail, lmail, and uux.
Anything that the recipient mailer prints
is simply collected and sent back to the mail sender
if there were any problems.
The exit status from the mailer is collected
after the message is sent,
and a diagnostic is printed if appropriate.
SMTP over pipes
The SMTP protocol
can be used to run an interactive lock-step interface
with a mailer over a pair of named pipes.
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 commands sent to the mailer's standard input.
Anything appearing on the mailer's standard output
must be an SMTP reply code.
This method is not used in the standard configuration.
This method is useful when the mailer is a program, such as
lmail, but the number of recipients is larger than
the allowable number of arguments that can be passed in the
SMTP over a socket
This method is similar to SMTP over pipes,
except that it uses a socket.
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.
This is the method by which sendmail routes and receives mail across
the Internet via TCP/IP.
Mail to files and programs
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003