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 - sendmail(1) </title> 6</head> <body> <pre> 7SENDMAIL(1) SENDMAIL(1) 8 9<b>NAME</b> 10 sendmail - Postfix to Sendmail compatibility interface 11 12<b>SYNOPSIS</b> 13 <b>sendmail</b> [<i>option ...</i>] [<i>recipient ...</i>] 14 15 <b>mailq</b> 16 <b>sendmail -bp</b> 17 18 <b>newaliases</b> 19 <b>sendmail -I</b> 20 21<b>DESCRIPTION</b> 22 The Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command implements the Postfix to Sendmail com- 23 patibility interface. For the sake of compatibility with existing 24 applications, some Sendmail command-line options are recognized but 25 silently ignored. 26 27 By default, Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> reads a message from standard input 28 until EOF or until it reads a line with only a <b>.</b> character, and 29 arranges for delivery. Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> relies on the <a href="postdrop.1.html"><b>postdrop</b>(1)</a> 30 command to create a queue file in the <b>maildrop</b> directory. 31 32 Specific command aliases are provided for other common modes of opera- 33 tion: 34 35 <b>mailq</b> List the mail queue. Each entry shows the queue file ID, message 36 size, arrival time, sender, and the recipients that still need 37 to be delivered. If mail could not be delivered upon the last 38 attempt, the reason for failure is shown. The queue ID string is 39 followed by an optional status character: 40 41 <b>*</b> The message is in the <b>active</b> queue, i.e. the message is 42 selected for delivery. 43 44 <b>!</b> The message is in the <b>hold</b> queue, i.e. no further deliv- 45 ery attempt will be made until the mail is taken off 46 hold. 47 48 This mode of operation is implemented by executing the 49 <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command. 50 51 <b>newaliases</b> 52 Initialize the alias database. If no input file is specified 53 (with the <b>-oA</b> option, see below), the program processes the 54 file(s) specified with the <b><a href="postconf.5.html#alias_database">alias_database</a></b> configuration parame- 55 ter. If no alias database type is specified, the program uses 56 the type specified with the <b><a href="postconf.5.html#default_database_type">default_database_type</a></b> configuration 57 parameter. This mode of operation is implemented by running the 58 <a href="postalias.1.html"><b>postalias</b>(1)</a> command. 59 60 Note: it may take a minute or so before an alias database update 61 becomes visible. Use the "<b>postfix reload</b>" command to eliminate 62 this delay. 63 64 These and other features can be selected by specifying the appropriate 65 combination of command-line options. Some features are controlled by 66 parameters in the <a href="postconf.5.html"><b>main.cf</b></a> configuration file. 67 68 The following options are recognized: 69 70 <b>-Am</b> (ignored) 71 72 <b>-Ac</b> (ignored) 73 Postfix sendmail uses the same configuration file regardless of 74 whether or not a message is an initial submission. 75 76 <b>-B</b> <i>body</i><b>_</b><i>type</i> 77 The message body MIME type: <b>7BIT</b> or <b>8BITMIME</b>. 78 79 <b>-bd</b> Go into daemon mode. This mode of operation is implemented by 80 executing the "<b>postfix start</b>" command. 81 82 <b>-bh</b> (ignored) 83 84 <b>-bH</b> (ignored) 85 Postfix has no persistent host status database. 86 87 <b>-bi</b> Initialize alias database. See the <b>newaliases</b> command above. 88 89 <b>-bl</b> Go into daemon mode. To accept only local connections as with 90 Sendmail's <b>-bl</b> option, specify "<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> = loopback</b>" in 91 the Postfix <a href="postconf.5.html"><b>main.cf</b></a> configuration file. 92 93 <b>-bm</b> Read mail from standard input and arrange for delivery. This is 94 the default mode of operation. 95 96 <b>-bp</b> List the mail queue. See the <b>mailq</b> command above. 97 98 <b>-bs</b> Stand-alone SMTP server mode. Read SMTP commands from standard 99 input, and write responses to standard output. In stand-alone 100 SMTP server mode, mail relaying and other access controls are 101 disabled by default. To enable them, run the process as the 102 <b><a href="postconf.5.html#mail_owner">mail_owner</a></b> user. 103 104 This mode of operation is implemented by running the <a href="smtpd.8.html"><b>smtpd</b>(8)</a> 105 daemon. 106 107 <b>-bv</b> Do not collect or deliver a message. Instead, send an email 108 report after verifying each recipient address. This is useful 109 for testing address rewriting and routing configurations. 110 111 This feature is available in Postfix version 2.1 and later. 112 113 <b>-C</b> <i>config</i><b>_</b><i>file</i> 114 115 <b>-C</b> <i>config</i><b>_</b><i>dir</i> 116 The path name of the Postfix <a href="postconf.5.html"><b>main.cf</b></a> file, or of its parent 117 directory. This information is ignored with Postfix versions 118 before 2.3. 119 120 With Postfix version 3.2 and later, a non-default directory must 121 be authorized in the default <a href="postconf.5.html"><b>main.cf</b></a> file, through the alter- 122 nate_config_directories or <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> parame- 123 ters. 124 125 With all Postfix versions, you can specify a directory pathname 126 with the MAIL_CONFIG environment variable to override the loca- 127 tion of configuration files. 128 129 <b>-F</b> <i>full</i><b>_</b><i>name</i> 130 Set the sender full name. This overrides the NAME environment 131 variable, and is used only with messages that have no <b>From:</b> mes- 132 sage header. 133 134 <b>-f</b> <i>sender</i> 135 Set the envelope sender address. This is the address where 136 delivery problems are sent to. With Postfix versions before 2.1, 137 the <b>Errors-To:</b> message header overrides the error return 138 address. 139 140 <b>-G</b> Gateway (relay) submission, as opposed to initial user submis- 141 sion. Either do not rewrite addresses at all, or update incom- 142 plete addresses with the domain information specified with 143 <b><a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a></b>. 144 145 This option is ignored before Postfix version 2.3. 146 147 <b>-h</b> <i>hop</i><b>_</b><i>count</i> (ignored) 148 Hop count limit. Use the <b><a href="postconf.5.html#hopcount_limit">hopcount_limit</a></b> configuration parameter 149 instead. 150 151 <b>-I</b> Initialize alias database. See the <b>newaliases</b> command above. 152 153 <b>-i</b> When reading a message from standard input, don't treat a line 154 with only a <b>.</b> character as the end of input. 155 156 <b>-L</b> <i>label</i> (ignored) 157 The logging label. Use the <b><a href="postconf.5.html#syslog_name">syslog_name</a></b> configuration parameter 158 instead. 159 160 <b>-m</b> (ignored) 161 Backwards compatibility. 162 163 <b>-N</b> <i>dsn</i> (default: 'delay, failure') 164 Delivery status notification control. Specify either a 165 comma-separated list with one or more of <b>failure</b> (send notifica- 166 tion when delivery fails), <b>delay</b> (send notification when deliv- 167 ery is delayed), or <b>success</b> (send notification when the message 168 is delivered); or specify <b>never</b> (don't send any notifications at 169 all). 170 171 This feature is available in Postfix 2.3 and later. 172 173 <b>-n</b> (ignored) 174 Backwards compatibility. 175 176 <b>-oA</b><i>alias</i><b>_</b><i>database</i> 177 Non-default alias database. Specify <i>pathname</i> or <i>type</i>:<i>pathname</i>. 178 See <a href="postalias.1.html"><b>postalias</b>(1)</a> for details. 179 180 <b>-O</b> <i>option=value</i> (ignored) 181 Set the named <i>option</i> to <i>value</i>. Use the equivalent configuration 182 parameter in <a href="postconf.5.html"><b>main.cf</b></a> instead. 183 184 <b>-o7</b> (ignored) 185 186 <b>-o8</b> (ignored) 187 To send 8-bit or binary content, use an appropriate MIME encap- 188 sulation and specify the appropriate <b>-B</b> command-line option. 189 190 <b>-oi</b> When reading a message from standard input, don't treat a line 191 with only a <b>.</b> character as the end of input. 192 193 <b>-om</b> (ignored) 194 The sender is never eliminated from alias etc. expansions. 195 196 <b>-o</b> <i>x value</i> (ignored) 197 Set option <i>x</i> to <i>value</i>. Use the equivalent configuration parame- 198 ter in <a href="postconf.5.html"><b>main.cf</b></a> instead. 199 200 <b>-r</b> <i>sender</i> 201 Set the envelope sender address. This is the address where 202 delivery problems are sent to. With Postfix versions before 2.1, 203 the <b>Errors-To:</b> message header overrides the error return 204 address. 205 206 <b>-R</b> <i>return</i> 207 Delivery status notification control. Specify "hdrs" to return 208 only the header when a message bounces, "full" to return a full 209 copy (the default behavior). 210 211 The <b>-R</b> option specifies an upper bound; Postfix will return only 212 the header, when a full copy would exceed the <a href="postconf.5.html#bounce_size_limit">bounce_size_limit</a> 213 setting. 214 215 This option is ignored before Postfix version 2.10. 216 217 <b>-q</b> Attempt to deliver all queued mail. This is implemented by exe- 218 cuting the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command. 219 220 Warning: flushing undeliverable mail frequently will result in 221 poor delivery performance of all other mail. 222 223 <b>-q</b><i>interval</i> (ignored) 224 The interval between queue runs. Use the <b><a href="postconf.5.html#queue_run_delay">queue_run_delay</a></b> config- 225 uration parameter instead. 226 227 <b>-qI</b><i>queueid</i> 228 Schedule immediate delivery of mail with the specified queue ID. 229 This option is implemented by executing the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> com- 230 mand, and is available with Postfix version 2.4 and later. 231 232 <b>-qR</b><i>site</i> 233 Schedule immediate delivery of all mail that is queued for the 234 named <i>site</i>. This option accepts only <i>site</i> names that are eligi- 235 ble for the "fast flush" service, and is implemented by execut- 236 ing the <a href="postqueue.1.html"><b>postqueue</b>(1)</a> command. See <a href="flush.8.html"><b>flush</b>(8)</a> for more information 237 about the "fast flush" service. 238 239 <b>-qS</b><i>site</i> 240 This command is not implemented. Use the slower "<b>sendmail -q</b>" 241 command instead. 242 243 <b>-t</b> Extract recipients from message headers. These are added to any 244 recipients specified on the command line. 245 246 With Postfix versions prior to 2.1, this option requires that no 247 recipient addresses are specified on the command line. 248 249 <b>-U</b> (ignored) 250 Initial user submission. 251 252 <b>-V</b> <i>envid</i> 253 Specify the envelope ID for notification by servers that support 254 DSN. 255 256 This feature is available in Postfix 2.3 and later. 257 258 <b>-XV</b> (Postfix 2.2 and earlier: <b>-V</b>) 259 Variable Envelope Return Path. Given an envelope sender address 260 of the form <i>owner-listname</i>@<i>origin</i>, each recipient <i>user</i>@<i>domain</i> 261 receives mail with a personalized envelope sender address. 262 263 By default, the personalized envelope sender address is 264 <i>owner-listname</i><b>+</b><i>user</i><b>=</b><i>domain</i>@<i>origin</i>. The default <b>+</b> and <b>=</b> charac- 265 ters are configurable with the <b><a href="postconf.5.html#default_verp_delimiters">default_verp_delimiters</a></b> configu- 266 ration parameter. 267 268 <b>-XV</b><i>xy</i> (Postfix 2.2 and earlier: <b>-V</b><i>xy</i>) 269 As <b>-XV</b>, but uses <i>x</i> and <i>y</i> as the VERP delimiter characters, 270 instead of the characters specified with the <b><a href="postconf.5.html#default_verp_delimiters">default_verp_delim</a>-</b> 271 <b><a href="postconf.5.html#default_verp_delimiters">iters</a></b> configuration parameter. 272 273 <b>-v</b> Send an email report of the first delivery attempt (Postfix ver- 274 sions 2.1 and later). Mail delivery always happens in the back- 275 ground. When multiple <b>-v</b> options are given, enable verbose log- 276 ging for debugging purposes. 277 278 <b>-X</b> <i>log</i><b>_</b><i>file</i> (ignored) 279 Log mailer traffic. Use the <b><a href="postconf.5.html#debug_peer_list">debug_peer_list</a></b> and <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a></b> 280 configuration parameters instead. 281 282<b>SECURITY</b> 283 By design, this program is not set-user (or group) id. However, it must 284 handle data from untrusted, possibly remote, users. Thus, the usual 285 precautions need to be taken against malicious inputs. 286 287<b>DIAGNOSTICS</b> 288 Problems are logged to <b>syslogd</b>(8) or <a href="postlogd.8.html"><b>postlogd</b>(8)</a>, and to the standard 289 error stream. 290 291<b>ENVIRONMENT</b> 292 <b>MAIL_CONFIG</b> 293 Directory with Postfix configuration files. 294 295 <b>MAIL_VERBOSE</b> (value does not matter) 296 Enable verbose logging for debugging purposes. 297 298 <b>MAIL_DEBUG</b> (value does not matter) 299 Enable debugging with an external command, as specified with the 300 <b><a href="postconf.5.html#debugger_command">debugger_command</a></b> configuration parameter. 301 302 <b>NAME</b> The sender full name. This is used only with messages that have 303 no <b>From:</b> message header. See also the <b>-F</b> option above. 304 305<b>CONFIGURATION PARAMETERS</b> 306 The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to this pro- 307 gram. The text below provides only a parameter summary. See <a href="postconf.5.html"><b>post-</b></a> 308 <a href="postconf.5.html"><b>conf</b>(5)</a> for more details including examples. 309 310<b>COMPATIBILITY CONTROLS</b> 311 Available with Postfix 2.9 and later: 312 313 <b><a href="postconf.5.html#sendmail_fix_line_endings">sendmail_fix_line_endings</a> (always)</b> 314 Controls how the Postfix sendmail command converts email message 315 line endings from <CR><LF> into UNIX format (<LF>). 316 317<b>TROUBLE SHOOTING CONTROLS</b> 318 The <a href="DEBUG_README.html">DEBUG_README</a> file gives examples of how to troubleshoot a Postfix 319 system. 320 321 <b><a href="postconf.5.html#debugger_command">debugger_command</a> (empty)</b> 322 The external command to execute when a Postfix daemon program is 323 invoked with the -D option. 324 325 <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b> 326 The increment in verbose logging level when a remote client or 327 server matches a pattern in the <a href="postconf.5.html#debug_peer_list">debug_peer_list</a> parameter. 328 329 <b><a href="postconf.5.html#debug_peer_list">debug_peer_list</a> (empty)</b> 330 Optional list of remote client or server hostname or network 331 address patterns that cause the verbose logging level to 332 increase by the amount specified in $<a href="postconf.5.html#debug_peer_level">debug_peer_level</a>. 333 334<b>ACCESS CONTROLS</b> 335 Available in Postfix version 2.2 and later: 336 337 <b><a href="postconf.5.html#authorized_flush_users">authorized_flush_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b> 338 List of users who are authorized to flush the queue. 339 340 <b><a href="postconf.5.html#authorized_mailq_users">authorized_mailq_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b> 341 List of users who are authorized to view the queue. 342 343 <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b> 344 List of users who are authorized to submit mail with the <a href="sendmail.1.html"><b>send-</b></a> 345 <a href="sendmail.1.html"><b>mail</b>(1)</a> command (and with the privileged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper com- 346 mand). 347 348<b>RESOURCE AND RATE CONTROLS</b> 349 <b><a href="postconf.5.html#bounce_size_limit">bounce_size_limit</a> (50000)</b> 350 The maximal amount of original message text that is sent in a 351 non-delivery notification. 352 353 <b><a href="postconf.5.html#fork_attempts">fork_attempts</a> (5)</b> 354 The maximal number of attempts to fork() a child process. 355 356 <b><a href="postconf.5.html#fork_delay">fork_delay</a> (1s)</b> 357 The delay between attempts to fork() a child process. 358 359 <b><a href="postconf.5.html#hopcount_limit">hopcount_limit</a> (50)</b> 360 The maximal number of Received: message headers that is allowed 361 in the primary message headers. 362 363 <b><a href="postconf.5.html#queue_run_delay">queue_run_delay</a> (300s)</b> 364 The time between <a href="QSHAPE_README.html#deferred_queue">deferred queue</a> scans by the queue manager; 365 prior to Postfix 2.4 the default value was 1000s. 366 367<b>FAST FLUSH CONTROLS</b> 368 The <a href="ETRN_README.html">ETRN_README</a> file describes configuration and operation details for 369 the Postfix "fast flush" service. 370 371 <b><a href="postconf.5.html#fast_flush_domains">fast_flush_domains</a> ($<a href="postconf.5.html#relay_domains">relay_domains</a>)</b> 372 Optional list of destinations that are eligible for per-destina- 373 tion logfiles with mail that is queued to those destinations. 374 375<b>VERP CONTROLS</b> 376 The <a href="VERP_README.html">VERP_README</a> file describes configuration and operation details of 377 Postfix support for variable envelope return path addresses. 378 379 <b><a href="postconf.5.html#default_verp_delimiters">default_verp_delimiters</a> (+=)</b> 380 The two default VERP delimiter characters. 381 382 <b><a href="postconf.5.html#verp_delimiter_filter">verp_delimiter_filter</a> (-=+)</b> 383 The characters Postfix accepts as VERP delimiter characters on 384 the Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command line and in SMTP commands. 385 386<b>MISCELLANEOUS CONTROLS</b> 387 <b><a href="postconf.5.html#alias_database">alias_database</a> (see 'postconf -d' output)</b> 388 The alias databases for <a href="local.8.html"><b>local</b>(8)</a> delivery that are updated with 389 "<b>newaliases</b>" or with "<b>sendmail -bi</b>". 390 391 <b><a href="postconf.5.html#command_directory">command_directory</a> (see 'postconf -d' output)</b> 392 The location of all postfix administrative commands. 393 394 <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b> 395 The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con- 396 figuration files. 397 398 <b><a href="postconf.5.html#daemon_directory">daemon_directory</a> (see 'postconf -d' output)</b> 399 The directory with Postfix support programs and daemon programs. 400 401 <b><a href="postconf.5.html#default_database_type">default_database_type</a> (see 'postconf -d' output)</b> 402 The default database type for use in <a href="newaliases.1.html"><b>newaliases</b>(1)</a>, <a href="postalias.1.html"><b>postalias</b>(1)</a> 403 and <a href="postmap.1.html"><b>postmap</b>(1)</a> commands. 404 405 <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a> (0h)</b> 406 The time after which the sender receives a copy of the message 407 headers of mail that is still queued. 408 409 <b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b> 410 The list of environment parameters that a privileged Postfix 411 process will import from a non-Postfix parent process, or 412 name=value environment overrides. 413 414 <b><a href="postconf.5.html#mail_owner">mail_owner</a> (postfix)</b> 415 The UNIX system account that owns the Postfix queue and most 416 Postfix daemon processes. 417 418 <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b> 419 The location of the Postfix top-level queue directory. 420 421 <b><a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a> (empty)</b> 422 Don't rewrite message headers from remote clients at all when 423 this parameter is empty; otherwise, rewrite message headers and 424 append the specified domain name to incomplete addresses. 425 426 <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b> 427 The syslog facility of Postfix logging. 428 429 <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b> 430 A prefix that is prepended to the process name in syslog 431 records, so that, for example, "smtpd" becomes "prefix/smtpd". 432 433 Postfix 3.2 and later: 434 435 <b><a href="postconf.5.html#alternate_config_directories">alternate_config_directories</a> (empty)</b> 436 A list of non-default Postfix configuration directories that may 437 be specified with "-c <a href="postconf.5.html#config_directory">config_directory</a>" on the command line (in 438 the case of <a href="sendmail.1.html"><b>sendmail</b>(1)</a>, with the "-C" option), or via the 439 MAIL_CONFIG environment parameter. 440 441 <b><a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> (empty)</b> 442 An optional list of non-default Postfix configuration directo- 443 ries; these directories belong to additional Postfix instances 444 that share the Postfix executable files and documentation with 445 the default Postfix instance, and that are started, stopped, 446 etc., together with the default Postfix instance. 447 448<b>FILES</b> 449 /var/spool/postfix, mail queue 450 /etc/postfix, configuration files 451 452<b>SEE ALSO</b> 453 <a href="pickup.8.html">pickup(8)</a>, mail pickup daemon 454 <a href="qmgr.8.html">qmgr(8)</a>, queue manager 455 <a href="smtpd.8.html">smtpd(8)</a>, SMTP server 456 <a href="flush.8.html">flush(8)</a>, fast flush service 457 <a href="postsuper.1.html">postsuper(1)</a>, queue maintenance 458 <a href="postalias.1.html">postalias(1)</a>, create/update/query alias database 459 <a href="postdrop.1.html">postdrop(1)</a>, mail posting utility 460 <a href="postfix.1.html">postfix(1)</a>, mail system control 461 <a href="postqueue.1.html">postqueue(1)</a>, mail queue control 462 <a href="postlogd.8.html">postlogd(8)</a>, Postfix logging 463 syslogd(8), system logging 464 465<b>README_FILES</b> 466 Use "<b>postconf <a href="postconf.5.html#readme_directory">readme_directory</a></b>" or "<b>postconf <a href="postconf.5.html#html_directory">html_directory</a></b>" to locate 467 this information. 468 <a href="DEBUG_README.html">DEBUG_README</a>, Postfix debugging howto 469 <a href="ETRN_README.html">ETRN_README</a>, Postfix ETRN howto 470 <a href="VERP_README.html">VERP_README</a>, Postfix VERP howto 471 472<b>LICENSE</b> 473 The Secure Mailer license must be distributed with this software. 474 475<b>AUTHOR(S)</b> 476 Wietse Venema 477 IBM T.J. Watson Research 478 P.O. Box 704 479 Yorktown Heights, NY 10598, USA 480 481 Wietse Venema 482 Google, Inc. 483 111 8th Avenue 484 New York, NY 10011, USA 485 486 SENDMAIL(1) 487</pre> </body> </html> 488