autoupdate
[postfix-master.git] / postfix-master / smtp-sink.1.html
blob18768e9455b4436b042ad85f2ab312e38a6070b8
1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html> <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
5 <title> Postfix manual - smtp-sink(1) </title>
6 </head> <body> <pre>
7 SMTP-SINK(1) SMTP-SINK(1)
9 <b>NAME</b>
10 smtp-sink - multi-threaded SMTP/LMTP test server
12 <b>SYNOPSIS</b>
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>
17 <b>DESCRIPTION</b>
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
21 protocol compliance.
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
27 magnitude.
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-
32 gram.
34 Note: this is an unsupported test program. No attempt is
35 made to maintain compatibility between successive ver-
36 sions.
38 Arguments:
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>-b</b> <i>soft-bounce-reply</i>
58 Use <i>soft-bounce-reply</i> for soft reject responses.
59 The default reply is "450 4.3.0 Error: command
60 failed".
62 <b>-B</b> <i>hard-bounce-reply</i>
63 Use <i>hard-bounce-reply</i> for hard reject responses.
64 The default reply is "500 5.3.0 Error: command
65 failed".
67 <b>-c</b> Display running counters that are updated whenever
68 an SMTP session ends, a QUIT command is executed,
69 or when "." is received.
71 <b>-C</b> Disable XCLIENT support.
73 <b>-d</b> <i>dump-template</i>
74 Dump each mail transaction to a single-message file
75 whose name is created by expanding the <i>dump-tem-</i>
76 <i>plate</i> via strftime(3) and appending a pseudo-random
77 hexadecimal number (example: "%Y%m%d%H/%M." expands
78 into "2006081203/05.809a62e3"). If the template
79 contains "/" characters, missing directories are
80 created automatically. The message dump format is
81 described below.
83 Note: this option keeps one capture file open for
84 every mail transaction in progress.
86 <b>-D</b> <i>dump-template</i>
87 Append mail transactions to a multi-message dump
88 file whose name is created by expanding the <i>dump-</i>
89 <i>template</i> via strftime(3). If the template contains
90 "/" characters, missing directories are created
91 automatically. The message dump format is
92 described below.
94 Note: this option keeps one capture file open for
95 every mail transaction in progress.
97 <b>-e</b> Do not announce ESMTP support.
99 <b>-E</b> Do not announce ENHANCEDSTATUSCODES support.
101 <b>-f</b> <i>command,command,...</i>
102 Reject the specified commands with a hard (5xx)
103 error code. This option implies <b>-p</b>.
105 Examples of commands are CONNECT, HELO, EHLO, LHLO,
106 MAIL, RCPT, VRFY, DATA, ., RSET, NOOP, and QUIT.
107 Separate command names by white space or commas,
108 and use quotes to protect white space from the
109 shell. Command names are case-insensitive.
111 <b>-F</b> Disable XFORWARD support.
113 <b>-h</b> <i>hostname</i>
114 Use <i>hostname</i> in the SMTP greeting, in the HELO
115 response, and in the EHLO response. The default
116 hostname is "smtp-sink".
118 <b>-L</b> Enable LMTP instead of SMTP.
120 <b>-m</b> <i>count</i> (default: 256)
121 An upper bound on the maximal number of simultane-
122 ous connections that <b>smtp-sink</b> will handle. This
123 prevents the process from running out of file
124 descriptors. Excess connections will stay queued in
125 the TCP/IP stack.
127 <b>-M</b> <i>count</i>
128 Terminate after receiving <i>count</i> messages.
130 <b>-n</b> <i>count</i>
131 Terminate after <i>count</i> sessions.
133 <b>-p</b> Do not announce support for ESMTP command pipelin-
134 ing.
136 <b>-P</b> Change the server greeting so that it appears to
137 come through a CISCO PIX system. Implies <b>-e</b>.
139 <b>-q</b> <i>command,command,...</i>
140 Disconnect (without replying) 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>-Q</b> <i>command,command,...</i>
150 Send a 421 reply and disconnect after receiving one
151 of the specified commands.
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>command,command,...</i>
160 Reject the specified commands with a soft (4xx)
161 error code. This option implies <b>-p</b>.
163 Examples of commands are CONNECT, HELO, EHLO, LHLO,
164 MAIL, RCPT, VRFY, DATA, ., RSET, NOOP, and QUIT.
165 Separate command names by white space or commas,
166 and use quotes to protect white space from the
167 shell. Command names are case-insensitive.
169 <b>-R</b> <i>root-directory</i>
170 Change the process root directory to the specified
171 location. This option requires super-user privi-
172 leges. See also the <b>-u</b> option.
174 <b>-s</b> <i>command,command,...</i>
175 Log the named commands to syslogd.
177 Examples of commands are CONNECT, HELO, EHLO, LHLO,
178 MAIL, RCPT, VRFY, DATA, ., RSET, NOOP, and QUIT.
179 Separate command names by white space or commas,
180 and use quotes to protect white space from the
181 shell. Command names are case-insensitive.
183 <b>-S start-string</b>
184 An optional string that is prepended to each mes-
185 sage that is written to a dump file (see the dump
186 file format description below). The following C
187 escape sequences are supported: \a (bell), \b
188 (backslace), \f (formfeed), \n (newline), \r (car-
189 riage return), \t (horizontal tab), \v (vertical
190 tab), \<i>ddd</i> (up to three octal digits) and \\ (the
191 backslash character).
193 <b>-t</b> <i>timeout</i> (default: 100)
194 Limit the time for receiving a command or sending a
195 response. The time limit is specified in seconds.
197 <b>-T</b> <i>windowsize</i>
198 Override the default TCP window size. To work
199 around broken TCP window scaling implementations,
200 specify a value &gt; 0 and &lt; 65536.
202 <b>-u</b> <i>username</i>
203 Switch to the specified user privileges after open-
204 ing the network socket and optionally changing the
205 process root directory. This option is required
206 when the process runs with super-user privileges.
207 See also the <b>-R</b> option.
209 <b>-v</b> Show the SMTP conversations.
211 <b>-w</b> <i>delay</i>
212 Wait <i>delay</i> seconds before responding to a DATA com-
213 mand.
215 <b>-W</b> <i>command:delay[:odds]</i>
216 Wait <i>delay</i> seconds before responding to <i>command</i>.
217 If <i>odds</i> is also specified (a number between 1-99
218 inclusive), wait for a random multiple of <i>delay</i>.
219 The random multiplier is equal to the number of
220 times the program needs to roll a dice with a range
221 of 0..99 inclusive, before the dice produces a
222 result greater than or equal to <i>odds</i>.
224 [<b>inet:</b>][<i>host</i>]:<i>port</i>
225 Listen on network interface <i>host</i> (default: any
226 interface) TCP port <i>port</i>. Both <i>host</i> and <i>port</i> may be
227 specified in numeric or symbolic form.
229 <b>unix:</b><i>pathname</i>
230 Listen on the UNIX-domain socket at <i>pathname</i>.
232 <i>backlog</i>
233 The maximum length the queue of pending connec-
234 tions, as defined by the <b>listen</b>(2) system call.
236 <b>DUMP FILE FORMAT</b>
237 Each dumped message contains a sequence of text lines,
238 terminated with the newline character. The sequence of
239 information is as follows:
241 <b>o</b> The optional string specified with the <b>-S</b> option.
243 <b>o</b> The <b>smtp-sink</b> generated headers as documented
244 below.
246 <b>o</b> The message header and body as received from the
247 SMTP client.
249 <b>o</b> An empty line.
251 The format of the <b>smtp-sink</b> generated headers is as fol-
252 lows:
254 <b>X-Client-Addr:</b> <i>text</i>
255 The client IP address without enclosing []. An IPv6
256 address is prefixed with "ipv6:". This record is
257 always present.
259 <b>X-Client-Proto:</b> <i>text</i>
260 The client protocol: SMTP, ESMTP or LMTP. This
261 record is always present.
263 <b>X-Helo-Args:</b> <i>text</i>
264 The arguments of the last HELO or EHLO command
265 before this mail delivery transaction. This record
266 is present only if the client sent a recognizable
267 HELO or EHLO command before the DATA command.
269 <b>X-Mail-Args:</b> <i>text</i>
270 The arguments of the MAIL command that started this
271 mail delivery transaction. This record is present
272 exactly once.
274 <b>X-Rcpt-Args:</b> <i>text</i>
275 The arguments of an RCPT command within this mail
276 delivery transaction. There is one record for each
277 RCPT command, and they are in the order as sent by
278 the client.
280 <b>Received:</b> <i>text</i>
281 A message header for compatibility with mail pro-
282 cessing software. This three-line header marks the
283 end of the headers provided by <b>smtp-sink</b>, and is
284 formatted as follows:
286 <b>from</b> <i>helo</i> <b>([</b><i>addr</i><b>])</b>
287 The HELO or EHLO command argument and client
288 IP address. If the client did not send HELO
289 or EHLO, the client IP address is used
290 instead.
292 <b>by</b> <i>host</i> <b>(smtp-sink) with</b> <i>proto</i> <b>id</b> <i>random</i><b>;</b>
293 The hostname specified with the <b>-h</b> option,
294 the client protocol (see <b>X-Client-Proto</b>
295 above), and the pseudo-random portion of the
296 per-message capture file name.
298 <i>time-stamp</i>
299 A time stamp as defined in <a href="http://tools.ietf.org/html/rfc2822">RFC 2822</a>.
301 <b>SEE ALSO</b>
302 <a href="smtp-source.1.html">smtp-source(1)</a>, SMTP/LMTP message generator
304 <b>LICENSE</b>
305 The Secure Mailer license must be distributed with this
306 software.
308 <b>AUTHOR(S)</b>
309 Wietse Venema
310 IBM T.J. Watson Research
311 P.O. Box 704
312 Yorktown Heights, NY 10598, USA
314 SMTP-SINK(1)
315 </pre> </body> </html>