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       -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       -n count
102              Terminate after count sessions. This is for testing purposes.
103
104       -p     Do not announce support for ESMTP command pipelining.
105
106       -P     Change the server greeting so that it appears to come through  a
107              CISCO PIX system. Implies -e.
108
109       -q command,command,...
110              Disconnect  (without replying) after receiving one of the speci‐
111              fied commands.
112
113              Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL,  RCPT,
114              VRFY,  DATA,  ., RSET, NOOP, and QUIT. Separate command names by
115              white space or commas, and use quotes  to  protect  white  space
116              from the shell. Command names are case-insensitive.
117
118       -r command,command,...
119              Reject  the  specified  commands  with  a soft (4xx) error code.
120              This option implies -p.
121
122              Examples of commands are CONNECT, HELO, EHLO, LHLO, MAIL,  RCPT,
123              VRFY,  DATA,  ., RSET, NOOP, and QUIT. Separate command names by
124              white space or commas, and use quotes  to  protect  white  space
125              from the shell. Command names are case-insensitive.
126
127       -R root-directory
128              Change  the  process  root  directory to the specified location.
129              This option requires super-user  privileges.  See  also  the  -u
130              option.
131
132       -s command,command,...
133              Log the named commands to syslogd.
134
135              Examples  of commands are CONNECT, HELO, EHLO, LHLO, MAIL, RCPT,
136              VRFY, DATA, ., RSET, NOOP, and QUIT. Separate command  names  by
137              white  space  or  commas,  and use quotes to protect white space
138              from the shell. Command names are case-insensitive.
139
140       -S start-string
141              An optional string that is prepended to  each  message  that  is
142              written  to  a  dump  file (see the dump file format description
143              below). The following  C  escape  sequences  are  supported:  \a
144              (bell),  \b  (backslace),  \f (formfeed), \n (newline), \r (car‐
145              riage return), \t (horizontal tab), \v (vertical tab), \ddd  (up
146              to three octal digits) and \\ (the backslash character).
147
148       -t timeout (default: 100)
149              Limit  the  time  for receiving a command or sending a response.
150              The time limit is specified in seconds.
151
152       -u username
153              Switch to the specified user privileges after opening  the  net‐
154              work  socket and optionally changing the process root directory.
155              This option is required when the process  runs  with  super-user
156              privileges. See also the -R option.
157
158       -v     Show the SMTP conversations.
159
160       -w delay
161              Wait delay seconds before responding to a DATA command.
162
163       [inet:][host]:port
164              Listen  on  network  interface host (default: any interface) TCP
165              port port. Both host and port may be  specified  in  numeric  or
166              symbolic form.
167
168       unix:pathname
169              Listen on the UNIX-domain socket at pathname.
170
171       backlog
172              The  maximum length the queue of pending connections, as defined
173              by the listen(2) system call.
174

DUMP FILE FORMAT

176       Each dumped message contains a sequence of text lines, terminated  with
177       the newline character. The sequence of information is as follows:
178
179       ·      The optional string specified with the -S option.
180
181       ·      The smtp-sink generated headers as documented below.
182
183       ·      The message header and body as received from the SMTP client.
184
185       ·      An empty line.
186
187       The format of the smtp-sink generated headers is as follows:
188
189       X-Client-Addr: text
190              The  client  IP address without enclosing []. An IPv6 address is
191              prefixed with "ipv6:". This record is always present.
192
193       X-Client-Proto: text
194              The client protocol: SMTP, ESMTP or LMTP. This record is  always
195              present.
196
197       X-Helo-Args: text
198              The  arguments of the last HELO or EHLO command before this mail
199              delivery transaction. This record is present only if the  client
200              sent  a  recognizable  HELO or EHLO command before the DATA com‐
201              mand.
202
203       X-Mail-Args: text
204              The arguments of the MAIL command that started this mail  deliv‐
205              ery transaction. This record is present exactly once.
206
207       X-Rcpt-Args: text
208              The  arguments  of  an  RCPT  command  within this mail delivery
209              transaction. There is one record for each RCPT command, and they
210              are in the order as sent by the client.
211
212       Received: text
213              A  message  header  for compatibility with mail processing soft‐
214              ware. This three-line header marks the end of the  headers  pro‐
215              vided by smtp-sink, and is formatted as follows:
216
217              from helo ([addr])
218                     The  HELO or EHLO command argument and client IP address.
219                     If the client did not send HELO or EHLO,  the  client  IP
220                     address is used instead.
221
222              by host (smtp-sink) with proto id random;
223                     The  hostname  specified  with  the -h option, the client
224                     protocol (see X-Client-Proto above), and the  pseudo-ran‐
225                     dom portion of the per-message capture file name.
226
227              time-stamp
228                     A time stamp as defined in RFC 2822.
229

SEE ALSO

231       smtp-source(1), SMTP/LMTP message generator
232

LICENSE

234       The Secure Mailer license must be distributed with this software.
235

AUTHOR(S)

237       Wietse Venema
238       IBM T.J. Watson Research
239       P.O. Box 704
240       Yorktown Heights, NY 10598, USA
241
242
243
244                                                                  SMTP-SINK(1)
Impressum