xref: /openbsd/usr.sbin/smtpd/smtpd.8 (revision 328c3f4b)
1.\"	$OpenBSD: smtpd.8,v 1.33 2023/03/02 17:09:53 jmc Exp $
2.\"
3.\" Copyright (c) 2012, Eric Faurot <eric@openbsd.org>
4.\" Copyright (c) 2008, Gilles Chehade <gilles@poolp.org>
5.\" Copyright (c) 2008, Pierre-Yves Ritschard <pyr@openbsd.org>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.Dd $Mdocdate: March 2 2023 $
20.Dt SMTPD 8
21.Os
22.Sh NAME
23.Nm smtpd
24.Nd Simple Mail Transfer Protocol (SMTP) daemon
25.Sh SYNOPSIS
26.Nm
27.Op Fl dFhnv
28.Op Fl D Ar macro Ns = Ns Ar value
29.Op Fl f Ar file
30.Op Fl P Ar system
31.Op Fl T Ar trace
32.Sh DESCRIPTION
33.Nm
34is a Simple Mail Transfer Protocol
35.Pq SMTP
36daemon which can be used as a machine's primary mail system.
37.Nm
38can listen on a network interface and handle SMTP
39transactions; it can also be fed messages through the standard
40.Xr sendmail 8
41interface.
42It can relay messages through remote mail transfer agents or store them
43locally using either the mbox or maildir format.
44This implementation supports SMTP as defined by RFC 5321 as well as several
45extensions.
46A running
47.Nm
48can be controlled through
49.Xr smtpctl 8 .
50.Pp
51The options are as follows:
52.Bl -tag -width Ds
53.It Fl D Ar macro Ns = Ns Ar value
54Define
55.Ar macro
56to be set to
57.Ar value
58on the command line.
59Overrides the definition of
60.Ar macro
61in the configuration file.
62.It Fl d
63Do not daemonize.
64If this option is specified,
65.Nm
66will run in the foreground and log to
67.Em stderr .
68.It Fl F
69Do not daemonize.
70If this option is specified,
71.Nm
72will run in the foreground and log to
73.Xr syslogd 8 .
74.It Fl f Ar file
75Specify an alternative configuration file.
76.It Fl h
77Display version and usage.
78.It Fl n
79Configtest mode.
80Only check the configuration file for validity.
81.It Fl P Ar system
82Pause a specific subsystem at startup.
83Normal operation can be resumed using
84.Xr smtpctl 8 .
85This option can be used multiple times.
86The accepted values are:
87.Pp
88.Bl -tag -width "smtpXXX" -compact
89.It mda
90Do not schedule local deliveries.
91.It mta
92Do not schedule remote transfers.
93.It smtp
94Do not listen on SMTP sockets.
95.El
96.It Fl T Ar trace
97Enables real-time tracing at startup.
98Normal operation can be resumed using
99.Xr smtpctl 8 .
100This option can be used multiple times.
101The accepted values are:
102.Pp
103.Bl -bullet -compact
104.It
105imsg
106.It
107io
108.It
109smtp (incoming sessions)
110.It
111filters
112.It
113transfer (outgoing sessions)
114.It
115bounce
116.It
117scheduler
118.It
119expand (aliases/virtual/forward expansion)
120.It
121lookup (user/credentials lookups)
122.It
123stat
124.It
125rules (matched by incoming sessions)
126.It
127mproc
128.It
129all
130.El
131.It Fl v
132Produce more verbose output.
133.El
134.Sh FILES
135.Bl -tag -width "/etc/mail/smtpd.confXXX" -compact
136.It Pa /etc/mail/mailname
137Alternate server name to use.
138.It Pa /etc/mail/smtpd.conf
139Default
140.Nm
141configuration file.
142.It Pa /var/run/smtpd.sock
143.Ux Ns -domain
144socket used for communication with
145.Xr smtpctl 8 .
146.It Pa /var/spool/smtpd/
147Spool directories for mail during processing.
148.It Pa ~/.forward
149User email forwarding information.
150.El
151.Sh SEE ALSO
152.Xr forward 5 ,
153.Xr smtpd.conf 5 ,
154.Xr mailwrapper 8 ,
155.Xr smtpctl 8
156.Sh STANDARDS
157.Rs
158.%A J. Klensin
159.%D October 2008
160.%R RFC 5321
161.%T Simple Mail Transfer Protocol
162.Re
163.Sh HISTORY
164The
165.Nm
166program first appeared in
167.Ox 4.6 .
168