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