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