In order to maintain compatibility with Unix applications and processes that make use of the Unix sendmail command, Netscape Messaging Server 4.0 includes its own sendmail program that replaces the Unix /usr/lib/sendmail software.
Command-line Compatibility
The Messaging Server includes a program named sendmail that emulates the Unix sendmail program in the /usr/lib directory. Most of Unix sendmail's functionality is performed by one or more modules in the Messaging Server, so the sendmail emulator is primarily for compatibility with many mail programs that employ Unix sendmail (rather than SMTP) to deliver their mail. The Messaging Server sendmail emulator program can also be used to start up the Messaging Server mail system and to check and deliver the mail queue.
Sending Mail with the sendmail Emulator
The Messaging Server sendmail emulator maintains compatibility with existing software that delivers mail using the Unix sendmail command.
Some examples of sendmail emulator commands that work for sending mail are:
/usr/lib/sendmail -t < /tmp/message
cat file1 | /usr/lib/sendmail -oem recip1,recip2
For a complete list of command-line options and options related to sending mail, see sendmail Emulator Options and Aliases.
Starting the Messaging Server with sendmail
Because Unix sendmail comes installed on most Unix-based machines, many scripts, such as system boot scripts, exist to start up sendmail. This is done with a command such as:
/usr/lib/sendmail -bd -q30m
The Messaging Server sendmail emulator recognizes this command and starts up the Messaging Server if it isn't already running. The -q30m option is ignored.
Checking the Mail Queue with mailq
Some system administrators are used to typing mailq to check for queued messages. The sendmail emulator provided with the Messaging Server will respond to this command with the contents of the mail queue. However, many server administrators now prefer to use the Messaging Server mail queue form, which makes processing the queue easier.
To check the mail queue with the sendmail emulator program, type mailq at a command prompt. If there are no queued messages, that fact will be reported.
If there are queued messages, each host that has queued messages waiting to be delivered will be listed, along with the number of pending deliveries.
Other Modes
The Unix sendmail program has several other operating modes that aren't necessary or are not supported by the Messaging Server. For a complete list of supported operating modes and command-line options and options, see Functional Compatibility.
Functional Compatibility
The following sections specify the differences between Unix sendmail and the Messaging Server sendmail emulator with regard to SMTP, aliases and mail forwarding, program delivery, file delivery, and mailing lists.
For information about how Netscape Messaging Server routes messages, see the chapter titled Message Routing.
Network Interface
The Messaging Server is preconfigured for interacting with other machines on the Internet.
In contrast, the Unix sendmail program needs to exchange mail with remote destinations using SMTP. Mail routing is achieved with rule sets containing address production rules written in a specialized programming language used to take addresses apart and put them back together in useful ways. Although this is a very powerful facility, it is error prone and requires extensive knowledge of Internet standards to set it up correctly.
Aliases and Mail Forwarding
Unix sendmail supports several types of aliases in the /etc/aliases file and in users' personal .forward files. The various types of aliases allow:
With Messaging Server, each type of alias is created differently because of the structure of user accounts in the Directory Server database.
Delivery to Programs
Using Unix sendmail, you can create an alias or forward that delivers incoming mail to a program. The program then reads the mail and performs some operation depending on the mail contents. These types of programs usually filter messages into different mailboxes or send out automatic replies such as vacation notices. This functionality makes it easy to extend the mail system, but is problematic with respect to security.
You can use the Server Account Management window to set up Messaging Server program delivery for a particular user. However, because there are security issues specific to program delivery, program delivery is disabled by default. See the chapter titled "Program Delivery" for information on how to enable Messaging Server program delivery.
Delivery to Files
Unix sendmail makes it possible to set up an alias or .forward file to append mail to a file. This can be used to keep a record of incoming mail or to delete incoming mail by sending it to /dev/null. However, for delivery-to-file needs the author of sendmail recommends using an alternate delivery agent invoked through the delivery-to-program facility.
The Messaging Server's sendmail emulator will append undeliverable messages to users' dead.letter files, for users with Unix Delivery enabled. No general delivery-to-file facility is planned for the Messaging Server; appending mail to a file should be with the delivery-to-program facility as described in the appendix titled "Program Delivery."
Mailing Lists
Mailing lists in Unix sendmail are implemented using aliases and program deliveries. List recipients are stored either in the aliases database or in an external file using an :include: alias. Several mailing-list administration programs are available that can automate the task of maintaining recipient distribution lists, while sendmail handles the delivery of the messages.
With Messaging Server, you create groups with the Netscape Console as described in Chapter 4, Managing Mail Users and Mailing Lists.
sendmail Emulator Options and Aliases
Table B.5 in this section lists the alias names you can use to run the Messaging Server sendmail emulator program. Table B.6 lists and describes the available command-line arguments that the sendmail emulator program recognizes. Certain options are recognized (through the -o command-line option), and their effects are described in Table B.7.
Alternate Names for sendmail
You can run the Unix sendmail program under several names as a shorthand way to specify the action to perform. The Messaging Server sendmail emulator program recognizes several of these alternate names. The behavior that results from invoking the sendmail emulator with an alternate name is summarized in Table B.5.
Note that the result described in Table B.6 will result if no other result is specified using a command-line option such as -b or -I.
Command-line options are processed using getopt(3) as in V8 sendmail. All the options supported by V8 sendmail, IDA sendmail, and other versions of sendmail are recognized; the extent of support for these options is given in Table B.6.
Table B.6 sendmail emulator program command-line options
Option
| Description
|
-B7
|
If set to 7 bit, the high bit is stripped from every byte of the input message.
|
-bx
|
Changes the mode of operation. Where x is one of the following:
The following modes are supported:
-be Starts the Messaging Server mail system. -bm Sends a single mail message. -bp Shows the status of the mail queue.
These modes are recognized but not supported:
-ba Uses Arpanet protocols. -bb Does batch SMPT on standard input. -bi Initializes the aliases database. -bs Does SMTP on standard input. -bt Goes into address-testing mode. -bz Freezes the configuration.
|
-C
|
None. There is no configuration file, so this option is ignored.
|
-c
|
None. This option is obsolete.
|
-d
|
None. This option is ignored because there is no debug mode.
|
-e
|
Sets the error-reporting mode (see option e in Table B.7).
|
-F
|
Sets the full name of the sender. If the user running sendmail isn't root, daemon, UUCP, SMTP, mail, or sendmail, a header is added to the message indicating the actual sender.
|
-f
|
Sets the email address of the sender. The same precaution is taken as in the -F option.
|
-h
|
None. The hop count is determined by counting the number of received headers in the message.
|
-I
|
Runs as if invoked as newaliases, which just prints an error message.
|
-i
|
None. This is the default behavior. If sendmail is run interactively, a single "." (.) will end the message. If it is run non-interactively (for example, through a pipe to standard input), the end-of-file condition determines the end of the message.
|
-M
|
The entire queue is processed regardless of the specified Message ID.
|
-m
|
None. This is the default behavior. The sender is never removed from the list of recipients if it is listed as a recipient.
|
-n
|
None. This option is not supported.
|
-o
|
Sets an option. See Table B.7 for a list of supported options.
|
-p
|
None. This option is not supported.
|
-q
|
The deferred message queue is processed. If a time interval is given (for example, sendmail -bd -q30m), this option is ignored. When this option is specified as -qR, -qS, or -qI (as in V8 sendmail), then the behavior is the same as -R, -S, or -M, respectively.
|
-R
|
Attempts to process the queue for hosts matching the pattern provided (for example, sendmail -Rabc will start delivery of queued messages for all hosts containing the string abc).
|
-r
|
Same as -f option.
|
-S
|
The entire queue is processed regardless of the specified sender.
|
-s
|
None. This option is obsolete.
|
-T
|
None. This option is obsolete.
|
-t
|
Recipients are gathered from both the command line and the message header, and the message is delivered.
|
-v
|
Output is more verbose when sending mail.
|
-x
|
None. This is an illegal option that is recognized only to prevent printing an error message.
|
-Z
|
None. There is no frozen configuration file (or even a regular configuration file).
|
Options for sendmail
The Messaging Server sendmail emulator doesn't need a configuration file (sendmail.cf), yet most of Unix sendmail's options can be set from the command line. Many of the options are meant for the sendmail daemon, but some of them are relevant to the normal operation of sending mail.
All the options supported by V8 sendmail are recognized, and the extent of the support for these options is shown in Table B.7. The options listed in Table B.7 refer only to the sendmail emulator, not to Messaging Server as a whole. Many of the options not supported by the sendmail emulator are supported by the Messaging Server in one way or another. Refer to the relevant sections of this guide to determine how to set parameters within the Messaging Server.
Table B.7 Options supported by V8 sendmail
Option
| Description
|
7
|
If set, the high bit is stripped from every byte of the input message. Also see the -B command-line option.
|
B
|
This is always set to "." (period) and cannot be changed.
|
d
|
None. Because messages are always posted to the local SMTP server, the turn-around time is fairly quick, so the "i" or interactive mode is always used. However, support for other delivery modes may be added in the future.
|
e mode
|
Changes the error-reporting mode. Valid modes are e, m, p, q, and w. The behavior for each mode is the same as with Unix sendmail. However, if the local SMTP server is unavailable for some reason and mode m is chosen, the error message will not be deliverable either. In this case, the message is saved in the sender's ~/dead.letter file.
|
f
|
None. When a "From:" line is received, it is changed to "X-Unix-From:" so that it will be RFC822 compliant.
|
i
|
None. See the -i command-line option for details.
|
o
|
None. This is the default behavior and cannot be disabled.
|
v
|
Turns on verbose output. Also see the -v command-line option.
|
Others
|
No other options have any effect. All other options, even invalid ones, are ignored.
|