1 <!doctype html public
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
5 <title> Postfix manual - smtp-sink(
1)
</title>
7 SMTP-SINK(
1) SMTP-SINK(
1)
10 smtp-sink - multi-threaded SMTP/LMTP test server
13 <b>smtp-sink
</b> [
<i>options
</i>] [
<b>inet:
</b>][
<i>host
</i>]:
<i>port backlog
</i>
15 <b>smtp-sink
</b> [
<i>options
</i>]
<b>unix:
</b><i>pathname backlog
</i>
18 <b>smtp-sink
</b> listens on the named host (or address) and port.
19 It takes SMTP messages from the network and throws them
20 away. The purpose is to measure client performance, not
23 <b>smtp-sink
</b> may also be configured to capture each mail
24 delivery transaction to file. Since disk latencies are
25 large compared to network delays, this mode of operation
26 can reduce the maximal performance by several orders of
29 Connections can be accepted on IPv4 or IPv6 endpoints, or
30 on UNIX-domain sockets. IPv4 and IPv6 are the default.
31 This program is the complement of the
<a href=
"smtp-source.1.html"><b>smtp-source
</b>(
1)
</a> pro-
34 Note: this is an unsupported test program. No attempt is
35 made to maintain compatibility between successive ver-
40 <b>-
4</b> Support IPv4 only. This option has no effect when
41 Postfix is built without IPv6 support.
43 <b>-
6</b> Support IPv6 only. This option is not available
44 when Postfix is built without IPv6 support.
46 <b>-
8</b> Do not announce
8BITMIME support.
48 <b>-a
</b> Do not announce SASL authentication support.
50 <b>-A
</b> <i>delay
</i>
51 Wait
<i>delay
</i> seconds after responding to DATA, then
52 abort prematurely with a
550 reply status. Do not
53 read further input from the client; this is an
54 attempt to block the client before it sends
".".
55 Specify a zero delay value to abort immediately.
57 <b>-c
</b> Display running counters that are updated whenever
58 an SMTP session ends, a QUIT command is executed,
59 or when
"." is received.
61 <b>-C
</b> Disable XCLIENT support.
63 <b>-d
</b> <i>dump-template
</i>
64 Dump each mail transaction to a single-message file
65 whose name is created by expanding the
<i>dump-tem-
</i>
66 <i>plate
</i> via strftime(
3) and appending a pseudo-random
67 hexadecimal number (example:
"%Y%m%d%H/%M." expands
68 into
"2006081203/05.809a62e3"). If the template
69 contains
"/" characters, missing directories are
70 created automatically. The message dump format is
73 Note: this option keeps one capture file open for
74 every mail transaction in progress.
76 <b>-D
</b> <i>dump-template
</i>
77 Append mail transactions to a multi-message dump
78 file whose name is created by expanding the
<i>dump-
</i>
79 <i>template
</i> via strftime(
3). If the template contains
80 "/" characters, missing directories are created
81 automatically. The message dump format is
84 Note: this option keeps one capture file open for
85 every mail transaction in progress.
87 <b>-e
</b> Do not announce ESMTP support.
89 <b>-E
</b> Do not announce ENHANCEDSTATUSCODES support.
91 <b>-f
</b> <i>command,command,...
</i>
92 Reject the specified commands with a hard (
5xx)
93 error code. This option implies
<b>-p
</b>.
95 Examples of commands are CONNECT, HELO, EHLO, LHLO,
96 MAIL, RCPT, VRFY, DATA, ., RSET, NOOP, and QUIT.
97 Separate command names by white space or commas,
98 and use quotes to protect white space from the
99 shell. Command names are case-insensitive.
101 <b>-F
</b> Disable XFORWARD support.
103 <b>-h
</b> <i>hostname
</i>
104 Use
<i>hostname
</i> in the SMTP greeting, in the HELO
105 response, and in the EHLO response. The default
106 hostname is
"smtp-sink".
108 <b>-L
</b> Enable LMTP instead of SMTP.
110 <b>-m
</b> <i>count
</i> (default:
256)
111 An upper bound on the maximal number of simultane-
112 ous connections that
<b>smtp-sink
</b> will handle. This
113 prevents the process from running out of file
114 descriptors. Excess connections will stay queued in
117 <b>-M
</b> <i>count
</i>
118 Terminate after receiving
<i>count
</i> messages.
120 <b>-n
</b> <i>count
</i>
121 Terminate after
<i>count
</i> sessions.
123 <b>-p
</b> Do not announce support for ESMTP command pipelin-
126 <b>-P
</b> Change the server greeting so that it appears to
127 come through a CISCO PIX system. Implies
<b>-e
</b>.
129 <b>-q
</b> <i>command,command,...
</i>
130 Disconnect (without replying) after receiving one
131 of the specified commands.
133 Examples of commands are CONNECT, HELO, EHLO, LHLO,
134 MAIL, RCPT, VRFY, DATA, ., RSET, NOOP, and QUIT.
135 Separate command names by white space or commas,
136 and use quotes to protect white space from the
137 shell. Command names are case-insensitive.
139 <b>-Q
</b> <i>command,command,...
</i>
140 Send a
421 reply and disconnect after receiving one
141 of the specified commands.
143 Examples of commands are CONNECT, HELO, EHLO, LHLO,
144 MAIL, RCPT, VRFY, DATA, ., RSET, NOOP, and QUIT.
145 Separate command names by white space or commas,
146 and use quotes to protect white space from the
147 shell. Command names are case-insensitive.
149 <b>-r
</b> <i>command,command,...
</i>
150 Reject the specified commands with a soft (
4xx)
151 error code. This option implies
<b>-p
</b>.
153 Examples of commands are CONNECT, HELO, EHLO, LHLO,
154 MAIL, RCPT, VRFY, DATA, ., RSET, NOOP, and QUIT.
155 Separate command names by white space or commas,
156 and use quotes to protect white space from the
157 shell. Command names are case-insensitive.
159 <b>-R
</b> <i>root-directory
</i>
160 Change the process root directory to the specified
161 location. This option requires super-user privi-
162 leges. See also the
<b>-u
</b> option.
164 <b>-s
</b> <i>command,command,...
</i>
165 Log the named commands to syslogd.
167 Examples of commands are CONNECT, HELO, EHLO, LHLO,
168 MAIL, RCPT, VRFY, DATA, ., RSET, NOOP, and QUIT.
169 Separate command names by white space or commas,
170 and use quotes to protect white space from the
171 shell. Command names are case-insensitive.
173 <b>-S start-string
</b>
174 An optional string that is prepended to each mes-
175 sage that is written to a dump file (see the dump
176 file format description below). The following C
177 escape sequences are supported: \a (bell), \b
178 (backslace), \f (formfeed), \n (newline), \r (car-
179 riage return), \t (horizontal tab), \v (vertical
180 tab), \
<i>ddd
</i> (up to three octal digits) and \\ (the
181 backslash character).
183 <b>-t
</b> <i>timeout
</i> (default:
100)
184 Limit the time for receiving a command or sending a
185 response. The time limit is specified in seconds.
187 <b>-T
</b> <i>windowsize
</i>
188 Override the default TCP window size. To work
189 around broken TCP window scaling implementations,
190 specify a value
> 0 and
< 65536.
192 <b>-u
</b> <i>username
</i>
193 Switch to the specified user privileges after open-
194 ing the network socket and optionally changing the
195 process root directory. This option is required
196 when the process runs with super-user privileges.
197 See also the
<b>-R
</b> option.
199 <b>-v
</b> Show the SMTP conversations.
201 <b>-w
</b> <i>delay
</i>
202 Wait
<i>delay
</i> seconds before responding to a DATA com-
205 <b>-W
</b> <i>command:delay[:odds]
</i>
206 Wait
<i>delay
</i> seconds before responding to
<i>command
</i>.
207 If
<i>odds
</i> is also specified (a number between
1-
99
208 inclusive), wait for a random multiple of
<i>delay
</i>.
209 The random multiplier is equal to the number of
210 times the program needs to roll a dice with a range
211 of
0.
.99 inclusive, before the dice produces a
212 result greater than or equal to
<i>odds
</i>.
214 [
<b>inet:
</b>][
<i>host
</i>]:
<i>port
</i>
215 Listen on network interface
<i>host
</i> (default: any
216 interface) TCP port
<i>port
</i>. Both
<i>host
</i> and
<i>port
</i> may be
217 specified in numeric or symbolic form.
219 <b>unix:
</b><i>pathname
</i>
220 Listen on the UNIX-domain socket at
<i>pathname
</i>.
223 The maximum length the queue of pending connec-
224 tions, as defined by the
<b>listen
</b>(
2) system call.
226 <b>DUMP FILE FORMAT
</b>
227 Each dumped message contains a sequence of text lines,
228 terminated with the newline character. The sequence of
229 information is as follows:
231 <b>o
</b> The optional string specified with the
<b>-S
</b> option.
233 <b>o
</b> The
<b>smtp-sink
</b> generated headers as documented
236 <b>o
</b> The message header and body as received from the
239 <b>o
</b> An empty line.
241 The format of the
<b>smtp-sink
</b> generated headers is as fol-
244 <b>X-Client-Addr:
</b> <i>text
</i>
245 The client IP address without enclosing []. An IPv6
246 address is prefixed with
"ipv6:". This record is
249 <b>X-Client-Proto:
</b> <i>text
</i>
250 The client protocol: SMTP, ESMTP or LMTP. This
251 record is always present.
253 <b>X-Helo-Args:
</b> <i>text
</i>
254 The arguments of the last HELO or EHLO command
255 before this mail delivery transaction. This record
256 is present only if the client sent a recognizable
257 HELO or EHLO command before the DATA command.
259 <b>X-Mail-Args:
</b> <i>text
</i>
260 The arguments of the MAIL command that started this
261 mail delivery transaction. This record is present
264 <b>X-Rcpt-Args:
</b> <i>text
</i>
265 The arguments of an RCPT command within this mail
266 delivery transaction. There is one record for each
267 RCPT command, and they are in the order as sent by
270 <b>Received:
</b> <i>text
</i>
271 A message header for compatibility with mail pro-
272 cessing software. This three-line header marks the
273 end of the headers provided by
<b>smtp-sink
</b>, and is
274 formatted as follows:
276 <b>from
</b> <i>helo
</i> <b>([
</b><i>addr
</i><b>])
</b>
277 The HELO or EHLO command argument and client
278 IP address. If the client did not send HELO
279 or EHLO, the client IP address is used
282 <b>by
</b> <i>host
</i> <b>(smtp-sink) with
</b> <i>proto
</i> <b>id
</b> <i>random
</i><b>;
</b>
283 The hostname specified with the
<b>-h
</b> option,
284 the client protocol (see
<b>X-Client-Proto
</b>
285 above), and the pseudo-random portion of the
286 per-message capture file name.
289 A time stamp as defined in
<a href=
"http://tools.ietf.org/html/rfc2822">RFC
2822</a>.
292 <a href=
"smtp-source.1.html">smtp-source(
1)
</a>, SMTP/LMTP message generator
295 The Secure Mailer license must be distributed with this
300 IBM T.J. Watson Research
302 Yorktown Heights, NY
10598, USA
305 </pre> </body> </html>