1SMTP-SINK(1) General Commands Manual SMTP-SINK(1)
2
3
4
6 smtp-sink - parallelized SMTP/LMTP test server
7
9 smtp-sink [options] [inet:][host]:port backlog
10
11 smtp-sink [options] unix:pathname backlog
12
14 smtp-sink listens on the named host (or address) and port. It takes
15 SMTP messages from the network and throws them away. The purpose is to
16 measure client performance, not protocol compliance.
17
18 smtp-sink may also be configured to capture each mail delivery transac‐
19 tion to file. Since disk latencies are large compared to network
20 delays, this mode of operation can reduce the maximal performance by
21 several orders of magnitude.
22
23 Connections can be accepted on IPv4 or IPv6 endpoints, or on
24 UNIX-domain sockets. IPv4 and IPv6 are the default. This program is
25 the complement of the smtp-source(1) program.
26
27 Note: this is an unsupported test program. No attempt is made to main‐
28 tain compatibility between successive versions.
29
30 Arguments:
31
32 -4 Support IPv4 only. This option has no effect when Postfix is
33 built without IPv6 support.
34
35 -6 Support IPv6 only. This option is not available when Postfix is
36 built without IPv6 support.
37
38 -8 Do not announce 8BITMIME support.
39
40 -a Do not announce SASL authentication support.
41
42 -A delay
43 Wait delay seconds after responding to DATA, then abort prema‐
44 turely with a 550 reply status. Do not read further input from
45 the client; this is an attempt to block the client before it
46 sends ".". Specify a zero delay value to abort immediately.
47
48 -b soft-bounce-reply
49 Use soft-bounce-reply for soft reject responses. The default
50 reply is "450 4.3.0 Error: command failed".
51
52 -B hard-bounce-reply
53 Use hard-bounce-reply for hard reject responses. The default
54 reply is "500 5.3.0 Error: command failed".
55
56 -c Display running counters that are updated whenever an SMTP ses‐
57 sion ends, a QUIT command is executed, or when "." is received.
58
59 -C Disable XCLIENT support.
60
61 -d dump-template
62 Dump each mail transaction to a single-message file whose name
63 is created by expanding the dump-template via strftime(3) and
64 appending a pseudo-random hexadecimal number (example:
65 "%Y%m%d%H/%M." expands into "2006081203/05.809a62e3"). If the
66 template contains "/" characters, missing directories are cre‐
67 ated automatically. The message dump format is described below.
68
69 Note: this option keeps one capture file open for every mail
70 transaction in progress.
71
72 -D dump-template
73 Append mail transactions to a multi-message dump file whose name
74 is created by expanding the dump-template via strftime(3). If
75 the template contains "/" characters, missing directories are
76 created automatically. The message dump format is described
77 below.
78
79 Note: this option keeps one capture file open for every mail
80 transaction in progress.
81
82 -e Do not announce ESMTP support.
83
84 -E Do not announce ENHANCEDSTATUSCODES support.
85
86 -f command,command,...
87 Reject the specified commands with a hard (5xx) error code.
88 This option implies -p.
89
90 Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
91 VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command names by
92 white space or commas, and use quotes to protect white space
93 from the shell. Command names are case-insensitive.
94
95 -F Disable XFORWARD support.
96
97 -h hostname
98 Use hostname in the SMTP greeting, in the HELO response, and in
99 the EHLO response. The default hostname is "smtp-sink".
100
101 -H delay
102 Delay the first read operation after receiving DATA (time in
103 seconds). Combine with a large test message and a small TCP win‐
104 dow size (see the -T option) to test the Postfix client
105 write_wait() implementation.
106
107 -L Enable LMTP instead of SMTP.
108
109 -m count (default: 256)
110 An upper bound on the maximal number of simultaneous connections
111 that smtp-sink will handle. This prevents the process from run‐
112 ning out of file descriptors. Excess connections will stay
113 queued in the TCP/IP stack.
114
115 -M count
116 Terminate after receiving count messages.
117
118 -n count
119 Terminate after count sessions.
120
121 -N Do not announce support for DSN.
122
123 -p Do not announce support for ESMTP command pipelining.
124
125 -P Change the server greeting so that it appears to come through a
126 CISCO PIX system. Implies -e.
127
128 -q command,command,...
129 Disconnect (without replying) after receiving one of the speci‐
130 fied commands.
131
132 Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
133 VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command names by
134 white space or commas, and use quotes to protect white space
135 from the shell. Command names are case-insensitive.
136
137 -Q command,command,...
138 Send a 421 reply and disconnect after receiving one of the spec‐
139 ified commands.
140
141 Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
142 VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command names by
143 white space or commas, and use quotes to protect white space
144 from the shell. Command names are case-insensitive.
145
146 -r command,command,...
147 Reject the specified commands with a soft (4xx) error code.
148 This option implies -p.
149
150 Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
151 VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command names by
152 white space or commas, and use quotes to protect white space
153 from the shell. Command names are case-insensitive.
154
155 -R root-directory
156 Change the process root directory to the specified location.
157 This option requires super-user privileges. See also the -u
158 option.
159
160 -s command,command,...
161 Log the named commands to syslogd.
162
163 Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
164 VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command names by
165 white space or commas, and use quotes to protect white space
166 from the shell. Command names are case-insensitive.
167
168 -S start-string
169 An optional string that is prepended to each message that is
170 written to a dump file (see the dump file format description
171 below). The following C escape sequences are supported: \a
172 (bell), \b (backspace), \f (formfeed), \n (newline), \r (car‐
173 riage return), \t (horizontal tab), \v (vertical tab), \ddd (up
174 to three octal digits) and \\ (the backslash character).
175
176 -t timeout (default: 100)
177 Limit the time for receiving a command or sending a response.
178 The time limit is specified in seconds.
179
180 -T windowsize
181 Override the default TCP window size. To work around broken TCP
182 window scaling implementations, specify a value > 0 and < 65536.
183
184 -u username
185 Switch to the specified user privileges after opening the net‐
186 work socket and optionally changing the process root directory.
187 This option is required when the process runs with super-user
188 privileges. See also the -R option.
189
190 -v Show the SMTP conversations.
191
192 -w delay
193 Wait delay seconds before responding to a DATA command.
194
195 -W command:delay[:odds]
196 Wait delay seconds before responding to command. If odds is
197 also specified (a number between 1-99 inclusive), wait for a
198 random multiple of delay. The random multiplier is equal to the
199 number of times the program needs to roll a dice with a range of
200 0..99 inclusive, before the dice produces a result greater than
201 or equal to odds.
202
203 [inet:][host]:port
204 Listen on network interface host (default: any interface) TCP
205 port port. Both host and port may be specified in numeric or
206 symbolic form.
207
208 unix:pathname
209 Listen on the UNIX-domain socket at pathname.
210
211 backlog
212 The maximum length the queue of pending connections, as defined
213 by the listen(2) system call.
214
216 Each dumped message contains a sequence of text lines, terminated with
217 the newline character. The sequence of information is as follows:
218
219 · The optional string specified with the -S option.
220
221 · The smtp-sink generated headers as documented below.
222
223 · The message header and body as received from the SMTP client.
224
225 · An empty line.
226
227 The format of the smtp-sink generated headers is as follows:
228
229 X-Client-Addr: text
230 The client IP address without enclosing []. An IPv6 address is
231 prefixed with "ipv6:". This record is always present.
232
233 X-Client-Proto: text
234 The client protocol: SMTP, ESMTP or LMTP. This record is always
235 present.
236
237 X-Helo-Args: text
238 The arguments of the last HELO or EHLO command before this mail
239 delivery transaction. This record is present only if the client
240 sent a recognizable HELO or EHLO command before the DATA com‐
241 mand.
242
243 X-Mail-Args: text
244 The arguments of the MAIL command that started this mail deliv‐
245 ery transaction. This record is present exactly once.
246
247 X-Rcpt-Args: text
248 The arguments of an RCPT command within this mail delivery
249 transaction. There is one record for each RCPT command, and they
250 are in the order as sent by the client.
251
252 Received: text
253 A message header for compatibility with mail processing soft‐
254 ware. This three-line header marks the end of the headers pro‐
255 vided by smtp-sink, and is formatted as follows:
256
257 from helo ([addr])
258 The HELO or EHLO command argument and client IP address.
259 If the client did not send HELO or EHLO, the client IP
260 address is used instead.
261
262 by host (smtp-sink) with proto id random;
263 The hostname specified with the -h option, the client
264 protocol (see X-Client-Proto above), and the pseudo-ran‐
265 dom portion of the per-message capture file name.
266
267 time-stamp
268 A time stamp as defined in RFC 2822.
269
271 smtp-source(1), SMTP/LMTP message generator
272
274 The Secure Mailer license must be distributed with this software.
275
277 Wietse Venema
278 IBM T.J. Watson Research
279 P.O. Box 704
280 Yorktown Heights, NY 10598, USA
281
282 Wietse Venema
283 Google, Inc.
284 111 8th Avenue
285 New York, NY 10011, USA
286
287
288
289 SMTP-SINK(1)