SENDMAIL(8)
NAME
sendmail − send mail over the internet
USAGE
/usr/lib/sendmail [ flags ] [ address ... ]
newaliases
mailq
DESCRIPTION
Sendmail sends a message to one or more log-in names, routing the message over whatever networks are necessary.
Sendmail is not a user interface routine; other programs provide simpler front ends; sendmail is used only to deliver pre-formatted messages.
With no flags, sendmail reads its standard input up to a ^D, or to a line with a single dot, and sends a copy of the text to all of the addresses listed. It determines the network to use based on the syntax and contents of the addresses.
Local addresses are looked up in a file and aliased appropriately. Aliasing can be prevented by preceding the address with a backslash. Normally, the sender is not included in any alias expansions. For example, if “john” sends to “group” and “group” includes “john” in the expansion, then the letter will not be delivered to “john”.
FLAGS
Flags are:
−ba Go into ARPANET mode. All input lines must end with a CR-LF, and all messages will be generated with a CR-LF at the end. Also, the “From:” and “Sender:” fields are examined for the name of the sender.
−bd Run as a daemon. This requires Berkeley IPC.
−bi Initialize the alias database.
−bm Deliver mail in the usual way (default).
−bp Print a listing of the queue.
−bs Use the SMTP protocol as described in RFC821. This flag implies all the operations of the −ba flag that are compatible with SMTP.
−bt Run in address test mode. This mode reads addresses and shows the steps in parsing; it is used for debugging configuration tables.
−bv Verify names only − do not try to collect or deliver a message. Verify mode is normally used for validating users or mailing lists.
−bz Create the configuration freeze file. (Not currently supported by DOMAIN/IX.)
−Cfile Use alternate configuration file.
−dX Set debugging value to X.
−Ffullname Set the full name of the sender.
−fname Sets the name of the “from” person (i.e., the sender of the mail). −f can only be used by the special users root, daemon, and network, or if name is the same as your log-in name.
−hN Set the hop count to N. The hop count is incremented every time the mail is processed. When it reaches a limit, the mail is returned with an error message, the victim of an aliasing loop.
−n Don’t perform aliasing.
−oxvalue Set option x to the specified value. Options are described below.
−q[time] Processed saved messages in the queue at time intervals. If time is omitted, process the queue once. Time is given as a tagged number, with “s” being seconds, “m” being minutes, “h” being hours, “d” being days, and “w” being weeks. For example, “−q1h30m” or “−q90m” would both set the interval between processing passes to one hour thirty minutes.
−rname An alternate (obsolete) form of the −f flag.
−t Read message for recipients. To:, Cc:, and Bcc: lines will be scanned for people to send to. The Bcc: line will be deleted before transmission. Any addresses in the argument list will be suppressed.
−v Go into verbose mode. Alias expansions will be announced, etc.
OPTIONS
A number of processing options may be set. Normally, a system administrator will set these. Options may be invoked either on the command line using the −o flag or in the configuration file. The options are:
Afile specifies an alternate alias file.
c queues messages, rather than connecting immediately to mailers that are considered “expensive”.
dx sets the delivery mode to x. Delivery modes are “i” for interactive (synchronous) delivery, “b” for background (asynchronous) delivery, and “q” for queue only − i.e., actual delivery is made the next time the queue is run.
D tries to automatically rebuild the alias database, if necessary.
ex Set error processing to mode x. Valid modes are “m” to mail back the error message, “w” to “write” back the error message (or mail it back if the sender is not logged in), “p” to print the errors on the terminal (default), “q” to throw away error messages (only exit status is returned), and “e” to do special processing for the BerkNet. If the text of the message is not mailed back by modes “m” or “w” and if the sender is local (this machine), a copy of the message is appended to the file “dead.letter” in the sender’s home directory.
Fmode causes sendmail to use this mode when creating temporary files. (See chmod(1)).
f saves UNIX-style From lines at the front of messages.
gN uses N as the default group ID when calling mailers.
Hfile calls the SMTP help file.
i ignores a dot on a line by itself as a message terminator.
Ln sets the log level.
m sends to “me” (the sender) also, if I am in an alias expansion.
o uses old style headers, if possible. If not set, this message is guaranteed to have new style headers (i.e., commas instead of spaces between addresses). If set, an adaptive algorithm is used that will correctly determine the header format in most cases.
Qqueuedir selects the directory in which to queue messages.
rtimeout sets the timeout on reads. If none is set, sendmail will wait indefinitely for a mailer.
Sfile saves statistics in the named file.
s restarts the queue file, even under circumstances where it is not strictly necessary.
Ttime sets the timeout on messages in the queue to the specified time. After sitting in the queue for this amount of time, they will be returned to the sender. The default is three days.
tstz,dtz sets the name of the time zone. Stz is standard time zone; dtz is daylight time zone.
uN sets the default user ID for mailers to N.
If the first character of the username is a vertical bar, the rest of the username is used as the name of a program to pipe the mail to. It may be necessary to quote the name of the user to keep sendmail from suppressing the blanks between arguments.
Sendmail returns an exit status describing what it did. The codes are defined in <sysexits.h>
EX_OKSuccessful completion on all addresses.
EX_NOUSERUsername not recognized.
EX_UNAVAILABLECatchall meaning necessary resources were not available.
EX_SYNTAXSyntax error in address.
EX_SOFTWAREInternal software error, including bad arguments.
EX_OSERRTemporary operating system error, such as “cannot fork”.
EX_NOHOSTHost name not recognized.
EX_TEMPFAILMessage could not be sent immediately, but was queued.
If invoked as newaliases, sendmail will rebuild the alias database. If invoked as mailq, sendmail will print the contents of the mail queue.
NOTES
Sendmail converts blanks in addresses to dots. This is not consistent with ARPANET mail protocol RFC733 (NIC 41952), but it is consistent with the new protocol (RFC822).
NOTES TO DOMAIN/IX USERS
If you are running sendmail as a daemon, you must run newaliases on the same node that is running the sendmail daemon. Once newaliases has completed, you must kill and restart the sendmail daemon for the changes to take effect.
FILES
/usr/lib/aliases raw data for alias names, in text
/usr/lib/aliases.pag database of alias names used by sendmail
/usr/lib/aliases.dir database of alias names used by sendmail
/usr/lib/sendmail.cf configuration file
/usr/lib/uucpproto.cf example uucp configuration file
/usr/lib/arpaproto.cf example ARPANET configuration file
/usr/lib/sendmail.st collected statistics
/usr/bin/uux to deliver uucp mail
/usr/spool/mqueue/* temp files
RELATED INFORMATION
mail(1) rmail(1) DARPA Internet Request For Comments RFC819, RFC821, RFC822;