1 .\" Copyright (c) 1998-2003 Sendmail, 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.58 2007/08/02 05:42:33 ca Exp $
14 .TH SENDMAIL 8 "$Date: 2007/08/02 05:42:33 $"
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
89 mode. All input lines must end with a CR-LF,
90 and all messages will be generated with a CR-LF at the end.
92 the ``From:'' and ``Sender:''
93 fields are examined for the name of the sender.
98 will fork and run in background
99 listening on socket 25 for incoming
102 This is normally run from
108 except runs in foreground.
111 Print the persistent host status database.
114 Purge expired entries from the persistent host status database.
117 Initialize the alias database.
120 Deliver mail in the usual way (default).
123 Print a listing of the queue(s).
126 Print number of entries in the queue(s);
127 only available with shared memory support.
132 protocol as described in
134 on standard input and output.
135 This flag implies all the operations of the
137 flag that are compatible with
141 Run in address test mode.
142 This mode reads addresses and shows the steps in parsing;
143 it is used for debugging configuration tables.
146 Verify names only \- do not try to collect or deliver a message.
147 Verify mode is normally used for validating
148 users or mailing lists.
151 Use alternate configuration file.
153 gives up any enhanced (set-user-ID or set-group-ID) privileges
154 if an alternate configuration file is specified.
157 Send debugging output to the indicated log file instead of stdout.
159 .BI \-d category . level...
160 Set the debugging flag for
165 is either an integer or a name specifying the topic, and
167 an integer specifying the level of debugging output desired.
168 Higher levels generally mean more output.
169 More than one flag can be specified by separating them with commas.
170 A list of numeric debugging categories can be found in the TRACEFLAGS file
171 in the sendmail source distribution.
175 prints the version of
177 and the options it was compiled with.
179 Most other categories are only useful with, and documented in,
185 Set the full name of the sender.
188 Sets the name of the ``from'' person
189 (i.e., the envelope sender of the mail).
190 This address may also be used in the From: header
191 if that header is missing during initial submission.
192 The envelope sender address is used as the recipient
193 for delivery status notifications
194 and may also appear in a Return-Path: header.
199 .IR root ", " daemon ,
202 or if the person you are trying to become
203 is the same as the person you are.
205 an X-Authentication-Warning header
206 will be added to the message.
209 Relay (gateway) submission of a message,
218 The hop count is incremented every time the mail is
220 When it reaches a limit,
221 the mail is returned with an error message,
222 the victim of an aliasing loop.
224 ``Received:'' lines in the message are counted.
227 Ignore dots alone on lines by themselves in incoming messages.
228 This should be set if you are reading data from a file.
231 Set the identifier used in syslog messages to the supplied
235 Set delivery status notification conditions to
240 or a comma separated list of the values
242 to be notified if delivery failed,
244 to be notified if delivery is delayed, and
246 to be notified when the message is successfully delivered.
251 \fB\-O\fP \fIoption\fR=\fIvalue\fR
256 This form uses long names. See below for more details.
263 This form uses single character names only.
264 The short names are not described in this manual page;
266 .I "Sendmail Installation and Operation Guide"
270 Set the name of the protocol used to receive the message.
271 This can be a simple protocol name such as ``UUCP''
272 or a protocol and hostname, such as ``UUCP:ucbvax''.
274 \fB\-q\fR[\fItime\fR]
275 Process saved messages in the queue at given intervals.
278 is omitted, process the queue once.
280 is given as a tagged number,
285 being minutes (default),
297 would both set the timeout to one hour thirty minutes.
300 will run in the background.
301 This option can be used safely with
304 \fB\-qp\fR[\fItime\fR]
305 Similar to \fB\-q\fItime\fR,
306 except that instead of periodically forking a child to process the queue,
307 sendmail forks a single persistent child for each queue
308 that alternates between processing the queue and sleeping.
309 The sleep time is given as the argument; it defaults to 1 second.
310 The process will always sleep at least 5 seconds if the queue was
311 empty in the previous queue run.
314 Process saved messages in the queue once and do not fork(),
315 but run in the foreground.
318 Process jobs in queue group called
322 \fB\-q\fR[\fI!\fR]I\fIsubstr\fR
323 Limit processed jobs to those containing
325 as a substring of the queue id or not when
329 \fB\-q\fR[\fI!\fR]Q\fIsubstr\fR
330 Limit processed jobs to quarantined jobs containing
332 as a substring of the quarantine reason or not when
336 \fB\-q\fR[\fI!\fR]R\fIsubstr\fR
337 Limit processed jobs to those containing
339 as a substring of one of the recipients or not when
343 \fB\-q\fR[\fI!\fR]S\fIsubstr\fR
344 Limit processed jobs to those containing
346 as a substring of the sender or not when
351 Quarantine a normal queue items with the given reason or
352 unquarantine quarantined queue items if no reason is given.
353 This should only be used with some sort of item matching using
357 Set the amount of the message to be returned
358 if the message bounces.
363 to return the entire message or
365 to return only the headers.
366 In the latter case also local bounces return only the headers.
369 An alternate and obsolete form of the
374 Read message for recipients.
375 To:, Cc:, and Bcc: lines will be scanned for recipient addresses.
376 The Bcc: line will be deleted before transmission.
379 Set the original envelope id.
380 This is propagated across SMTP to servers that support DSNs
381 and is returned in DSN-compliant error messages.
384 Go into verbose mode.
385 Alias expansions will be announced, etc.
388 Log all traffic in and out of mailers in the indicated log file.
389 This should only be used as a last resort
390 for debugging mailer bugs.
391 It will log a lot of data very quickly.
394 Stop processing command flags and use the rest of the arguments as
397 There are also a number of processing options that may be set.
398 Normally these will only be used by a system administrator.
399 Options may be set either on the command line
402 flag (for short names), the
404 flag (for long names),
405 or in the configuration file.
406 This is a partial list limited to those options that are likely to be useful
408 and only shows the long names;
409 for a complete list (and details), consult the
410 .IR "Sendmail Installation and Operation Guide" .
414 Use alternate alias file.
417 On mailers that are considered ``expensive'' to connect to,
418 don't initiate immediate connection.
419 This requires queueing.
421 .RI CheckpointInterval= N
422 Checkpoint the queue file after every
424 successful deliveries (default 10).
425 This avoids excessive duplicate deliveries
426 when sending to long mailing lists
427 interrupted by system crashes.
431 Set the delivery mode to
435 for interactive (synchronous) delivery,
437 for background (asynchronous) delivery,
439 for queue only \- i.e.,
440 actual delivery is done the next time the queue is run, and
442 for deferred \- the same as
444 except that database lookups for maps which have set the \-D option
445 (default for the host map) are avoided.
448 Set error processing to mode
452 to mail back the error message,
455 back the error message
456 (or mail it back if the sender is not logged in),
458 to print the errors on the terminal
461 to throw away error messages
462 (only exit status is returned),
465 to do special processing for the BerkNet.
466 If the text of the message is not mailed back
472 and if the sender is local to this machine,
473 a copy of the message is appended to the file
475 in the sender's home directory.
480 From lines at the front of messages.
483 The maximum number of times a message is allowed to ``hop''
484 before we decide it is in a loop.
487 Do not take dots on a line by themselves
488 as a message terminator.
491 Send error messages in MIME format.
492 If not set, the DSN (Delivery Status Notification) SMTP extension
495 .RI ConnectionCacheTimeout= timeout
496 Set connection cache timeout.
498 .RI ConnectionCacheSize= N
499 Set connection cache size.
505 Don't send to ``me'' (the sender) if I am in an alias expansion.
508 Validate the right hand side of aliases during a
513 If set, this message may have
516 this message is guaranteed to have new style headers
517 (i.e., commas instead of spaces between addresses).
518 If set, an adaptive algorithm is used that will correctly
519 determine the header format in most cases.
521 .RI QueueDirectory= queuedir
522 Select the directory in which to queue messages.
525 Save statistics in the named file.
527 .RI Timeout.queuereturn= time
528 Set the timeout on undelivered messages in the queue to the specified time.
529 After delivery has failed
530 (e.g., because of a host being down)
531 for this amount of time,
532 failed messages will be returned to the sender.
533 The default is five days.
535 .RI UserDatabaseSpec= userdatabase
536 If set, a user database is consulted to get forwarding information.
537 You can consider this an adjunct to the aliasing mechanism,
538 except that the database is intended to be distributed;
539 aliases are local to a particular host.
540 This may not be available if your sendmail does not have the
545 Fork each job during queue runs.
546 May be convenient on memory-poor machines.
549 Strip incoming messages to seven bits.
551 .RI EightBitMode= mode
552 Set the handling of eight bit input to seven bit destinations to
555 (mimefy) will convert to seven-bit MIME format,
557 (pass) will pass it as eight bits (but violates protocols),
560 (strict) will bounce the message.
562 .RI MinQueueAge= timeout
563 Sets how long a job must ferment in the queue between attempts to send it.
565 .RI DefaultCharSet= charset
566 Sets the default character set used to label 8-bit data
567 that is not otherwise labelled.
569 .RI DialDelay= sleeptime
570 If opening a connection fails,
573 seconds and try again.
574 Useful on dial-on-demand sites.
576 .RI NoRecipientAction= action
577 Set the behaviour when there are no recipient headers (To:, Cc: or
578 Bcc:) in the message to
581 leaves the message unchanged,
583 adds a To: header with the envelope recipients,
585 adds an Apparently-To: header with the envelope recipients,
587 adds an empty Bcc: header, and
589 adds a header reading
590 `To: undisclosed-recipients:;'.
592 .RI MaxDaemonChildren= N
593 Sets the maximum number of children that an incoming SMTP daemon
594 will allow to spawn at any time to
597 .RI ConnectionRateThrottle= N
598 Sets the maximum number of connections per second to the SMTP port to
602 the first character of a name may be
603 a vertical bar to cause interpretation of
604 the rest of the name as a command
606 It may be necessary to quote the name
609 from suppressing the blanks from between arguments.
610 For example, a common alias is:
612 msgs: "|/usr/bin/msgs -s"
614 Aliases may also have the syntax
615 .RI ``:include: filename ''
618 to read the named file for a list of recipients.
619 For example, an alias such as:
621 poets: ":include:/usr/local/lib/poets.list"
624 .I /usr/local/lib/poets.list
625 for the list of addresses making up the group.
628 returns an exit status
629 describing what it did.
630 The codes are defined in
634 Successful completion on all addresses.
637 User name not recognized.
640 Catchall meaning necessary resources
644 Syntax error in address.
647 Internal software error,
648 including bad arguments.
651 Temporary operating system error,
656 Host name not recognized.
659 Message could not be sent immediately,
665 will rebuild the alias database. If invoked as
668 will print the contents of the mail queue.
672 will print the persistent host status database.
676 will purge expired entries from the persistent host status database.
680 will act as a daemon, as if the
682 option were specified.
685 often gets blamed for many problems
686 that are actually the result of other problems,
687 such as overly permissive modes on directories.
690 checks the modes on system directories and files
691 to determine if they can be trusted.
692 Although these checks can be turned off
693 and your system security reduced by setting the
694 .BR DontBlameSendmail
696 the permission problems should be fixed.
697 For more information, see:
699 .I http://www.sendmail.org/tips/DontBlameSendmail.html
702 .I /etc/mail/sendmail.cf
703 itself the following pathnames are all specified in
704 .IR /etc/mail/sendmail.cf .
706 these values are only approximations.
710 raw data for alias names
713 data base of alias names
715 /etc/mail/sendmail.cf
736 Internet Request For Comments
740 .IR "Sendmail Installation and Operation Guide" ,
743 http://www.sendmail.org/