SMTP(8)

NAME
smtp - zmailer SMTP client transport agent

SYNOPSIS
smtp [ -78deEHrPsVxW ] [ -c channel ] [ -h heloname ] [ -l logfile ] [ -p remote-port ] [ -T timeout ] [ -F forcedest ] [ -L localidentity ] host

DESCRIPTION
smtp is a ZMailer transport agent which is usually only run by the scheduler(8) to transfer messages to a remote Internet host using the SMTP protocol. The smtp program must be run with the same current directory as the scheduler, namely POSTOFFICE/transport.

The program scans the message control files named on stdin for addresses destined for its channel and the host given on the command line. If any are found, all matching addresses and messages are transferred in a single SMTP conversation. The destination host might in fact be served by any available mail exchanger for that host.

OPTIONS

-7  forces SMTP channel to be 7-bit, and thus forcing all 8-bit texts to be MIME-QP-encoded for the transport.

-8  forces SMTP channel to be 8-bit-clean, and as such, to decode the message while transporting it (is it is MIME QP encoded).

-c channel
    specifies which channel name should be keyed on. The default is smtp.

-d  turns on debugging output.

-e  asks that for every destination address specification with a matching channel name, an MX lookup is done on the hostname to see whether the currently connected host can provide service for that destination. The default is to just do a textual name comparison with the destination hostname as given on the command line.

-E  use the "EHLO"-greeting only if the remote server initial banner reports "ESMTP" on it.

-h host
    specifies the hostname for the SMTP HELO greeting. The default is the hostname of the local system, as returned by gethostname(2) or uname(2).

-F forcedest
    overrides delivery destination by forceing all email to be sent to given forcedest IP-number/hostname.

-H  Disable the per default active forced 8-bit headers conversion into MIME-2-format.

-L localident
    specifies (for multi-homed machines) that they should use specified identity when connecting to the destination. Think of server with multiple IP numbers due to virtual hosting, for example. At such systems there may be situation when virtual identity needs to be used for reaching the destination system.

-l logfile
    specifies a log file where the complete SMTP command transaction will be copied. Each line in the log will be prefixed with the process id of the transport agent process, so the same log file can be used by all SMTP clients.

-r  asks to set up SMTP connections using a source TCP port number under 1024. This is in the range of port numbers only available to a privileged process on some UNIX systems, which has led to some misguided attempts at mail security based on this mechanism.

-s  asks to report the progress of the SMTP conversation and data transfer on the command line in a way that will be visible to ps(1).

-x  turns off MX lookups on delivery connections. This may be used ignore public MX knowledge and do exactly what the router says in cases where delivering to an explicit IP address is inappropriate.

-P  disable SMTP-PIPELINING usage (ESMTP keyword: PIPELINING)

-T timeout
    specifies the timeout, in seconds, when waiting for a response to an SMTP command. The timeout applies to all SMTP command-response exchanges except for the acknowledgement after terminating the DATA portion of a message transaction (after sending the "." CRLF sequence). The default timeout is 10 minutes, the minimum acceptable value is 5 seconds. The timeout on the DATA acknowledgement is very large, at least 24 hours.

-V  prints a version message and exits.

-W  turns on the DNS WKS checking, and if the remote system does not have SMTP in its WKS-bits, email delivery to such address is aborted with an error message.

INTERFACE
This program reads in processable file names relative to the current working directory of the scheduler (namely: $POSTIOFFICE/transport/). Optionally on the same line the scheduler may tell which host is to be looked for from the recipients of the message.

	relative-spool-path [ <TAB> hostname ]

This program produces diagnostic output on the standard output. Normal diagnostic output is of the form:

	id/offset<TAB>notify-data<TAB>status message

where id is the inode number of the message file, offset is a byte offset within its control file where the address being reported on is kept, status is one of ok, error, or deferred, and the message is descriptive text associated with the report. The text is terminated by a linefeed. Any other format (as might be produced by subprocesses) is passed to standard output for logging in the scheduler log.

The exit status is a code from <sysexits.h>.

EXTENDED SMTP
When user sends out 8-bit mail with proper headers, this module can send it out to conforming servers either in 8-bit transparent manner, or down-converting Content-Transfer-Encoding: 8BIT to Content-Transfer-Encoding: 7BIT or Content-Transfer-Encoding: QUOTED-PRINTABLE depending on what is the mail contents.
This works only with Content-Type: text/plain thus no fancy multipart/alternate et.al. schemes..
When Content-Transfer-Encoding: -header is not present in the headers, and recipient has not declared 8-bit SMTP capability, mail contents are treated with old 7-bit stripping method.

FILES
/etc/zmailer.conf
/var/spool/postoffice (POSTOFFICE)

SEE ALSO
scheduler(8)
RFC821, RFC1123, RFC1341, RFC1651, RFC1652, RFC1653, RFC1428

AUTHOR
This program authored and copyright by:
Rayan Zachariassen <rayan@cs.toronto.edu>
MIME downconverting feature (RFC1428) by:
Matti Aarnio <mea@utu.fi>