-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostoffice.8.in
287 lines (287 loc) · 6.97 KB
/
postoffice.8.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
.\" Copyright (c) 1988, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" %A%
.\"
.Dd November 21, 2004
.Dt POSTOFFICE 8
.Os MASTODON 4
.Sh NAME
.Nm postoffice
.Nd internet mail server
.Sh SYNOPSIS
.Nm
.Op Ar flags
.Op Ar address ...
.Sh DESCRIPTION
.Nm
accepts and delivers mail on
.Em TCP/IP
networks. It includes a mail
.Em greylist ,
uses
.Sy "TCP wrappers"
to restrict client access,
and can be configured to run antivirus
.\" and antispam
software before accepting mail for delivery.
.Pp
With no flags,
.Nm
reads its standard input
up to an end-of-file
and sends a copy of the message found there
to all of the addresses listed on the command line.
.Pp
Local addresses are looked up in a file
and aliased appropriately.
.Pp
Flags are:
.Bl -tag -width Fl
.It Fl a
Start SMTP servers with session auditing enabled.
If session logging is enabled,
.Nm
will log all sorts of information about each
SMTP session to the syslog. See
.Xr mailaudit 5
for details about the format of the audit records.
.It Fl bd
Run as a daemon.
.Nm
will fork and run in background
listening on socket 25 for incoming SMTP
connections.
.It Fl bD
Run as a service.
.Nm
will run in the foreground
listening on socket 25 for incoming SMTP connections.
.It Fl bi
Initialize the alias database.
@VHOST@If a
@[email protected] host
@VHOST@is passed on the command line,
@[email protected] Postoffice
@VHOST@will rebuild the aliases file for that virtual host, otherwise
@VHOST@it will rebuild the system alias file
@[email protected] /etc/aliases .
.It Fl bm
Deliver mail in the usual way (default).
.It Fl bp
Print a listing of the queue.
.It Fl bq
Process messages in the queue.
.It Fl bs
Use the SMTP
protocol as described in
.Em RFC821
on standard input and output.
.It Fl C Ns Ar file
Read options from the named configuration file instead of from
.Pa @confdir@/postoffice.cf .
.It Fl d
When running as a daemon,
.Nm
will not fork and run in the background, but will instead stay
attached to the controlling terminal.
.\" .It Fl d Ns Ar X
.\" Set debugging value to
.\" .Ar X .
.It Fl f Ns Ar name
Sets the name of the
.Ql from
person
(i.e., the sender of the mail).
.Fl f
can only be used
by
.Em root
or if the person you are trying to become
is the same as the person you are.
.It Fl o Ns Ar x Ns = Ns value
Set option
.Ar x
to the specified
.Em value .
Options are described in the
.Xr postoffice.cf 5
manpage.
.It Fl q
An alternate form of the
.Fl bq
flag.
.It Fl q Ns Ar X
Start a daemon to process the mail queue
every
.Ar X
minutes.
.\" .It Fl M Ns Ar ident
.\" Process the queued message with the queue id
.\" .Ar ident .
.\" .It Fl R Ns Ar addr
.\" Process the queued messages that have the string
.\" .Ar addr
.\" in one of the recipient addresses.
.\" .It Fl S Ns Ar addr
.\" Process the queued messages that have the string
.\" .Ar addr
.\" in the sender address.
.It Fl r Ns Ar name
An alternate form of the
.Fl f
flag.
.It Fl v
Go into verbose mode.
.It Fl V
Report version information for this copy of
postoffice, then exit successfully.
.El
.Pp
Various processing options can be set when
.Nm
is started.
Options may be set either on the command line
using the
.Fl o
flag,
in the configuration file
.Pa @confdir@/postoffice.cf ,
or in a configuration file specified by the
.Fl C
flag.
.Pp
In aliases,
the first character of a name may be
a vertical bar to cause interpretation of
the rest of the name as a command
to pipe the mail to.
It may be necessary to quote the name
to keep
.Nm
from suppressing the blanks from between arguments.
For example, a common alias is:
.Pp
.Bd -literal -offset indent -compact
msgs: "|/usr/bin/msgs -s"
.Ed
.Pp
.Nm
returns an exit status
describing what it did.
The codes are defined in
.Aq Pa sysexits.h :
.Bl -tag -width EX_UNAVAILABLE -compact -offset indent
.It Dv EX_OK
Successful completion on all addresses.
.It Dv EX_NOUSER
User name not recognized.
.It Dv EX_UNAVAILABLE
Catchall meaning necessary resources
were not available.
.It Dv EX_SYNTAX
Syntax error in address.
.It Dv EX_SOFTWARE
Internal software error,
including bad arguments.
.It Dv EX_OSERR
Temporary operating system error,
such as
.Dq cannot fork .
.It Dv EX_OSFILE
.Pa @confdir@/postoffice.cf
or
.Pa @confdir@
is world writable or is not owned by
.Ar root .
.It Dv EX_NOPERM
You do not have sufficient permissions.
.It Dv EX_IOERR
.Nm
was unable to create or write a file.
.El
.Pp
If invoked as
.Sy newaliases ,
.Nm
will rebuild the alias database.
If invoked as
.Sy mailq ,
.Nm
will print the contents of the mail queue.
If invoked as
.Sy runq ,
.Nm
will run through the mail queue and make what deliveries are possible.
If invoked as
.Sy smtpd ,
.Nm
runs as a SMTP daemon.
.Sh FILES
.Pp
.Bl -tag -width /var/db/smtpauth.db -compact
.It Pa @confdir@/postoffice.cf
Default
.Nm
options.
.It Pa /etc/aliases
raw data for alias names.
.It Pa /etc/aliases.db
data base of alias names.
.It Pa /etc/issue.smtp
smtp server welcome banner.
.It Pa /var/spool/mqueue/*
temp files.
.It Pa /var/db/smtpauth.db
.Sy greylist
database.
.El
.Sh SEE ALSO
.Xr mail 1 ,
.Xr rmail 1 ,
.Xr syslog 3 ,
.Xr aliases 5 ,
@[email protected] domains.cf 5 ,
.Xr mailaudit 5 ,
.Xr postoffice.cf 5 ,
.Xr smtpauth 5 ,
.Xr usermap 7 ,
@[email protected] vhosts 7 ,
.Xr mailaddr 7 ,
.Xr authexpire 8 ,
.Xr sendmail 8 ,
.Xr smtpd 8 ;
.Pp
DARPA
Internet Request For Comments
.%T RFC819 ,
.%T RFC821 ,
.%T RFC822 .