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