Complete Contents
Chapter 1 Getting Started With Netscape Messaging Server
Chapter 2 Configuring IMAP and POP Services
Chapter 3 Configuring SMTP Services
Chapter 4 Managing Mail Users and Mailing Lists
Chapter 5 Managing the Message Store
Chapter 6 Security and Access Control
Chapter 7 Working With SMTP Plugins
Chapter 8 Filtering Unsolicited Bulk Email
Chapter 9 Message Routing
Chapter 10 Monitoring and Maintaining Your Server
Chapter 11 Logging and Log Analysis
Appendix A Command Line Utilities
Appendix B Program Delivery
Appendix C sendmail Migration and Compatibility
Appendix D SNMP MIB
Glossary
Messaging Server Administrator's Guide: sendmail Migration and
Previous Next Contents Index Bookshelf


Appendix C sendmail Migration and Compatibility

Netscape Messaging Server 4.0 includes a sendmail emulator program to maintain compatibility with mail programs that employ Unix sendmail to deliver their mail. This appendix explains how to move user mail accounts and mail messages from a Unix sendmail system to Messaging Server. It also describes the similarities and differences between the Unix sendmail application and the Messaging Server sendmail emulator.

This appendix includes the following sections:


Moving Users to Messaging Server
To migrate from a Unix sendmail system to Netscape Messaging Server 4.0, you need to perform the following procedures:

  1. Use the unix2ldif utility to convert Unix user account information into an LDIF format file, for example, a file named file.ldif. See Running the unix2ldif Utility for a detailed description of this step.
  2. If the LDAP Directory already contains data, run the ldifsplit utility to split the LDIF file into two different LDIF format files:
  3. See Running the ldifsplit Utility for a detailed description of this step.

  4. Use the chkuniq utility to check for duplicate DNs, user IDs, and email addresses. See Running the chkuniq Utility for a detailed description of this step.
  5. Update the LDAP Directory with the user information that is now in the LDIF format files. See Updating the LDAP Directory for a detailed description of this step.
  6. Use the chkuniq utility to perform a final check for duplicate DNs, user IDs, and email addresses on the LDAP Directory.
  7. Use the MigrateUnixSpool utility to move messages from users' sendmail spool files to the Messaging Server mailbox directories. See Moving sendmail Messages to Messaging Server.
Running the unix2ldif Utility

The unix2ldif utility writes your sendmail user account information to an LDIF (LDAP Data Interchange Format) file. The unix2ldif utility creates one LDAP entry in the LDIF file for each user account. If an account is skipped, the utility gives you a warning. The LDIF file contains the following information:

By default, the unix2ldif utility gets its input from the following /etc directory files:

By default, the unix2ldif utility operates on the three /etc files listed above. If those are the files that unix2ldif is to use, you do not need to explicitly specify the input files with the -a, -p, or -s options. If the input files are not in the /etc directory, or if they do not exist at all, or if they have different names, you can use the -a, -p, or -s options to specify the files you want unix2ldif to work on. For example, if you want to migrate your users in stages, you could create input files containing just a subset of users and then run unix2ldif on those files using the -p, -s, and -a options.

Note that unix2ldif can also read SunOS and Solaris NIS map files once they've been converted to ASCII format as described in unix2ldif and NIS Maps.

The unix2ldif utility is located in server-root/bin/msg/admin/bin

To run the utility, run the following command:

unix2ldif -b dn -d domain [options] > file.ldif

The -b dn and -d domain parameters are required. You can name the unix2ldif output file whatever you want (this document uses the name file.ldif).

The command-line options for unix2ldif are described in Table C.1.

Table C.1 unix2ldif options

Option
Description
-a file
For specifying an absolute path and name for the aliases input file. To specify no file, use /dev/null. Use this option if the aliases file:
-b dn
Required. The base DN (distinguished name) to use in each DN constructed. To specify no DN, use empty double quotes (" "). For more information about the base DN, see your Directory Server documentation.
-d domain
Required. The address completion domain. This specifies the domain name that will be to the right of the @ in each user's email address. For example, to specify that each user's email address is in the form: user@airius.com, you would use the option -d airius.com.

You can use the -d option multiple times in a single command to produce multiple addresses for each user. The first address appears as the mail attribute; the other addresses appear as mailAlternateAddress attributes. See Address and Host Completion Domains for additional information.
-D domain
The host completion domain; host becomes host.domain. The default is the first value given for the -d option. Used to complete host names found in the aliases file. See Address and Host Completion Domains for additional information.
-f
Create forwarding-only entries in LDAP. Use for unresolved, single-target aliases from the aliases file.
-F
Create forwarding-only entries in LDAP. Use for all unresolved aliases in the aliases file.
-g
Create group entries in LDAP. Use for unresolved, multi-target aliases in the aliases file.
-G
Create group entries in LDAP. Use for all unresolved aliases in the aliases file.
-h host
The mailHost value to use for each user when no value can be derived from the aliases file. By default, unix2ldif relies on the aliases file for this information. See Routing Aliases for additional information regarding this option.
-H host
An alternative to -h, -H forces the mailHost values for all users to be the value specified by host. This value cannot be overridden by the aliases file. See Routing Aliases for additional information regarding this option.
-m
Turn off the automatic inclusion of maildeliveryoption: mailbox in the ldif entry.
-n
Turn off the automatic migration of .forward information for all users.
-o
Represent each forwarding-only entry in the directory as an organizational person. With this option, the object classes of the forwarding-only entries will be:

objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: mailRecipient
objectclass: nsMessagingServerUser

Without this option, forwarding-only entries will have only these object classes:

objectclass: top
objectclass: mailRecipient
objectclass: nsMessagingServerUser

If you represent the forwarding-only entry as an organizational person, the entry will show up in the Administration Server's User/Group UI under Users. Otherwise, the entry does not show up in the Administration Server's User/Group UI at all.

-p file
For specifying an absolute path and name for the passwd input file. Use this option if the password file is not /etc/passwd.
-s file
For specifying an absolute path and name for the shadow input file.
Use this option if the shadow file:
To specify no file, use /dev/null.
-v string
An attribute of the form attr: value to include with each LDAP user entry constructed. To include individual user names (uid) in the string, use a percent sign (%) in the string where you want the user name to be. You can have up to four % signs for each -v option; however, you can have as many -v options as you need. This option is available for LDAP person entries only; it is not available for forwarding-only or group entries.
-u
Use the user ID (uid) for creating a DN for a user entry. The default is cn.
-z
Turn on debugging mode.

Routing Aliases

A routing alias for a user can be in the format user: user@hostname or the format user@hostname.HostCompletionDomain. For example, esperanza: esperanza@sirius or esperanza@sirius.airius.com. The user ID and the user portion of the routing alias must match exactly (case-sensitive match).

The unix2ldif utility determines how to set the mailHost value as follows:

HostCompletionDomain is defined by the -D option as explained in Using the -D Option to Set the Host Completion Domain.

Address and Host Completion Domains

This section describes how to use the -d and -D address and host completion domain options.

Using the -d Option to Set the Address Completion Domain

The -d option is used to set the address completion domain(s). Address completion domains are used to generate the email addresses of a given user.

You can use -d more than once on a single command line to set several address completion domains. If you use more than one -d option, the first one is considered to be the primary domain. For example, to specify two address completion domains named airius.com and other.com, you enter:

unix2ldif -b dn -d airius.com -d other.com > file.ldif

For the user ID lincoln, this results in the following email addresses:

mail:lincoln@airius.com
mailAlternateAddress: lincoln@other.com

In this example, lincoln@airius.com is the primary address.

Address completion domains are also used to generate more addresses for the user if the user has one or more nickname aliases in the aliases file. (See unix2ldif and aliases Files for additional information on aliases files.)

Nicknames can be in the form nickname: user, where user is the user ID. Recursive nickname aliases are also recognized, for example, othername: nickname. Using the example address completion domains shown above, if lincoln has the nicknames abe: lincoln and my_captain: abe in the aliases file, the following email addresses are generated:

mail:lincoln@airius.com
mailAlternateAddress: lincoln@other.com
mailAlternateAddress: abe@airius.com
mailAlternateAddress: abe@other.com
mailAlternateAddress: my_captain@airius.com
mailAlternateAddress: my_captain@other.com

Using the -D Option to Set the Host Completion Domain

The -D option is used to set the host completion domain. If -D is not used, unix2ldif uses the primary address completion domain (the value specified with the -d) as the host completion domain.

The host completion domain is used as follows:

Note that HostCompletionDomain is not applied to addresses found in a user's .forward file when creating a user LDAP entry and reading the .forward file to find forwarding addresses. Forwarding addresses read from a user's .forward file must be of the form something@domain, where domain is a DNS domain string containing at least one dot.

unix2ldif and aliases Files

When unix2ldif reads an aliases file, each entry is assumed to be in one of two forms:

key: value
key value

The key: value form is typical of /etc/aliases files, the key value form is typical of the output of ypcat -k aliases which dumps the NIS aliases map as explained in unix2ldif and NIS Maps. Any spaces between the colon and the value in the /etc form are ignored. No leading spaces are allowed before the key, but spaces are allowed within the key. Spaces are not allowed between the key and the colon (:) in the /etc form. Trailing white spaces after value are allowed but ignored.

The :include directive is not supported. If this directive is used in an aliases file, the results are undefined.

If there is more than one alias with the same key, this is considered to be invalid, and the results are undefined.

The value may contain one target. For example: name: miyoko. Or the value may contain multiple targets. For example: name: miyoko, hirokani, atemi. A comma is used to separate multiple targets. White space before or after a comma is allowed, but is ignored.

Each target must be a valid email address. For example: sarah, sarah@antares, sarah@antares.airius.com, sarah@airius.com.

Alias targets that contain certain unexpected characters such as: # & / % | (for example, /dev/null) are ignored. In such cases, the alias is still used if any usable targets are present.

The unix2ldif utility makes multiple passes through an aliases file. If an alias is selected in a given unix2ldif pass, it is not used in subsequent passes. The aliases are used as follows.

Pass 1. When creating user accounts for each user ID found in the passwd file, unix2ldif checks to see if an alias has a key equal to the user ID. If so, it considers it selected in this pass (and not available in subsequent passes). If the -H option was not used, and the alias fits the form of a routing alias (as discussed in Routing Aliases), it is used to determine the user's mailHost value, but otherwise, the alias is not used.

Pass 2. When creating user accounts for each user ID found in the passwd file, unix2ldif checks to see if there are any nickname aliases for the user ID. If so, they are used to generate addresses.

Pass 3. Remaining single-target aliases are used to create Forwarding Alias entries if the -f or -F options were specified. Or Mail Group entries if the -G option was specified. Remaining multi-target aliases are used to create Forwarding Alias entries if the -F option was specified, or Mail Group entries if the -g or -G options were specified.

Unexpected results may occur if there are conflicts between user IDs and aliases. For example, if chou and wong are both user IDs in the passwd file, and there is an alias chou: wong, unexpected results may be produced. (It is considered unexpected that aliases are being used to forward from one passwd file user account to another passwd file user account because this is ordinarily done with .forward).

At the end of its run, unix2ldif outputs those aliases that were not used.

unix2ldif and passwd Files

A passwd file entry is considered by unix2ldif as a valid passwd file user account if all of the following are true:

If the passwd entry is valid, an LDAP user entry is created for the user in the unix2ldif output file.

unix2ldif and NIS Maps

The unix2ldif utility can also read Network Information Service (NIS) map files.

If your NIS environment does not include /etc/shadow files (or /etc/security/shadow files in AIX environments), follow these steps to run unix2ldif on NIS maps:

  1. Use ypcat to copy the NIS map data to ASCII files as follows:
  2. 	ypcat passwd > /tmp/passwd.txt
    ypcat -k aliases > /tmp/aliases.txt

  3. Run unix2ldif on the two /tmp/*.txt files you just created.
  4. 	unix2ldif -b dn -d domain -p /tmp/passwd.txt \
    -s /dev/null -a /tmp/aliases.txt > file.ldif

If your NIS environment does include /etc/shadow files (or /etc/security/shadow files in AIX environments), follow these steps to run unix2ldif on NIS maps:

  1. Use ypcat to copy the NIS map data to ASCII files as follows:
  2. 	ypcat passwd > /tmp/passwd.txt
    ypcat shadow > /tmp/shadow.txt
    ypcat -k aliases > /tmp/aliases.txt

  3. Run unix2ldif on the three /tmp/*.txt files you just created.
  4. 	unix2ldif -b dn -d domain -p /tmp/passwd.txt \
    -s /tmp/shadow.txt -a /tmp/aliases.txt > file.ldif

If your NIS environment does not use a shadow file, and therefore you do not have a shadow.txt file, use -s /dev/null instead of -s /tmp/shadow.txt.

Running the ldifsplit Utility

The ldifsplit utility takes the LDIF file created by the unix2ldif utility (file.ldif) and splits it into two files:

If your LDAP Directory is empty, you do not need to run ldifsplit. But if your LDAP Directory already contains user account information, running ldifsplit at this time may prevent later problems.

The ldifsplit utility is located in server-root/bin/msg/admin/bin.

To run the ldifsplit utility, follow these steps:

  1. Export the contents of your LDAP server instance into an LDIF file. You can name the export file whatever you want (this document uses the name existing.ldif). See your Directory Server documentation for details on how to export a directory server instance.
  2. Run the ldifsplit utility using the following syntax (assuming that the unix2ldif output file is named file.ldif and the LDAP Directory export file is named existing.ldif):
  3.     ldifsplit -f file.ldif -e existing.ldif -a add.ldif -m mod.ldif

    With this syntax, ldifsplit compares the unix2ldif output file (file.ldif) to the existing contents of the LDAP Directory as contained in the export file (existing.ldif). The utility then creates two new files:

  4. Check the add.ldif and mod.ldif files to see if they contain any entries.
  5. 	tail add.ldif
    tail mod.ldif

    If a file is empty, you do not need to do anything with it.

    If either the add.ldif file or the mod.ldif file contains data, that data needs to be written into the LDAP Directory as described in Updating the LDAP Directory.

The command-line options for ldifsplit are described in Table C.2.

Table C.2 ldifsplit options

Option
Description
-a add.ldif
Name of file containing new entries to be added.
-e existing.ldif
Name of the file containing the data that currently exists in the LDAP Directory server instance.
-f file.ldif
Name of the unix2ldif output file.
-m mod.ldif
Name of file containing LDAP entries that ned to be modified in the LDAP Directory.

Running the chkuniq Utility

The chkuniq utility checks the output files of the unix2ldif and ldifsplit utilities and the contents of the existing LDAP Directory for duplicate entries. It checks the specified files for

The chkuniq utility is located in server-root/bin/msg/admin/bin.

The steps that follow describe how to eliminate duplicate entries before writing data to the LDAP Directory.

(Note: The steps below assume that you used ldifsplit to create the add.ldif file as described in Running the ldifsplit Utility. If you did not run ldifsplit, then run chkuniq on the unix2ldif output file (file.ldif) rather than add.ldif.)

  1. Use chkuniq to make sure that the add.ldif file (or file.ldif) is internally consistent with no duplicates.
  2.     chkuniq add.ldif

  3. Use chkuniq to make sure that the existing.ldif file is internally consistent with no duplicates. (The existing.ldif file is created by exporting the current contents of the LDAP Directory to a file named existing.ldif.)
  4.     chkuniq existing.ldif

  5. Use chkuniq to compare the add.ldif file and existing.ldif files against each other.
  6.     chkuniq add.ldif existing.ldif

When chkuniq finds a duplicate, it reports that to standard output. Or you can use > filename to redirect output to a file.

There is no output if chkuniq does not find any duplicates.

If chkuniq reports duplicates or errors, inspect your files and correct and resolve all problems before writing data to the LDAP Directory as described in Updating the LDAP Directory. (The most common cause of duplicates are errors in the passwd and aliases files that were given to unix2ldif as input.)

The command-line syntax options for the chkuniq utility are described in Table C.3.

Table C.3 chkuniq options

Syntax
Description
chkuniq file1
Check for duplicates within file1.
chkuniq file1 file2
Check for duplicates among file1 and file2.

Updating the LDAP Directory

The final stage of moving users from a Unix sendmail system to Netscape Messaging Server is to update the LDAP Directory with the account information converted from sendmail.

There are two ways to update the LDAP Directory from the LDIF files:

Updating the LDAP Directory with Database Manager

You can use the Database Manager feature to write the user account information in the LDIF files to the LDAP Directory instance on the Directory Server.

To update the LDAP Directory instance with the Database Manager, follow these steps:

  1. Make sure the Directory Server is running.
  2. Log in to the Directory Server. You must have read and execute permission to use Database Manager and read and write permissions for the targeted entries in the LDAP directory. (You can run this remotely using -h host.)
  3. Go to the Database Manager screen as described in your Directory Server documentation.
  4. Select the Add Entries form.
  5. In the Full Path to LDIF File field, enter the full path name to the LDIF file that contains the entries you want to add.
  6. If you created add.ldif and mod.ldif files by running ldifsplit, enter the full path and name of the add.ldif file. For example, if you ran ldifsplit in the /tmp directory: /tmp/add.ldif. Then repeat the process for mod.ldif.

    If you did not run ldifsplit, enter the full path and name of the unix2ldif output file. For example: /tmp/file.ldif.

  7. Leave the Bind to Server field as is.
  8. The Password field should already contain the correct password.
  9. Choose Okay. The entries are added to your Directory Server manager.
Updating the LDAP Directory with ldapmodify

You can use the ldapmodify command-line utility to write the sendmail user account information in the LDIF files to the LDAP Directory instance on the Directory Server.

The ldapmodify utility is located in server-root/userdb/ldap/tools.

To update the LDAP Directory with ldapmodify, follow these steps:

  1. Make sure the Directory Server is running.
  2. Log in to the Directory Server system as root.
  3. Go to the directory containing the LDIF files.
  4. Run ldapmodify to update the LDAP Directory:
  5. If you created add.ldif and mod.ldif files by running ldifsplit, run ldapmodify on both files:

    	ldapmodify -f mod.ldif
    ldapmodify -a -f add.ldif

    If you did not run ldifsplit, run ldapmodify on the unix2ldif output file. For example: file.ldif

    	ldapmodify -a -f file.ldif


Moving sendmail Messages to Messaging Server
Before users can access their messages with Netscape Messaging Server 4.0, their messages must be moved from the sendmail spool file to their Messaging Server mailbox with the MigrateUnixSpool utility. This is done with the MigrateUnixSpool command-line utility.

Running the MigrateUnixSpool Utility

The MigrateUnixSpool utility reads messages from the user's sendmail mailbox and appends them to the user's Messaging Server mailbox.

Administrators can use the MigrateUnixSpool utility to move users' messages for them. Netscape recommends that administrators move messages for users rather than having users move their own messages. To do this, the administrator must be an authorized mail store administrator. When administrators run MigrateUnixSpool to move messages for others, they must use the -a and -v options.

Although users can run the MigrateUnixSpool utility to move their own messages from their sendmail spool file to their Messaging Server mailbox, Netscape recommends against having users move their own messages. If users run MigrateUnixSpool for themselves, they do not use the -a and -v options.

MigrateUnixSpool is located in server-root/bin/msg/admin/bin.

MigrateUnixSpool is run with the following syntax:

MigrateUnixSpool -u uid -o mailspool -d destmailhost 
-a
admin -v password -m destmaildrop

The command-line syntax options for the MigrateUnixSpool utility are described in Table C.4.

Table C.4 MigrateUnixSpool options

Option
Description
-a admin
The user ID of the administrator running MigrateUnixSpool on destmailhost
-d destmailhost
The destination mail server.
-h
Invokes help for this command.
-m destmaildrop
The name of the partition where the user's account is to be created.
-o mailspool
The mail spool path on the source mail server.
-u uid
The user ID of the user whose mailbox needs to be moved.
-v password
The password for the administrator running MigrateUnixSpool on destmailhost

MigrateUnixSpool Example

In this example, an administrator logged in as admin moves the spool file for someone with the user ID lincoln to the Messaging Server host mailserver in the primary partition.

MigrateUnixSpool -u lincoln -o /var/mail/lincoln -d mailserver 
-a admin -v password -m server-root/msg-instance/store/partition/
primary


Compatibility with Unix sendmail
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.

Sendmail Emulator Options and Aliases

Table C.5 in this section lists the alias names you can use to run the Messaging Server sendmail emulator program. Table C.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 C.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 C.5.

Table C.5 Invoking sendmail with alternate names

Name
What running under this name does
bsmtp
Prints an error message because batch SMTP is not supported.
mailq
Reports the contents of the mail queue.
newaliases
Prints an error message because the aliases file is not used.
sendmail
Sends a single mail message.

Note that the result described in Table C.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 C.6.

Table C.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 C.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 C.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 C.7. The options listed in Table C.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 C.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.

 

© Copyright 1998 Netscape Communications Corporation