summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2008-11-02 08:19:14 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2008-11-02 08:19:14 +0000
commitb33e62bb6411f728bec65268f9a485badf7e49b7 (patch)
treeba4a49d3c8d8b4c3a120c294c7e13d1b470d6bd3
parent976296766b80f6c1f853db0e217d47972405e1eb (diff)
various minor tweaks, including spelling fixes from Brian Keefer
and Jim Razmus;
-rw-r--r--usr.sbin/smtpd/ARCHITECTURE30
-rw-r--r--usr.sbin/smtpd/smtpd.810
-rw-r--r--usr.sbin/smtpd/smtpd.c3
-rw-r--r--usr.sbin/smtpd/smtpd.conf.542
4 files changed, 44 insertions, 41 deletions
diff --git a/usr.sbin/smtpd/ARCHITECTURE b/usr.sbin/smtpd/ARCHITECTURE
index 608d7d521a6..0214305de1d 100644
--- a/usr.sbin/smtpd/ARCHITECTURE
+++ b/usr.sbin/smtpd/ARCHITECTURE
@@ -6,30 +6,30 @@ Introduction
------------
The SMTP daemon is a complete mail architecture designed to provide
-an MTA and MDA for OpenBSD systems (and others !)
+an MTA and MDA for OpenBSD systems (and others!).
The SMTP daemon is configurable through a simple pf-like syntax to
select external or local delivery and the means to do so.
The SMTP Daemon relies on a fully asynchronous and event based data
transfer model. The IMSG pseudo-protocol is used throughout the daemon
-to provide communications between separate privilege-separated
+to provide communication between separate privilege-separated
processes.
The following processes are currently implemented:
- * smtp: The unpriviledged SMTP server
+ * smtp: The unprivileged SMTP server
* mfa: Mail filter agent
* queue: A queue scheduler
* mda: Local mail delivery agent
* mta: Remote mail delivery agent
- * lka: Lookup agent, handles DNS, db, file and external maps
+ * lka: Lookup agent: handles DNS, db, file and external maps
* control: External interaction gateway
The SMTP Server
---------------
-The SMTP Server conforms RFC 5321 and also provides interesting
+The SMTP Server conforms to RFC 5321 and also provides interesting
extensions such as STARTTLS (RFC 2487).
@@ -37,9 +37,9 @@ The Mail Filter Agent
---------------------
The mail filter agent has two roles. First it decides if a mail is
-allowed to be delivered by the daemon, it then performs resolution
+allowed to be delivered by the daemon, and then performs resolution
to determine the delivery method that applies to the mail, either
-local or remote. The second duty is to perform optionnal modifications
+local or remote. The second duty is to perform optional modifications
on the envelope content.
@@ -47,9 +47,9 @@ WorkFlow
--------
The base structure that traverses most of smtpd's architecture is a
-struct msg, the typical workflow is as show below from left to right:
+struct msg. The typical workflow is as shown below from left to right:
-+------+ +-----+
++------+ +-----+
| SMTP |======+ +===| MDA |
+------+ | +-----+ +-------+ | +-----+
|=====| MFA |=====| Queue |=====|
@@ -68,7 +68,7 @@ Client -> Server workflow:
2- As envelope is gathered, the information is handed out to MFA for
validation.
-3- MFA takes decision as to wether or not the message can be delivered
+3- MFA takes decision as to whether or not the message can be delivered
locally or relayed out and notifies SMTP of its decision.
4- If message is not rejected, a file descriptor is requested from QUEUE
@@ -77,9 +77,9 @@ Client -> Server workflow:
5- Once content is written, SMTP notifies QUEUE that the content is
fully written and provides a list of recipients.
-6- QUEUE constructs batches of messages with same message id and going
+6- QUEUE constructs batches of messages with same message ID and going
to same destination, and registers them to the batch queue. It then
- writes the information on-disk so that it can recovert from a crash
+ writes the information on-disk so that it can recover from a crash
or shutdown, and notifies SMTP that message is accepted.
7- SMTP notifies client that message was accepted.
@@ -91,13 +91,13 @@ Queue workflow:
retry time based on the number of times it was tried already and
the time of last attempt. A batch may be in three states:
- a) it is either ready for processing, in which case it is
+ a) It is either ready for processing, in which case it is
handed to MDA or MTA for delivery attempt.
- b) the delay before next retry has not yet expired, the
+ b) The delay before next retry has not yet expired, the
scheduler will simply ignore it.
- c) the batch age (currently 4 days) has expired, the
+ c) The batch age (currently 4 days) has expired. The
scheduler will eventually generate a mailer daemon batch
and remove the original batch from the queue.
diff --git a/usr.sbin/smtpd/smtpd.8 b/usr.sbin/smtpd/smtpd.8
index 972dc2d4bdd..5eb3ed29eb0 100644
--- a/usr.sbin/smtpd/smtpd.8
+++ b/usr.sbin/smtpd/smtpd.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: smtpd.8,v 1.2 2008/11/01 23:42:44 sobrado Exp $
+.\" $OpenBSD: smtpd.8,v 1.3 2008/11/02 08:19:13 jmc Exp $
.\"
.\" Copyright (c) 2008, Gilles Chehade <gilles@openbsd.org>
.\" Copyright (c) 2008, Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 1 2008 $
+.Dd $Mdocdate: November 2 2008 $
.Dt SMTPD 8
.Os
.Sh NAME
@@ -34,7 +34,7 @@ is a Simple Mail Transfer Protocol
daemon which can be used as a machine's primary mail system.
.Nm
can listen on a network interface and handle SMTP
-transactions, it can also be fed messages through the standard
+transactions; it can also be fed messages through the standard
.Xr sendmail 8
interface.
.Nm
@@ -65,7 +65,7 @@ If this option is specified,
will run in the foreground and log to
.Em stderr .
.It Fl f Ar file
-Specify an altenative configuration file.
+Specify an alternative configuration file.
.It Fl n
Configtest mode.
Only check the configuration file for validity.
@@ -95,4 +95,4 @@ Unix-domain socket used for communication with
The
.Nm
program first appeared in
-.Ox 4.4 .
+.Ox 4.5 .
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 05d2f6f550b..3ff28f93c3b 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -73,7 +73,8 @@ usage(void)
{
extern char *__progname;
- fprintf(stderr, "usage: %s [-n] [-f config]\n", __progname);
+ fprintf(stderr, "usage: %s [-dnv] [-D macro=value] "
+ "[-f file]\n", __progname);
exit(1);
}
diff --git a/usr.sbin/smtpd/smtpd.conf.5 b/usr.sbin/smtpd/smtpd.conf.5
index 56c2a3737ed..2f0f69cbf49 100644
--- a/usr.sbin/smtpd/smtpd.conf.5
+++ b/usr.sbin/smtpd/smtpd.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: smtpd.conf.5,v 1.2 2008/11/02 00:01:53 sobrado Exp $
+.\" $OpenBSD: smtpd.conf.5,v 1.3 2008/11/02 08:19:13 jmc Exp $
.\"
.\" Copyright (c) 2008 Janne Johansson <jj@openbsd.org>
.\"
@@ -23,11 +23,10 @@
.Nd Simple Mail Transfer Protocol daemon configuration file
.Sh DESCRIPTION
.Nm
-is used to configure the
+is used to configure
.Xr smtpd 8 ,
a small SMTP daemon.
.Pp
-.Sh SMTPD.CONF FILE FORMAT
Lines beginning with
.Sq #
and empty lines are regarded as comments,
@@ -59,43 +58,46 @@ listen on 127.0.0.1 port $smtp_port
.Ed
.Sh EXPANSION
Some configuration directives expect expansion of their parameter at
-runtime. Such directives (for example
+runtime.
+Such directives (for example
.Ar deliver to mbox ,
.Ar deliver to maildir ,
.Ar deliver to mda ,
.Ar relay via )
may use format specifiers which will be expanded before delivery or
-relaying. The following formats are currently supported:
+relaying.
+The following formats are currently supported:
%a expands to the user part of the email address prior to the
-resolution of aliases, %u expands to the user part after aliases
-resolution and will typically be the system account, %d expands to
-the domain part of the email address.
+resolution of aliases;
+%u expands to the user part after aliases
+resolution and will typically be the system account;
+%d expands to the domain part of the email address.
+.Sh FILES
+.Bl -tag -width "/etc/mail/smtpd.confXXX" -compact
+.It Pa /etc/mail/smtpd.conf
+Default
+.Xr smtpd 8
+configuration file.
+.It Pa /var/spool/smtpd/
+Spool directories for mail during processing.
+.El
.Sh EXAMPLES
The following example configures a machine to accept local delivery
for both localhost and example.com, as well as the relaying of mail
destined for example.org through the mx1.example.org server and mail
destined for example.net through regular MX records lookup:
-.Pp
-.Bd -literal -offset listen
-.Pp
+.Bd -literal -offset indent
listen on 0.0.0.0 port 25
accept for domain "localhost" deliver to mbox "/var/mail/%u"
accept for domain "example.com" deliver to maildir "/home/%u/Maildir"
accept for domain "example.org" relay via "mx1.example.org"
accept for domain "example.net" relay
.Ed
-.Sh FILES
-.Bl -tag -width "/etc/mail/smtpd.conf" -compact
-.It Pa /var/spool/smtpd/
-Spool directories for mail during processing.
-.It Pa /etc/mail/smtpd.conf
-Default location for this file.
-.El
.Sh SEE ALSO
-.Xr smtpd 8 ,
.Xr smtpctl 8 ,
+.Xr smtpd 8 ,
.Xr smtpdb 8
.Sh HISTORY
.Xr smtpd 8
first appeared in
-.Ox 4.4 .
+.Ox 4.5 .