1 .\" Copyright (c) 1998-2003 Proofpoint, Inc. and its suppliers.
2 .\" All rights reserved.
3 .\" Copyright (c) 1983, 1997 Eric P. Allman. All rights reserved.
4 .\" Copyright (c) 1988, 1991, 1993
5 .\" The Regents of the University of California. All rights reserved.
7 .\" By using this file, you agree to the terms and conditions set
8 .\" forth in the LICENSE file which can be found at the top level of
9 .\" the sendmail distribution.
12 .\" $Id: sendmail.8,v 8.61 2013-11-22 20:51:56 ca Exp $
14 .TH SENDMAIL 8 "$Date: 2013-11-22 20:51:56 $"
17 \- an electronic mail transport agent
20 .RI [ flags "] [" "address ..." ]
34 sends a message to one or more
36 routing the message over whatever networks
39 does internetwork forwarding as necessary
40 to deliver the message to the correct place.
43 is not intended as a user interface routine;
44 other programs provide user-friendly
47 is used only to deliver pre-formatted messages.
51 reads its standard input
53 or a line consisting only of a single dot
54 and sends a copy of the message found there
55 to all of the addresses listed.
56 It determines the network(s) to use
57 based on the syntax and contents of the addresses.
59 Local addresses are looked up in a file
60 and aliased appropriately.
61 Aliasing can be prevented by preceding the address
63 Beginning with 8.10, the sender is included in any alias
65 if `john' sends to `group',
66 and `group' includes `john' in the expansion,
67 then the letter will also be delivered to `john'.
71 Use submit.cf even if the operation mode does not indicate
72 an initial mail submission.
75 Use sendmail.cf even if the operation mode indicates
76 an initial mail submission.
81 Current legal values are
90 All input lines must end with a CRLF,
91 and all messages will be generated with a CRLF at the end.
93 the ``From:'' and ``Sender:''
94 fields are examined for the name of the sender.
97 Check the configuration file.
102 will fork and run in background
103 listening on socket 25 for incoming
106 This is normally run from
112 except runs in foreground.
115 Print the persistent host status database.
118 Purge expired entries from the persistent host status database.
121 Initialize the alias database.
124 Deliver mail in the usual way (default).
127 Print a listing of the queue(s).
130 Print number of entries in the queue(s);
131 only available with shared memory support.
136 protocol as described in
138 on standard input and output.
139 This flag implies all the operations of the
141 flag that are compatible with
145 Run in address test mode.
146 This mode reads addresses and shows the steps in parsing;
147 it is used for debugging configuration tables.
150 Verify names only \- do not try to collect or deliver a message.
151 Verify mode is normally used for validating
152 users or mailing lists.
155 Use alternate configuration file.
157 gives up any enhanced (set-user-ID or set-group-ID) privileges
158 if an alternate configuration file is specified.
161 Send debugging output to the indicated log file instead of stdout.
163 .BI \-d category . level...
164 Set the debugging flag for
169 is either an integer or a name specifying the topic, and
171 an integer specifying the level of debugging output desired.
172 Higher levels generally mean more output.
173 More than one flag can be specified by separating them with commas.
174 A list of numeric debugging categories can be found in the TRACEFLAGS file
175 in the sendmail source distribution.
179 prints the version of
181 and the options it was compiled with.
183 Most other categories are only useful with, and documented in,
189 Set the full name of the sender.
192 Sets the name of the ``from'' person
193 (i.e., the envelope sender of the mail).
194 This address may also be used in the From: header
195 if that header is missing during initial submission.
196 The envelope sender address is used as the recipient
197 for delivery status notifications
198 and may also appear in a Return-Path: header.
203 .IR root ", " daemon ,
206 or if the person you are trying to become
207 is the same as the person you are.
209 an X-Authentication-Warning header
210 will be added to the message.
213 Relay (gateway) submission of a message,
222 The hop count is incremented every time the mail is processed.
223 When it reaches a limit,
224 the mail is returned with an error message,
225 the victim of an aliasing loop.
227 ``Received:'' lines in the message are counted.
230 Do not strip a leading dot from lines in incoming messages,
231 and do not treat a dot on a line by itself
232 as the end of an incoming message.
233 This should be set if you are reading data from a file.
236 Set the identifier used in syslog messages to the supplied
240 Set delivery status notification conditions to
245 or a comma separated list of the values
247 to be notified if delivery failed,
249 to be notified if delivery is delayed, and
251 to be notified when the message is successfully delivered.
256 \fB\-O\fP \fIoption\fR=\fIvalue\fR
261 This form uses long names. See below for more details.
268 This form uses single character names only.
269 The short names are not described in this manual page;
271 .I "Sendmail Installation and Operation Guide"
275 Set the name of the protocol used to receive the message.
276 This can be a simple protocol name such as ``UUCP''
277 or a protocol and hostname, such as ``UUCP:ucbvax''.
279 \fB\-q\fR[\fItime\fR]
280 Process saved messages in the queue at given intervals.
283 is omitted, process the queue once.
285 is given as a tagged number,
290 being minutes (default),
302 would both set the timeout to one hour thirty minutes.
305 will run in the background.
306 This option can be used safely with
309 \fB\-qp\fR[\fItime\fR]
310 Similar to \fB\-q\fItime\fR,
311 except that instead of periodically forking a child to process the queue,
312 sendmail forks a single persistent child for each queue
313 that alternates between processing the queue and sleeping.
314 The sleep time is given as the argument; it defaults to 1 second.
315 The process will always sleep at least 5 seconds if the queue was
316 empty in the previous queue run.
319 Process saved messages in the queue once and do not fork(),
320 but run in the foreground.
323 Process jobs in queue group called
327 \fB\-q\fR[\fI!\fR]I\fIsubstr\fR
328 Limit processed jobs to those containing
330 as a substring of the queue id or not when
334 \fB\-q\fR[\fI!\fR]Q\fIsubstr\fR
335 Limit processed jobs to quarantined jobs containing
337 as a substring of the quarantine reason or not when
341 \fB\-q\fR[\fI!\fR]R\fIsubstr\fR
342 Limit processed jobs to those containing
344 as a substring of one of the recipients or not when
348 \fB\-q\fR[\fI!\fR]S\fIsubstr\fR
349 Limit processed jobs to those containing
351 as a substring of the sender or not when
356 Quarantine a normal queue items with the given reason or
357 unquarantine quarantined queue items if no reason is given.
358 This should only be used with some sort of item matching using
362 Set the amount of the message to be returned
363 if the message bounces.
368 to return the entire message or
370 to return only the headers.
371 In the latter case also local bounces return only the headers.
374 An alternate and obsolete form of the
379 Read message for recipients.
380 To:, Cc:, and Bcc: lines will be scanned for recipient addresses.
381 The Bcc: line will be deleted before transmission.
384 If a mail submission via the command line requires the use of the
389 e.g., because a header uses UTF-8 encoding,
390 but the addresses on the command line are all ASCII,
391 then this option must be used.
400 Set the original envelope id.
401 This is propagated across SMTP to servers that support DSNs
402 and is returned in DSN-compliant error messages.
405 Go into verbose mode.
406 Alias expansions will be announced, etc.
409 Log all traffic in and out of mailers in the indicated log file.
410 This should only be used as a last resort
411 for debugging mailer bugs.
412 It will log a lot of data very quickly.
415 Stop processing command flags and use the rest of the arguments as
418 There are also a number of processing options that may be set.
419 Normally these will only be used by a system administrator.
420 Options may be set either on the command line
423 flag (for short names), the
425 flag (for long names),
426 or in the configuration file.
427 This is a partial list limited to those options that are likely to be useful
429 and only shows the long names;
430 for a complete list (and details), consult the
431 .IR "Sendmail Installation and Operation Guide" .
435 Use alternate alias file.
438 On mailers that are considered ``expensive'' to connect to,
439 don't initiate immediate connection.
440 This requires queueing.
442 .RI CheckpointInterval= N
443 Checkpoint the queue file after every
445 successful deliveries (default 10).
446 This avoids excessive duplicate deliveries
447 when sending to long mailing lists
448 interrupted by system crashes.
452 Set the delivery mode to
456 for interactive (synchronous) delivery,
458 for background (asynchronous) delivery,
460 for queue only \- i.e.,
461 actual delivery is done the next time the queue is run, and
463 for deferred \- the same as
465 except that database lookups for maps which have set the \-D option
466 (default for the host map) are avoided.
469 Set error processing to mode
473 to mail back the error message,
476 back the error message
477 (or mail it back if the sender is not logged in),
479 to print the errors on the terminal
482 to throw away error messages
483 (only exit status is returned),
486 to do special processing for the BerkNet.
487 If the text of the message is not mailed back
492 and if the sender is local to this machine,
493 a copy of the message is appended to the file
495 in the sender's home directory.
500 From lines at the front of messages.
503 The maximum number of times a message is allowed to ``hop''
504 before we decide it is in a loop.
507 Do not take dots on a line by themselves
508 as a message terminator.
511 Send error messages in MIME format.
512 If not set, the DSN (Delivery Status Notification) SMTP extension
515 .RI ConnectionCacheTimeout= timeout
516 Set connection cache timeout.
518 .RI ConnectionCacheSize= N
519 Set connection cache size.
525 Don't send to ``me'' (the sender) if I am in an alias expansion.
528 Validate the right hand side of aliases during a
533 If set, this message may have
536 this message is guaranteed to have new style headers
537 (i.e., commas instead of spaces between addresses).
538 If set, an adaptive algorithm is used that will correctly
539 determine the header format in most cases.
541 .RI QueueDirectory= queuedir
542 Select the directory in which to queue messages.
545 Save statistics in the named file.
547 .RI Timeout.queuereturn= time
548 Set the timeout on undelivered messages in the queue to the specified time.
549 After delivery has failed
550 (e.g., because of a host being down)
551 for this amount of time,
552 failed messages will be returned to the sender.
553 The default is five days.
555 .RI UserDatabaseSpec= userdatabase
556 If set, a user database is consulted to get forwarding information.
557 You can consider this an adjunct to the aliasing mechanism,
558 except that the database is intended to be distributed;
559 aliases are local to a particular host.
560 This may not be available if your sendmail does not have the
565 Fork each job during queue runs.
566 May be convenient on memory-poor machines.
569 Strip incoming messages to seven bits.
571 .RI EightBitMode= mode
572 Set the handling of eight bit input to seven bit destinations to
575 (mimefy) will convert to seven-bit MIME format,
577 (pass) will pass it as eight bits (but violates protocols),
580 (strict) will bounce the message.
582 .RI MinQueueAge= timeout
583 Sets how long a job must ferment in the queue between attempts to send it.
585 .RI DefaultCharSet= charset
586 Sets the default character set used to label 8-bit data
587 that is not otherwise labelled.
589 .RI NoRecipientAction= action
590 Set the behaviour when there are no recipient headers (To:, Cc: or
591 Bcc:) in the message to
594 leaves the message unchanged,
596 adds a To: header with the envelope recipients,
598 adds an Apparently-To: header with the envelope recipients,
600 adds an empty Bcc: header, and
602 adds a header reading
603 `To: undisclosed-recipients:;'.
605 .RI MaxDaemonChildren= N
606 Sets the maximum number of children that an incoming SMTP daemon
607 will allow to spawn at any time to
610 .RI ConnectionRateThrottle= N
611 Sets the maximum number of connections per second to the SMTP port to
615 the first character of a name may be
616 a vertical bar to cause interpretation of
617 the rest of the name as a command
619 It may be necessary to quote the name to keep
621 from suppressing the blanks from between arguments.
622 For example, a common alias is:
624 msgs: "|/usr/bin/msgs -s"
626 Aliases may also have the syntax
627 .RI ``:include: filename ''
630 to read the named file for a list of recipients.
631 For example, an alias such as:
633 poets: ":include:/usr/local/lib/poets.list"
636 .I /usr/local/lib/poets.list
637 for the list of addresses making up the group.
640 returns an exit status describing what it did.
641 The codes are defined in
645 Successful completion on all addresses.
648 User name not recognized.
651 Catchall meaning necessary resources
655 Syntax error in address.
658 Internal software error,
659 including bad arguments.
662 Temporary operating system error,
667 Host name not recognized.
670 Message could not be sent immediately,
676 will rebuild the alias database. If invoked as
679 will print the contents of the mail queue.
683 will print the persistent host status database.
687 will purge expired entries from the persistent host status database.
691 will act as a daemon, as if the
693 option were specified.
696 often gets blamed for many problems
697 that are actually the result of other problems,
698 such as overly permissive modes on directories.
701 checks the modes on system directories and files
702 to determine if they can be trusted.
703 Although these checks can be turned off
704 and your system security reduced by setting the
705 .BR DontBlameSendmail
707 the permission problems should be fixed.
708 For more information, see the
709 .I "Sendmail Installation and Operation Guide"
712 .I /etc/mail/sendmail.cf
713 itself the following pathnames are all specified in
714 .IR /etc/mail/sendmail.cf .
716 these values are only approximations.
720 raw data for alias names
723 data base of alias names
725 /etc/mail/sendmail.cf
746 Internet Request For Comments
750 .IR "Sendmail Installation and Operation Guide" ,
753 http://www.sendmail.org/
755 US Patent Numbers 6865671, 6986037.