1SMTP-SINK(1)                General Commands Manual               SMTP-SINK(1)
2
3
4

NAME

6       smtp-sink - multi-threaded SMTP/LMTP test server
7

SYNOPSIS

9       smtp-sink [options] [inet:][host]:port backlog
10
11       smtp-sink [options] unix:pathname backlog
12

DESCRIPTION

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       -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       -L     Enable LMTP instead of SMTP.
102
103       -m count (default: 256)
104              An upper bound on the maximal number of simultaneous connections
105              that smtp-sink will handle. This prevents the process from  run‐
106              ning  out  of  file  descriptors.  Excess  connections will stay
107              queued in the TCP/IP stack.
108
109       -M count
110              Terminate after receiving count messages.
111
112       -n count
113              Terminate after count sessions.
114
115       -p     Do not announce support for ESMTP command pipelining.
116
117       -P     Change the server greeting so that it appears to come through  a
118              CISCO PIX system. Implies -e.
119
120       -q command,command,...
121              Disconnect  (without replying) after receiving one of the speci‐
122              fied commands.
123
124              Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL,  RCPT,
125              VRFY,  DATA,  ., RSET, NOOP, and QUIT. Separate command names by
126              white space or commas, and use quotes  to  protect  white  space
127              from the shell. Command names are case-insensitive.
128
129       -Q command,command,...
130              Send a 421 reply and disconnect after receiving one of the spec‐
131              ified commands.
132
133              Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL,  RCPT,
134              VRFY,  DATA,  ., RSET, NOOP, and QUIT. Separate command names by
135              white space or commas, and use quotes  to  protect  white  space
136              from the shell. Command names are case-insensitive.
137
138       -r command,command,...
139              Reject  the  specified  commands  with  a soft (4xx) error code.
140              This option implies -p.
141
142              Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL,  RCPT,
143              VRFY,  DATA,  ., RSET, NOOP, and QUIT. Separate command names by
144              white space or commas, and use quotes  to  protect  white  space
145              from the shell. Command names are case-insensitive.
146
147       -R root-directory
148              Change  the  process  root  directory to the specified location.
149              This option requires super-user  privileges.  See  also  the  -u
150              option.
151
152       -s command,command,...
153              Log the named commands to syslogd.
154
155              Examples  of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
156              VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command  names  by
157              white  space  or  commas,  and use quotes to protect white space
158              from the shell. Command names are case-insensitive.
159
160       -S start-string
161              An optional string that is prepended to  each  message  that  is
162              written  to  a  dump  file (see the dump file format description
163              below). The following  C  escape  sequences  are  supported:  \a
164              (bell),  \b  (backslace),  \f (formfeed), \n (newline), \r (car‐
165              riage return), \t (horizontal tab), \v (vertical tab), \ddd  (up
166              to three octal digits) and \\ (the backslash character).
167
168       -t timeout (default: 100)
169              Limit  the  time  for receiving a command or sending a response.
170              The time limit is specified in seconds.
171
172       -T windowsize
173              Override the default TCP window size. To work around broken  TCP
174              window scaling implementations, specify a value > 0 and < 65536.
175
176       -u username
177              Switch  to  the specified user privileges after opening the net‐
178              work socket and optionally changing the process root  directory.
179              This  option  is  required when the process runs with super-user
180              privileges. See also the -R option.
181
182       -v     Show the SMTP conversations.
183
184       -w delay
185              Wait delay seconds before responding to a DATA command.
186
187       -W command:delay[:odds]
188              Wait delay seconds before responding to  command.   If  odds  is
189              also  specified  (a  number  between 1-99 inclusive), wait for a
190              random multiple of delay. The random multiplier is equal to  the
191              number of times the program needs to roll a dice with a range of
192              0..99 inclusive, before the dice produces a result greater  than
193              or equal to odds.
194
195       [inet:][host]:port
196              Listen  on  network  interface host (default: any interface) TCP
197              port port. Both host and port may be  specified  in  numeric  or
198              symbolic form.
199
200       unix:pathname
201              Listen on the UNIX-domain socket at pathname.
202
203       backlog
204              The  maximum length the queue of pending connections, as defined
205              by the listen(2) system call.
206

DUMP FILE FORMAT

208       Each dumped message contains a sequence of text lines, terminated  with
209       the newline character. The sequence of information is as follows:
210
211       ·      The optional string specified with the -S option.
212
213       ·      The smtp-sink generated headers as documented below.
214
215       ·      The message header and body as received from the SMTP client.
216
217       ·      An empty line.
218
219       The format of the smtp-sink generated headers is as follows:
220
221       X-Client-Addr: text
222              The  client  IP address without enclosing []. An IPv6 address is
223              prefixed with "ipv6:". This record is always present.
224
225       X-Client-Proto: text
226              The client protocol: SMTP, ESMTP or LMTP. This record is  always
227              present.
228
229       X-Helo-Args: text
230              The  arguments of the last HELO or EHLO command before this mail
231              delivery transaction. This record is present only if the  client
232              sent  a  recognizable  HELO or EHLO command before the DATA com‐
233              mand.
234
235       X-Mail-Args: text
236              The arguments of the MAIL command that started this mail  deliv‐
237              ery transaction. This record is present exactly once.
238
239       X-Rcpt-Args: text
240              The  arguments  of  an  RCPT  command  within this mail delivery
241              transaction. There is one record for each RCPT command, and they
242              are in the order as sent by the client.
243
244       Received: text
245              A  message  header  for compatibility with mail processing soft‐
246              ware. This three-line header marks the end of the  headers  pro‐
247              vided by smtp-sink, and is formatted as follows:
248
249              from helo ([addr])
250                     The  HELO or EHLO command argument and client IP address.
251                     If the client did not send HELO or EHLO,  the  client  IP
252                     address is used instead.
253
254              by host (smtp-sink) with proto id random;
255                     The  hostname  specified  with  the -h option, the client
256                     protocol (see X-Client-Proto above), and the  pseudo-ran‐
257                     dom portion of the per-message capture file name.
258
259              time-stamp
260                     A time stamp as defined in RFC 2822.
261

SEE ALSO

263       smtp-source(1), SMTP/LMTP message generator
264

LICENSE

266       The Secure Mailer license must be distributed with this software.
267

AUTHOR(S)

269       Wietse Venema
270       IBM T.J. Watson Research
271       P.O. Box 704
272       Yorktown Heights, NY 10598, USA
273
274
275
276                                                                  SMTP-SINK(1)
Impressum