SENDMAIL(8) SENDMAIL(8) NAME sendmail - send mail over the internet SYNOPSIS /usr/lib/sendmail [ flags ] [ address ... ] newaliases mailq [ -v ] DESCRIPTION _S_e_n_d_m_a_i_l sends a message to one or more _r_e_c_i_p_i_e_n_t_s, routing the message over whatever networks are necessary. _S_e_n_d_m_a_i_l does internetwork for‐ warding as necessary to deliver the message to the correct place. _S_e_n_d_m_a_i_l is not intended as a user interface routine; other programs provide user-friendly front ends; _s_e_n_d_m_a_i_l is used only to deliver pre- formatted messages. With no flags, _s_e_n_d_m_a_i_l reads its standard input up to an end-of-file or a line consisting only of a single dot and sends a copy of the mes‐ sage found there to all of the addresses listed. It determines the network(s) 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, e.g., if ‘john’ sends to ‘group’, and ‘group’ includes ‘john’ in the expansion, then the letter will not be delivered to ‘john’. 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 exam‐ ined for the name of the sender. -bd Run as a daemon. This requires Berkeley IPC. _S_e_n_d_m_a_i_l will fork and run in background listening on socket 25 for incoming SMTP connections. This is normally run from _/_e_t_c_/_r_c. -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 on standard input and output. 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 con‐ figuration tables. -bv Verify names only - do not try to collect or deliver a mes‐ sage. Verify mode is normally used for validating users or mailing lists. -bz Create the configuration freeze file. -C_f_i_l_e Use alternate configuration file. _S_e_n_d_m_a_i_l refuses to run as root if an alternate configuration file is specified. The frozen configuration file is bypassed. -d_X Set debugging value to _X_. -F_f_u_l_l_n_a_m_e Set the full name of the sender. -f_n_a_m_e Sets the name of the ‘‘from’’ person (i.e., the sender of the mail). -f can only be used by ‘‘trusted’’ users (nor‐ mally _r_o_o_t_, _d_a_e_m_o_n_, and _n_e_t_w_o_r_k_) or if the person you are trying to become is the same as the person you are. -h_N 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. If not specified, ‘‘Received:’’ lines in the message are counted. -n Don’t do aliasing. -o_x_v_a_l_u_e Set option _x to the specified _v_a_l_u_e_. Options are described below. -q[_t_i_m_e] Processed saved messages in the queue at given intervals. If _t_i_m_e is omitted, process the queue once. _T_i_m_e is given as a tagged number, with ‘s’ being seconds, ‘m’ being min‐ utes, ‘h’ being hours, ‘d’ being days, and ‘w’ being weeks. For example, ‘‘-q1h30m’’ or ‘‘-q90m’’ would both set the timeout to one hour thirty minutes. If _t_i_m_e is specified, _s_e_n_d_m_a_i_l will run in background. This option can be used safely with -bd. -r_n_a_m_e An alternate and obsolete form of the -f flag. -t Read message for recipients. To:, Cc:, and Bcc: lines will be scanned for recipient addresses. The Bcc: line will be deleted before transmission. Any addresses in the argument list will be suppressed, that is, they will _n_o_t receive copies even if listed in the message header. -v Go into verbose mode. Alias expansions will be announced, etc. There are also a number of processing options that may be set. Nor‐ mally these will only be used by a system administrator. Options may be set either on the command line using the -o flag or in the configu‐ ration file. These are described in detail in the _S_e_n_d_m_a_i_l _I_n_s_t_a_l_l_a_‐ _t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e_. The options are: A_f_i_l_e Use alternate alias file. c On mailers that are considered ‘‘expensive’’ to connect to, don’t initiate immediate connection. This requires queue‐ ing. d_x Set 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 done the next time the queue is run. D Try to automatically rebuild the alias database if neces‐ sary. e_x 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 to this machine, a copy of the message is appended to the file ‘‘dead.letter’’ in the sender’s home directory. F_m_o_d_e The mode to use when creating temporary files. f Save UNIX-style From lines at the front of messages. g_N The default group id to use when calling mailers. H_f_i_l_e The SMTP help file. i Do not take dots on a line by themselves as a message ter‐ minator. L_n The log level. m Send to ‘‘me’’ (the sender) also if I am in an alias expan‐ sion. o If set, this message may have old style headers. 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. Q_q_u_e_u_e_d_i_r Select the directory in which to queue messages. r_t_i_m_e_o_u_t The timeout on reads; if none is set, _s_e_n_d_m_a_i_l will wait forever for a mailer. This option violates the word (if not the intent) of the SMTP specification, show the timeout should probably be fairly large. S_f_i_l_e Save statistics in the named file. s Always instantiate the queue file, even under circumstances where it is not strictly necessary. This provides safety against system crashes during delivery. T_t_i_m_e Set the timeout on undelivered messages in the queue to the specified time. After delivery has failed (e.g., because of a host being down) for this amount of time, failed mes‐ sages will be returned to the sender. The default is three days. t_s_t_z_,_d_t_z Set the name of the time zone. u_N Set the default user id for mailers. In aliases, the first character of a name may be a vertical bar to cause interpretation of the rest of the name as a command to pipe the mail to. It may be necessary to quote the name to keep _s_e_n_d_m_a_i_l from suppressing the blanks from between arguments. For example, a common alias is: msgs: "|/usr/ucb/msgs -s" Aliases may also have the syntax ‘‘:include:_f_i_l_e_n_a_m_e’’ to ask _s_e_n_d_m_a_i_l to read the named file for a list of recipients. For example, an alias such as: poets: ":include:/usr/local/lib/poets.list" would read _/_u_s_r_/_l_o_c_a_l_/_l_i_b_/_p_o_e_t_s_._l_i_s_t for the list of addresses making up the group. _S_e_n_d_m_a_i_l returns an exit status describing what it did. The codes are defined in <_s_y_s_e_x_i_t_s_._h> EX_OK Successful completion on all addresses. EX_NOUSER User name not recognized. EX_UNAVAILABLE Catchall meaning necessary resources were not available. EX_SYNTAX Syntax error in address. EX_SOFTWARE Internal software error, including bad arguments. EX_OSERR Temporary operating system error, such as “cannot fork”. EX_NOHOST Host name not recognized. EX_TEMPFAIL Message could not be sent immediately, but was queued. If invoked as _n_e_w_a_l_i_a_s_e_s_, _s_e_n_d_m_a_i_l will rebuild the alias database. If invoked as _m_a_i_l_q_, _s_e_n_d_m_a_i_l will print the contents of the mail queue. FILES Except for /usr/lib/sendmail.cf, these pathnames are all specified in /usr/lib/sendmail.cf. Thus, these values are only approximations. /usr/lib/aliases raw data for alias names /usr/lib/aliases.pag /usr/lib/aliases.dir data base of alias names /usr/lib/sendmail.cf configuration file /usr/lib/sendmail.fc frozen configuration /usr/lib/sendmail.hf help file /usr/lib/sendmail.st collected statistics /usr/spool/mqueue/* temp files SEE ALSO binmail(1), mail(1), rmail(1), syslog(3), aliases(5), sendmail.cf(5), mailaddr(7), rc(8); DARPA Internet Request For Comments RFC819, RFC821, RFC822; _S_e_n_d_m_a_i_l _- _A_n _I_n_t_e_r_n_e_t_w_o_r_k _M_a_i_l _R_o_u_t_e_r (SMM:16); _S_e_n_d_m_a_i_l _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e (SMM:7) 4th Berkeley Distribution May 22, 1986 SENDMAIL(8)