This chapter describes how to set up and administer mail services. If you are not familiar with administering mail services, read Chapter 24, Mail Services (Overview) for an introduction to the components of mail services. This chapter also provides a description of a typical mail service configuration, as shown in Figure 24–1. The following list can help you find groups of related procedures that are covered in this chapter.
See Chapter 26, Mail Services (Reference) for a more detailed description of the components of mail services. This chapter also describes the mail service programs and files, the mail routing process, and the interactions of sendmail with name services.
See Chapter 27, What's New With Mail Services (Reference) for a description of the new features that are included in version 8.12 of sendmail. You can also read about changes to mail.local, mailstats, and makemap. Chapter 27, What's New With Mail Services (Reference) also provides a description of a new maintenance command, editmap.
The following table refers you to other task maps that focus on a specific group of procedures.
Task |
Description |
For Instructions |
---|---|---|
Setting up mail services |
Use these procedures to set up each component of your mail service. Learn how to set up a mail server, a mail client, a mail host, a mail gateway, and a virtual host. Also, learn how to use DNS with sendmail. | |
Building a sendmail configuration file |
Use this procedure to modify your sendmail.cf file. See an example of how to enable domain masquerading. | |
Managing mail delivery with an alternate configuration |
Use this procedure to prevent mail delivery problems that can occur if the master daemon is disabled. |
Managing Mail Delivery by Using an Alternate Configuration (Task) |
Administering mail alias files |
Use these procedures to provide aliasing on your network. Learn how to manage entries in NIS+ tables. Also, learn how to set up an NIS map, a local mail alias, a keyed map file, and a postmaster alias. | |
Administering the mail queue |
Use these procedures to provide smooth queue processing. Learn how to display and move the mail queue, force mail queue processing, and run a subset of the mail queue. Also, learn how to run the old mail queue. | |
Administering .forward files |
Use these procedures to disable .forward files or change the search path of the .forward file. Also, learn how to permit users to use the .forward file by creating and populating /etc/shells. | |
Troubleshooting procedures and tips for mail services |
Use these procedures and tips to resolve problems with your mail service. Learn how to test the mail configuration, check mail aliases, test the sendmail rule sets, verify connections to other systems, and log messages. Also, learn where to look for other mail diagnostic information. |
Troubleshooting Procedures and Tips for Mail Services (Task Map) |
Resolving error messages |
Use the information in this section to resolve some mail-related error messages. |
The following list describes some concerns that should be part of your planning process.
Determine the type of mail configuration that meets your requirements. This section describes two basic types of mail configuration and briefly lists what you need to set up each configuration. If you need to set up a new mail system or if you are expanding an existing one, you might find this section useful. Local Mail Only describes the first configuration type, and Local Mail and a Remote Connection describes the second type.
As necessary, choose the systems that are to act as mail servers, mail hosts, and mail gateways.
Make a list of all the mail clients for which you are providing service and include the location of their mailboxes. This list can help you when you are ready to create mail aliases for your users.
Decide how you plan to update aliases and forward mail messages. You might set up an aliases mailbox as a place for users to send requests for mail forwarding. Users could also use this mailbox to send requests for changes to their default mail alias. If your system uses NIS or NIS+, you can administer mail forwarding, rather than requiring users to manage mail forwarding. Administering Mail Alias Files (Task Map) provides a list of tasks that are related to aliasing. Administering .forward Files (Task Map) provides a list of tasks that are related to managing .forward files.
After you have completed the planning process, set up the systems on your site to perform the functions that are described in Setting Up Mail Services (Task Map). For other task information, refer to Task Map for Mail Services.
The simplest mail configuration, as shown in Figure 25–1, is two or more workstations that are connected to one mail host. Mail is completely local. All the clients store mail on their local disks, and the clients act as mail servers. Mail addresses are parsed by using the /etc/mail/aliases files.
To set up this kind of mail configuration, you need the following.
The default /etc/mail/sendmail.cf file, which requires no editing, on each mail client system.
A server that is designated as the mail host. You can make this designation by adding mailhost.domain_name to the /etc/hosts file on the mail host. Then, if you are not running NIS or NIS+, add the mail host IP address line to the /etc/hosts file of all mail clients.
Unless you are running NIS or NIS+, you need matching /etc/mail/aliases files on any system that has a local mailbox.
Enough space in /var/mail on each mail client system to hold the mailboxes.
For task information on setting up your mail service, refer to Setting Up Mail Services (Tasks). If you are looking for a particular procedure that is related to setting up your mail service, refer to Setting Up Mail Services (Task Map).
The most common mail configuration in a small network is shown in Figure 25–2. One system includes the mail server, the mail host, and the mail gateway that provides the remote connection. Mail is distributed by using the /etc/mail/aliases files on the mail gateway. No name service is required.
In this configuration, you can assume that the mail clients mount their mail files from /var/mail on the mail host. To set up this kind of mail configuration, you need the following.
The main.cf file on the mail gateway. This file requires no editing if Mail Exchanger (MX) records are used.
The default /etc/mail/sendmail.cf file on each mail client system. This file does not require any editing.
A server that is designated as the mail host. You can make this designation by adding mailhost.domain_name to the /etc/hosts file on the mail host. Then, if you are not running NIS or NIS+, you must provide additional information. Add the IP address line for the mail host to the /etc/hosts file of every mail client.
Unless you are running NIS or NIS+, you need matching /etc/mail/aliases files on any system that has a local mailbox.
Enough space in /var/mail on the mail server to hold the client mailboxes.
For task information on setting up your mail service, refer to Setting Up Mail Services (Tasks). If you are looking for a particular procedure that is related to setting up your mail service, refer to Setting Up Mail Services (Task Map).
The following table describes the procedures for setting up mail services.
Task |
Description |
For Instructions |
---|---|---|
Setting up a mail server |
Steps to enable a server to route mail | |
Setting up a mail client |
Steps to enable a user to receive mail | |
Setting up a mail host |
Steps to establish a mail host that can resolve email addresses | |
Setting up a mail gateway |
Steps to manage communication with networks outside your domain | |
Using DNS with sendmail |
Steps to enable DNS host lookups | |
Setting up a virtual host |
Steps to assign more than one IP address to a host |
You can readily set up a mail service if your site does not provide connections to email services outside your company or if your company is in a single domain.
Mail requires two types of configurations for local mail. Refer to Figure 25–1 in Local Mail Only for a representation of these configurations. Mail requires two more configurations for communication with networks outside your domain. Refer to Figure 24–1 in Overview of the Hardware Components or Figure 25–2 in Local Mail and a Remote Connection for a representation of these configurations. You can combine these configurations on the same system or provide these configurations on separate systems. For example, if your mail host and mail server functions are on the same system, follow the directions in this section for setting up that system as a mail host. Then, follow the directions in this section for setting up the same system as a mail server.
The following procedures for setting up a mail server and mail client apply when mailboxes are NFS mounted. However, mailboxes typically are maintained in locally mounted /var/mail directories, which eliminates the need for the following procedures.
No special steps are required to set up a mail server that is only serving mail for local users. The user must have an entry in the password file or in the namespace. Also, for mail to be delivered, the user should have a local home directory for checking the ~/.forward file. For this reason, home directory servers are often set up as the mail server. Hardware Components in Chapter 26, Mail Services (Reference) provides more information about the mail server.
The mail server can route mail for many mail clients. This type of mail server must have adequate spooling space for client mailboxes.
For clients to access their mailboxes, the /var/mail directory should be available for remote mounting. Alternately, a service such as Post Office Protocol (POP) or Internet Message Access Protocol (IMAP) should be available from the server. The following task shows you how to set up a mail server by using the /var/mail directory. To provide configuration guidelines for POP or IMAP is beyond the scope of this document.
For the following task, ensure that the /etc/dfs/dfstab file shows that the /var/mail directory is exported.
Become superuser on the mail server or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Stop sendmail.
# /etc/init.d/sendmail stop |
Check if the /var/mail directory is available for remote access.
# share |
If the /var/mail directory is listed, proceed to step 5.
If the /var/mail directory is not listed or if no list appears, continue with the appropriate substep.
(Optional) If no list appears, start NFS services.
Follow the procedure, How to Set Up Automatic File-System Sharing, to use the /var/mail directory to start NFS services.
(Optional) If the /var/mail directory is not included in the list, add the directory to /etc/dfs/dfstab.
Add the following command line to the /etc/dfs/dfstab file.
share -F nfs -o rw /var/mail |
Make the file system available for mounting.
# shareall |
Ensure that your name service has been started.
(Optional) If you are running NIS, use this command.
# ypwhich |
For more information, refer to the ypwhich(1) man page.
(Optional) If you are running NIS+, use this command.
# nisls |
For more information, refer to the nisls(1) man page.
(Optional) If you are running DNS, use this command.
# nslookup hostname |
hostname |
Use your host name. |
For more information, refer to the nslookup(1M) man page.
(Optional) If you are running LDAP, use this command.
# ldaplist |
For more information, refer to the ldaplist(1) man page.
Restart sendmail.
# /etc/init.d/sendmail start |
The mail.local program automatically creates mailboxes in the /var/mail directory the first time a message is delivered. You do not need to create individual mailboxes for your mail clients.
A mail client is a user of mail services with a mailbox on a mail server. Additionally, the mail client has a mail alias in the /etc/mail/aliases file that points to the location of the mailbox. Hardware Components in Chapter 26, Mail Services (Reference) provides a brief description of a mail client.
You can also perform the task of setting up a mail client by using a service such as Post Office Protocol (POP) or Internet Message Access Protocol (IMAP). However, to provide configuration guidelines for POP or IMAP is beyond the scope of this document.
Become superuser on the mail client's system or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Stop sendmail.
# /etc/init.d/sendmail stop |
Ensure that a /var/mail mount point exists on the mail client's system.
The mount point should have been created during the installation process. You can use ls to ensure that the file system exists. The following example shows the response that you receive if the file system has not been created.
# ls -l /var/mail /var/mail not found |
Ensure that no files are in the /var/mail directory.
If mail files do exist in this directory, you should move them so that they are not covered when the /var/mail directory is mounted from the server.
Mount the /var/mail directory from the mail server.
You can mount the mail directory automatically or at boot time.
(Optional) Mount /var/mail automatically.
Add an entry such as the following to the /etc/auto_direct file.
/var/mail -rw,hard,actimeo=0 server:/var/mail |
server |
Use the assigned server name. |
(Optional) Mount /var/mail at boot time.
Add the following entry to the /etc/vfstab file. This entry permits the /var/mail directory on the mail server that is specified to mount the local /var/mail directory.
server:/var/mail - /var/mail nfs - no rw,hard,actimeo=0 |
The client's mailbox is automatically mounted whenever the system is rebooted. If you are not rebooting the system, type the following command to mount the client mailbox.
# mountall |
For mailbox locking and mailbox access to work properly, you must include the actimeo=0 option when mounting mail from an NFS server.
Update /etc/hosts.
Edit the /etc/hosts file and add an entry for the mail server. This step is not required if you are using a name service.
# cat /etc/hosts # # Internet host table # .. IP_address mailhost mailhost mailhost.example.com |
IP_address |
Use the assigned IP addresses. |
example.com |
Use the assigned domain. |
mailhost |
Use the assigned mailhost. |
For more information, refer to the hosts(4) man page.
Add an entry for the client to one of the alias files.
Refer to Administering Mail Alias Files (Task Map) for a task map about administering mail alias files.
The mail.local program automatically creates mailboxes in the /var/mail directory the first time a message is delivered. You do not need to create individual mailboxes for your mail clients.
Restart sendmail.
# /etc/init.d/sendmail start |
A mail host resolves email addresses and reroutes mail within your domain. A good candidate for a mail host is a system that provides your network with a remote connection or connects your network to a parent domain. The following procedure shows you how to set up a mail host.
Become superuser on the mail host system or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Stop sendmail.
# /etc/init.d/sendmail stop |
Verify the host-name configuration.
Run the check-hostname script to verify that sendmail can identify the fully qualified host name for this server.
% /usr/lib/mail/sh/check-hostname hostname phoenix OK: fully qualified as phoenix.example.com |
If this script is not successful in identifying the fully qualified host name, you need to add the fully qualified host name as the first alias for the host in /etc/hosts.
Update the /etc/hosts file.
Choose the step that is appropriate for you.
(Optional) If you are using NIS or NIS+, edit the /etc/hosts file on the system that is to be the new mail host.
Add the word mailhost and mailhost.domain after the IP address and system name of the mail host system.
IP_address mailhost mailhost mailhost.domain loghost |
IP_address |
Use the assigned IP address. |
mailhost |
Use the system name of the mail host system. |
domain |
Use the expanded domain name. |
The system is now designated as a mail host. The domain should be identical to the string that is given as the subdomain name in the output of the following command.
% /usr/lib/sendmail -bt -d0 </dev/null Version 8.12.0+Sun Compiled with: LDAPMAP MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS NISPLUS QUEUE SCANF SMTP USERDB XDEBUG ============ SYSTEM IDENTITY (after readcf) ============ (short domain name) $w = phoenix (canonical domain name) $j = phoenix.example.com (subdomain name) $m = example.com (node name) $k = phoenix ======================================================== |
See the following example of how the hosts file should look after these changes.
# cat /etc/hosts # # Internet host table # 172.31.255.255 localhost 192.168.255.255 phoenix mailhost mailhost.example.com loghost |
(Optional) If you are not using NIS or NIS+, edit the /etc/hosts file on each system in the network. Create the following entry.
IP_address mailhost mailhost mailhost.domain loghost |
Select the correct configuration file to copy and rename.
The following command copies and renames the /etc/mail/main.cf file.
# cp /etc/mail/main.cf /etc/mail/sendmail.cf |
Restart sendmail.
# /etc/init.d/sendmail start |
Test your mail configuration.
See How to Test the Mail Configuration for instructions.
For further information about mail hosts, refer to Hardware Components in Chapter 26, Mail Services (Reference).
A mail gateway manages communication with networks outside your domain. The mailer on the sending mail gateway can match the mailer on the receiving system.
A good candidate for a mail gateway is a system that is attached to Ethernet and phone lines. Another good candidate is a system that is configured as a router to the Internet. You can configure the mail host or another system as the mail gateway. You might choose to configure more than one mail gateway for your domain. If you have UNIX-to-UNIX Copy Program (UUCP) connections, you should configure the system (or systems) with UUCP connections as the mail gateway.
Become superuser on the mail gateway or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Stop sendmail.
# /etc/init.d/sendmail stop |
Select the correct configuration file to copy and rename.
The following command copies and renames the main.cf file.
# cp /etc/mail/main.cf /etc/mail/sendmail.cf |
Verify the host-name configuration.
Run the check-hostname script to verify that sendmail can identify the fully qualified host name for this server.
# /usr/lib/mail/sh/check-hostname hostname phoenix OK: fully qualified as phoenix.example.com |
If this script is not successful in identifying the fully qualified host name, you need to add the fully qualified host name as the first alias for the host in /etc/hosts. If you need help with this step, refer to Step 4 of How to Set Up a Mail Host.
Ensure that your name service has been started.
(Optional) If you are running NIS, use this command.
# ypwhich |
For more information, refer to the ypwhich(1) man page.
(Optional) If you are running NIS+, use this command.
# nisls |
For more information, refer to the nisls(1) man page.
(Optional) If you are running DNS, use this command.
# nslookup hostname |
hostname |
Use your host name. |
For more information, refer to the nslookup(1M) man page.
(Optional) If you are running LDAP, use this command.
# ldaplist |
For more information, refer to the ldaplist(1) man page.
Restart sendmail.
# /etc/init.d/sendmail start |
Test your mail configuration
See How to Test the Mail Configuration for instructions.
For more information about the mail gateway, refer to Hardware Components in Chapter 26, Mail Services (Reference).
The DNS name service does not support aliases for individuals. This name service does support aliases for hosts or domains that use Mail Exchanger (MX) records and CNAME records. You can specify host names, domain names, or both names in the DNS database. For more information about sendmail and DNS, see Interactions of sendmail With Name Services in Chapter 26, Mail Services (Reference), or see the System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP).
Become superuser or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Enable DNS host lookups (NIS+ only).
Edit the /etc/nsswitch.conf file and remove the # from the hosts definition that includes the dns flag. The host entry must include the dns flag, as the following example shows, in order for the DNS host aliases to be used.
# grep hosts /etc/nsswitch.conf #hosts: nisplus [NOTFOUND=return] files hosts: dns nisplus [NOTFOUND=return] files |
Check for a mailhost and mailhost.domain entry.
Use nslookup to ensure that an entry exists for mailhost and mailhost.domain in the DNS database. For more information, refer to the nslookup(1M) man page.
If you need to assign more than one IP address to a host, see this Web site: http://www.sendmail.org/virtual-hosting.html. This site provides complete instructions on how to use sendmail to set up a virtual host. However, in the “Sendmail Configuration” section, do not perform step 3b, as shown in the following.
# cd sendmail-VERSION/cf/cf # ./Build mailserver.cf # cp mailserver.cf /etc/mail/sendmail.cf |
Instead, for the Solaris operating environment, perform the following steps.
# cd /usr/lib/mail/cf # /usr/ccs/bin/make mailserver.cf # cp mailserver.cf /etc/mail/sendmail.cf |
mailserver |
Use the name of the .cf file. |
Building the sendmail.cf Configuration File (Task) outlines the same three steps as part of the build process.
After you have generated your /etc/mail/sendmail.cf file, you can continue with the next steps to create a virtual user table.
How to Build a New sendmail.cf File shows you how to build the configuration file. Although you can still use older versions of sendmail.cf files, the best practice is to use the new format.
For more details, you should read from the following resources.
/usr/lib/mail/README provides a complete description of the configuration process.
http://www.sendmail.org provides online information about sendmail configuration.
Versions of the Configuration File and sendmail Configuration File, in Chapter 26, Mail Services (Reference), also provide some guidance.
The following sections in Chapter 27, What's New With Mail Services (Reference) identify new m4 configuration features.
The following procedure shows you how to build a new configuration file.
/usr/lib/mail/cf/main-v7sun.mc is now /usr/lib/mail/cf/main.mc.
Become superuser or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Stop sendmail.
# /etc/init.d/sendmail stop |
Make a copy of the configuration files that you are changing.
# cd /usr/lib/mail/cf # cp main.mc myhost.mc |
myhost |
Select a new name for your .mc file. |
Edit the new configuration files (for example, myhost.mc), as necessary.
For example, add the following command line to enable domain masquerading.
# cat myhost.mc .. MASQUERADE_AS(`host.domain') |
host.domain |
Use the desired host name and domain name. |
In this example, MASQUERADE_AS causes sent mail to be labeled as originating from host.domain, rather than $j.
Build the configuration file by using m4.
# /usr/ccs/bin/make myhost.cf |
Test the new configuration file by using the -C option to specify the new file.
# /usr/lib/sendmail -C myhost.cf -v testaddr </dev/null |
While this command displays messages, it sends a message to testaddr. Only outgoing mail can be tested without restarting the sendmail service on the system. For systems that are not handling mail yet, use the full testing procedure in How to Test the Mail Configuration.
Install the new configuration file after making a copy of the original.
# cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.save # cp myhost.cf /etc/mail/sendmail.cf |
Restart the sendmail service.
# /etc/init.d/sendmail start |
To facilitate the transport of inbound mail and outbound mail, the new default configuration of sendmail uses a daemon and a client queue runner. If you have disabled your daemon, you should perform the following task. For a detailed explanation, refer to New Configuration File, submit.cf.
In the default configuration of sendmail, the client queue runner must be able to submit mail to the daemon on the local SMTP port. If the daemon is not listening on the SMTP port, the mail remains in the queue. To avoid this problem, perform the following task. For more information about the daemon and client queue runner and to understand why you might have to use this alternate configuration, refer to New Configuration File, submit.cf.
This procedure ensures that your daemon runs only to accept connections from the local host.
Become superuser or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Stop sendmail.
# /etc/init.d/sendmail stop |
Make a copy of the configuration file that you are changing. You could copy either subsidiary.mc or main.mc, depending on your requirements. In this example, the subsidiary.mc file is used.
# cd /usr/lib/mail/cf # cp subsidiary.mc myhost.mc |
myhost |
Select a new name for your .mc file. |
Edit the new configuration file (for example, myhost.mc).
Add the following line before the MAILER() lines.
# cat myhost.mc .. DAEMON_OPTIONS(`NAME=NoMTA4, Family=inet, Addr=127.0.0.1')dnl |
(Optional) If your host has an IPv6 local host address that is enabled, edit the new configuration file as follows.
Add both of the following lines before the MAILER() lines.
# cat myhost.mc .. DAEMON_OPTIONS(`NAME=NoMTA4, Family=inet, Addr=127.0.0.1')dnl DAEMON_OPTIONS(`NAME=NoMTA6, Family=inet6, Addr=::1')dnl |
(Optional) To see if your host has an IPv6 local host address that is enbled, run the following command.
# /usr/sbin/ifconfig -a |
If IPv6 is enabled, you should see output that is similar to the following.
lo0: flags=2000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1 inet6 ::1/128 |
Build the configuration file by using m4.
# /usr/ccs/bin/make myhost.cf |
Install the new configuration file after making a copy of the original.
# cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.save # cp myhost.cf /etc/mail/sendmail.cf |
Restart the sendmail service.
# /etc/init.d/sendmail start |
The following table describes the procedures for administering mail alias files. For more information on this topic, refer to Mail Alias Files in Chapter 26, Mail Services (Reference).
Task |
Description |
For Instructions |
---|---|---|
Managing alias entries in an NIS+ mail_aliases table |
If your name service is NIS+, use these procedures to manage the contents of your mail_aliases table. Learn how to list, add, edit, and delete entries. | |
Setting up an NIS mail.aliases map |
If your name service is NIS, follow these instructions to facilitate aliasing with a mail.aliases map. | |
Setting up a local mail alias file |
If you are not using a name service (such as NIS or NIS+), follow these instructions to facilitate aliasing with the /etc/mail/aliases file. | |
Creating a keyed map file |
Use these steps to facilitate aliasing with a keyed map file. | |
Setting up the postmaster alias |
Use the procedures in this section to manage the postmaster alias. You must have this alias. |
Mail aliases must be unique within the domain. This section provides the procedures for administering mail alias files. Alternately, you can use the AdminTool's Database Manager application to perform these tasks on the aliases database.
In addition, you can create database files for the local mail host by using makemap. Refer to the makemap(1M) man page. The use of these database files does not provide all of the advantages of using a name service such as NIS or NIS+. However, you should be able to retrieve the data from these local database files faster because no network lookups are involved. For more information, refer to Interactions of sendmail With Name Services and Mail Alias Files in Chapter 26, Mail Services (Reference).
To manage entries in an NIS+ table, you can use the aliasadm command. To list, add, modify, or delete table entries with the aliasadm command, you begin a particular task with the following steps.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Complete your task by following the instructions from the example that meets your requirements.
Example—Listing the Entire Contents of the NIS+ mail_aliases Table
Example—Listing an Individual Entry From the NIS+ mail_aliases Table
Example—Listing Partial Matches From the NIS+ mail_aliases Table
Example—Adding Aliases to the NIS+ mail_aliases Table From the Command Line
Example—Adding Entries by Editing an NIS+ mail_aliases Table
In some instances, you should begin the task by compiling a list of each of your mail clients, the locations of their mailboxes, and the names of the mail server systems.
To create a table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Initiate an NIS+ table.
# aliasadm -I |
Add entries to the table.
To add two or three aliases, refer to Example—Adding Aliases to the NIS+ mail_aliases Table From the Command Line.
To add more than two or three aliases, refer to Example—Adding Entries by Editing an NIS+ mail_aliases Table.
For more information, refer to the aliasadm(1M) man page.
To see a complete list of the contents of the table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
List all of the entries in alphabetical order by alias.
# aliasadm -1 |
For more information, refer to the aliasadm(1M) man page.
To see an individual entry from the table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
List an individual entry.
# aliasadm -m ignatz ignatz: ignatz@saturn # Alias for Iggy Ignatz |
The command matches only the complete alias name, not partial strings. You cannot use metacharacters, such as * and ?, with aliasadm -m.
For more information, refer to the aliasadm(1M) man page.
To see partial matches from the table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
List partial matches from the table.
# aliasadm -l | grep partial_string |
partial_string |
Use the string of your choice for your search. |
For more information, refer to the aliasadm(1M) man page.
To add two or three aliases to the table, follow these instructions.
Compile a list of each of your mail clients, the locations of their mailboxes, and the names of the mail server systems.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
(Optional) If necessary, initiate an NIS+ table.
If you are creating a completely new NIS+ mail_aliases table, you must first initiate the table. To complete this task, refer to Example—Initiating an NIS+ mail_aliases Table.
Add aliases to the table.
See this example of a typical entry.
# aliasadm -a iggy iggy.ignatz@saturn "Iggy Ignatz" |
The following list describes the input from the preceding example.
-a |
The option for adding an alias |
iggy |
The short form of the alias name |
iggy.ignatz@saturn |
The expanded alias name |
"Iggy Ignatz" |
The name for the alias in quotation marks |
Display the entry that you created and ensure that the entry is correct.
# aliasadm -m alias |
alias |
The entry that you created |
For more information, refer to the aliasadm(1M) man page.
To add more than two or three aliases to the table, follow these instructions.
Compile a list of each of your mail clients, the locations of their mailboxes, and the names of the mail server systems.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Display and edit the aliases table.
# aliasadm -e |
This command displays the table and enables you to edit the table. The editor that you use has been set with the $EDITOR environment variable. If this variable is not set, vi is the default editor.
Use the following format to type each alias on a separate line.
alias: expanded_alias # ["option" # "comments"] |
alias |
This column is for the short form of the alias name. |
expanded_alias |
This column is for the expanded alias name. |
option |
This column is reserved for future use. |
comments |
This column is used for comments about the individual alias, such as a name for the alias. |
If you leave the option column blank, type an empty pair of quotation marks ("") and add the comments.
The order of the entries is not important to the NIS+ mail_aliases table. The aliasadm -l command sorts the list and displays the entries in alphabetical order.
For more information, refer to Mail Alias Files and the aliasadm(1M) man page.
To edit entries in the table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Display the alias entry.
# aliasadm -m alias |
alias |
Use the assigned alias name. |
Edit the alias entry, as necessary.
# aliasadm -c alias expanded_alias [options comments] |
alias |
If necessary, edit the alias name. |
expanded_alias |
If necessary, edit the expanded alias name. |
options |
If necessary, edit the option. |
comments |
If necessary, edit the comment for this entry. |
For more information, refer to the aliasadm(1M) man page, as well as Mail Alias Files.
Display the entry that you have edited and ensure that the entry is correct.
# aliasadm -m alias |
For more information, refer to the aliasadm(1M) man page.
To delete entries from the table, follow these instructions.
Either be a member of the NIS+ group that owns the table, or become root on the mail server, or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Delete an entry from the table.
# aliasadm -d alias |
alias |
Use the alias name for the entry that you are deleting. |
For more information, refer to the aliasadm(1M) man page.
Use the following procedure to facilitate aliasing with an NIS mail.aliases map.
Compile a list of each of your mail clients, the locations of their mailboxes, and the names of the mail server systems.
Become root on the NIS master server or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Edit the /etc/mail/aliases file, and make the following entries.
Add an entry for each mail client.
# cat /etc/mail/aliases .. alias:expanded_alias |
alias |
Use the short alias name. |
expanded_alias |
Use the expanded alias name (user@host.domain.com). |
Ensure that you have a Postmaster: root entry.
# cat /etc/mail/aliases .. Postmaster: root |
Add an alias for root. Use the mail address of the person who is designated as the postmaster.
# cat /etc/mail/aliases .. root: user@host.domain.com |
user@host.domain.com |
Use the assigned address of the designated postmaster. |
Ensure that the NIS master server is running a name service to resolve the host names on each mail server.
Change to the /var/yp directory.
# cd /var/yp |
Apply the make command.
# make |
The changes in the /etc/hosts and /etc/mail/aliases files are propagated to NIS slave systems. The changes are active in only a few minutes, at most.
Use the following procedure to resolve aliases with a local mail alias file.
Compile a list of each of your users and the locations of their mailboxes.
Become root on the mail server or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Edit the /etc/mail/aliases file and make the following entries.
Add an entry for each user.
user1: user2@host.domain |
user1 |
Use the new alias name. |
user2@host.domain |
Use the actual address for the new alias. |
Ensure that you have a Postmaster: root entry.
# cat /etc/mail/aliases .. Postmaster: root |
Add an alias for root. Use the mail address of the person who is designated as the postmaster.
# cat /etc/mail/aliases .. root: user@host.domain.com |
user@host.domain.com |
Use the assigned address of the designated postmaster. |
Rebuild the alias database.
# newaliases |
The configuration of the AliasFile option in /etc/mail/sendmail.cf determines whether this command generates in binary form either the single file, /etc/mail/aliases.db, or the pair of files, /etc/mail/aliases.dir and /etc/mail/aliases.pag.
Perform one of the following steps to copy the file or files that were generated.
(Optional) Copy the /etc/mail/aliases, the /etc/mail/aliases.dir, and the/etc/mail/aliases.pag files to each of the other systems.
You can copy the three files by using the rcp or rdist commands. Refer to the rcp(1) man page or the rdist(1) man page for more information. Alternately, you can create a script for this purpose.
When you copy these files, you do not need to run the newaliases command on each of the other systems. However, remember that you must update all the /etc/mail/aliases files each time you add or remove a mail client.
(Optional) Copy the /etc/mail/aliases.db file to each of the other systems.
You can copy the file by using the rcp or rdist commands. Refer to the rcp(1) man page or the rdist(1) man page for more information. Alternately, you can create a script for this purpose.
When you copy this file, you do not need to run the newaliases command on each of the other systems. However, remember that you must update all the /etc/mail/aliases files each time you add or remove a mail client.
To create a keyed map file, follow these instructions.
Become superuser on the mail server or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Create an input file.
Entries can have the following syntax.
old_name@newdomain.com new_name@newdomain.com old_name@olddomain.com error:nouser No such user here @olddomain.com %1@newdomain.com |
old_name@newdomain.com |
Use the user name that was previously assigned with the domain that is newly assigned. |
new_name@newdomain.com |
Use the address that is newly assigned. |
old_name@olddomain.com |
Use the user name that was previously assigned with the domain that was previously assigned. |
olddomain.com |
Use the domain that was previously assigned. |
newdomain.com |
Use the domain that is newly assigned. |
The first entry redirects mail to a new alias. The next entry creates a message when an incorrect alias is used. The last entry redirects all incoming mail from olddomain to newdomain.
Create the database file.
# /usr/sbin/makemap maptype newmap < newmap |
maptype |
Select a database type, such as dbm, btree, or hash. |
newmap |
Use the name of the input file and the first part of the name of the database file. If the dbm database type is selected, then the database files are created by using a .pag and a .dir suffix. For the other two database types, the file name is followed by .db. |
Every system must be able to send mail to a postmaster mailbox. You can create an NIS or NIS+ alias for postmaster, or you can create the alias in each local /etc/mail/aliases file. Refer to these procedures.
How to Create a postmaster Alias in Each Local /etc/mail/aliases File
How to Add the postmaster Mailbox to the Aliases in the /etc/mail/aliases File
If you are creating the postmaster alias in each local /etc/mail/aliases file, follow these instructions.
Become superuser on each local system or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
View the /etc/mail/aliases entry.
# cat /etc/mail/aliases # Following alias is required by the mail protocol, RFC 2821 # Set it to the address of a HUMAN who deals with this system's # mail problems. Postmaster: root |
Edit each system's /etc/mail/aliases file.
Change root to the mail address of the person who is designated as the postmaster.
Postmaster: mail_address |
mail_address |
Use the assigned address for the person who is designated as the postmaster. |
(Optional) Create a separate mailbox for the postmaster.
You can create a separate mailbox for the postmaster to keep postmaster mail separate from personal mail. If you create a separate mailbox, use the mailbox address instead of the postmaster's personal mail address when you edit the /etc/mail/aliases files. For details, refer to How to Create a Separate Mailbox for postmaster.
If you are creating a separate mailbox for postmaster, follow these instructions.
Become root on the mail server or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Create a user account for the person who is designated as postmaster. Put an asterisk (*) in the password field.
For details about adding a user account, refer to “Managing User Accounts and Groups (Tasks)” in System Administration Guide: Basic Administration.
After mail has been delivered, enable the mail program to read and write to the mailbox name.
# mail -f postmaster |
postmaster |
Use the assigned address. |
If you are adding a postmaster mailbox to the aliases in the /etc/mail/aliases file, follow these instructions.
Become root on each system or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Add an alias for root. Use the mail address of the person who is designated as the postmaster.
# cat /etc/mail/aliases .. root: user@host.domain.com |
user@host.domain.com |
Use the assigned address of the person who is designated as postmaster. |
On the postmaster's local system, create an entry in the /etc/mail/aliases file that defines the name of the alias. sysadmin is an example. Also, include the path to the local mailbox.
# cat /etc/mail/aliases .. sysadmin: /usr/somewhere/somefile |
sysadmin |
Create a name for a new alias. |
/usr/somewhere/somefile |
Use the path to the local mailbox. |
Rebuild the alias database.
# newaliases |
The following table describes the procedures for administering the mail queue.
Task |
Description |
For Instructions |
---|---|---|
Displaying the contents of the mail queue, /var/spool/mqueue |
Use this procedure to see how many messages are in the queue and how fast the messages are being cleared from the queue. |
How to Display the Contents of the Mail Queue, /var/spool/mqueue |
Forcing mail queue processing for the mail queue, /var/spool/mqueue |
Use this procedure to process messages to a system that previously was unable to receive messages. |
How to Force Mail Queue Processing in the Mail Queue, /var/spool/mqueue |
Running a subset of the mail queue, /var/spool/mqueue |
Use this procedure to force a substring of an address, such as a host name, to be processed. Also, use this procedure to force a particular message out of the queue. | |
Moving the mail queue, /var/spool/mqueue |
Use this procedure to move the mail queue. | |
Running the old mail queue, /var/spool/omqueue |
Use this procedure to run an old mail queue. |
This section describes some helpful tasks for queue administration. For information about the client-only queue, refer to New Configuration File, submit.cf. For other related information, you can refer to New Queue Features.
Use this procedure to see how many messages are in the queue and how fast they are being cleared from the queue.
Use the following command to display this information.
The queue IDs
The size of the message
The date that the message entered the queue
The message status
The sender and the recipients
# /usr/bin/mailq | more |
This command now checks for the authorization attribute, solaris.admin.mail.mailq. If the check is successful, the equivalent of specifying the -bp flag with sendmail is executed. If the check fails, an error message is printed. By default, this authorization attribute is enabled for all users. The authorization attribute can be disabled by modifying the user entry in prof_attr. For more information, refer to the man pages for prof_attr(4) and mailq(1).
Use this procedure, for example, to process messages to a system that was previously unable to receive messages.
Become root or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Force queue processing and display the progress of the jobs as the queue is cleared.
# /usr/lib/sendmail -q -v |
Use this procedure, for example, to force a substring of an address, such as a host name, to be processed. Also, use this procedure to force a particular message from the queue.
Become root or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Run a subset of the mail queue at any time with -qRstring.
# /usr/lib/sendmail -qRstring |
string |
Use a recipient's alias or a substring of user@host.domain, such as a host name. |
Alternately, you can run a subset of the mail queue with -qInnnnn.
# /usr/lib/sendmail -qInnnnn |
nnnnn |
Use a queue ID. |
If you are moving the mail queue, follow these instructions.
Become root on the mail host or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Kill the sendmail daemon.
# /etc/init.d/sendmail stop |
Now, sendmail is no longer processing the queue directory.
Change to the /var/spool directory.
# cd /var/spool |
Move the directory, mqueue, and all its contents to the omqueue directory. Then create a new empty directory that is named mqueue.
# mv mqueue omqueue; mkdir mqueue |
Set the permissions of the directory to read/write/execute by owner, and read/execute by group. Also, set the owner and group to daemon.
# chmod 750 mqueue; chown root:bin mqueue |
Start sendmail.
# /etc/init.d/sendmail start |
To run an old mail queue, follow these instructions.
Become root or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Run the old mail queue.
# /usr/lib/sendmail -oQ/var/spool/omqueue -q |
The -oQ flag specifies an alternate queue directory. The -q flag says to run every job in the queue. Use the -v flag if you are displaying the verbose output on the screen.
Remove the empty directory.
# rmdir /var/spool/omqueue |
The following table describes the procedures for administering .forward files. For more information, refer to .forward Files in Chapter 26, Mail Services (Reference).
Task |
Description |
For Instructions |
---|---|---|
Disabling .forward files |
Use this procedure if, for example, you want to prevent automated forwarding. | |
Changing the .forward file search path |
Use this procedure if, for example, you want to move all .forward files into a common directory. | |
Creating and populating /etc/shells |
Use this procedure to enable users to use the .forward file to forward mail to a program or to a file. |
This section contains several procedures that are related to .forward file administration. Because these files can be edited by users, the files can cause problems. For more information, refer to .forward Files in Chapter 26, Mail Services (Reference).
This procedure, which prevents automated forwarding, disables the .forward file for a particular host.
Become root or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Make a copy of /usr/lib/mail/domain/solaris-generic.m4 or your site-specific domain m4 file.
# cd /usr/lib/mail/domain # cp solaris-generic.m4 mydomain.m4 |
mydomain |
Use the file name of your choice. |
Add the following line to the file that you just created.
define(`confFORWARD_PATH',`')dnl |
If a value for confFORWARD_PATH already exists in the m4 file, replace the value with this null value.
Build and install a new configuration file.
If you need help with this step, refer to How to Build a New sendmail.cf File.
When you edit the .mc file, remember to change DOMAIN(`solaris-generic') to DOMAIN(`mydomain').
If, for example, you want to put all .forward files in a common directory, follow these instructions.
Become root or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
Make a copy of /usr/lib/mail/domain/solaris-generic.m4 or your site-specific domain m4 file.
# cd /usr/lib/mail/domain # cp solaris-generic.m4 mydomain.m4 |
mydomain |
Use the file name of your choice. |
Add the following line to the file that you just created.
define(`confFORWARD_PATH',`$z/.forward:/var/forward/$u')dnl |
If a value for confFORWARD_PATH already exists in the m4 file, replace the value with this new value.
Build and install a new configuration file.
If you need help with this step, refer to How to Build a New sendmail.cf File.
When you edit the .mc file, remember to change DOMAIN(`solaris-generic') to DOMAIN(`mydomain').
This file is not included in the standard release. You must add the file if users are to be allowed to use .forward files to forward mail to a program or to a file. You can create the file manually by using grep to identify all of the shells that are listed in your password file. You can then type the shells into the file. However, the following procedure, which employs a script that can be downloaded, is easier to use.
Download the script.
Become root or assume an equivalent role.
For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.
To generate a list of shells, run the gen-etc-shells script.
# ./gen-etc-shells.sh > /tmp/shells |
This script uses the getent command to collect the names of shells that are included in the password file sources that are listed in /etc/nsswitch.conf.
Inspect and edit the list of shells in /tmp/shells.
With the editor of your choice, remove any shells that you are not including.
Move the file to /etc/shells.
# mv /tmp/shells /etc/shells |
The following table describes troubleshooting procedures and tips for mail services.
Task |
Description |
For Instructions |
---|---|---|
Testing mail configuration |
Steps for testing changes to the sendmail configuration file | |
Checking mail aliases |
A step to confirm that mail can or cannot be delivered to a specified recipient | |
Testing the rule sets |
Steps for checking the input and returns of the sendmail rule sets | |
Verifying connections to other systems |
Tips for verifying connections to other systems | |
Logging messages by using the syslogd program |
Tips for gathering error message information | |
Checking other sources for diagnostic information |
Tips for getting diagnostic information from other sources |
This section provides some procedures and tips that you can use for troubleshooting problems with mail services.
To test the changes that you make to your configuration file, follow these instructions.
Restart sendmail on any system that has a revised configuration file.
# /etc/init.d/sendmail restart |
Send test messages from each system.
# /usr/lib/sendmail -v names </dev/null |
names |
Specify a recipient's email address. |
This command sends a null message to the specified recipient and displays the message activity on your monitor.
Send mail to yourself or other people on the local system by addressing the message to a regular user name.
(Optional) If you are connected to a network, send mail in three directions to someone on another system.
From the main system to a client system
From a client system to the main system
From a client system to another client system
(Optional) If you have a mail gateway, send mail from the mail host to another domain to ensure that the relay mailer and host are configured properly.
(Optional) If you have set up a UUCP connection on your phone line to another host, send mail to someone at that host. Have that person send mail back or call you when the message is received.
Ask someone to send mail to you over the UUCP connection.
The sendmail program cannot detect whether the message is delivered because the program passes the message to UUCP for delivery.
From different systems, send a message to postmaster and ensure that the message is delivered to your postmaster's mailbox.
The following example shows you how to verify an alias.
% mconnect connecting to host localhost (127.0.0.1), port 25 connection open 220 your.domain.com ESMTP Sendmail 8.12.6+Sun/8.12.6; Tue, 12 Nov 2002 13:34:13 -0800 (PST) expn sandy 250 2.1.5 <sandy@phoenix.example.com> quit 221 2.0.0 your.domain.com closing connection % |
In this example, the mconnect program opened a connection to a mail server on a local host and enabled you to test that connection. The program runs interactively, so you can issue various diagnostic commands. For a complete description, see the mconnect(1) man page. The entry, expn sandy, provided the expanded address, sandy@phoenix.example.com. Thus, you have verified that mail can be delivered when using the alias, sandy.
Remember to avoid loops and inconsistent databases when both local and domain-wide aliases are used. Be especially careful to avoid the creation of alias loops when you move a user from one system to another system.
To check the input and returns of the sendmail rule sets, follow these instructions.
Change to address test mode.
# /usr/lib/sendmail -bt |
Test a mail address.
Provide the following numbers and address at the last prompt (>).
> 3,0 mail_address |
mail_address |
Use the mail address that you are testing. |
End the session.
Press Control-d.
The following is an example of the output.
% /usr/lib/sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> > 3,0 sandy@phoenix canonify input: sandy @ phoenix Canonify2 input: sandy < @ phoenix > Canonify2 returns: sandy < @ phoenix . example . com . > canonify returns: sandy < @ phoenix . example . com . > parse input: sandy < @ phoenix . example . com . > Parse0 input: sandy < @ phoenix . example . com . > Parse0 returns: sandy < @ phoenix . example . com . > ParseLocal input: sandy < @ phoenix . example . com . > ParseLocal returns: sandy < @ phoenix . example . com . > Parse1 input: sandy < @ phoenix . example . com . > MailerToTriple input: < mailhost . phoenix . example . com > sandy < @ phoenix . example . com . > MailerToTriple returns: $# relay $@ mailhost . phoenix . example . com $: sandy < @ phoenix . example . com . > Parse1 returns: $# relay $@ mailhost . phoenix . example . com $: sandy < @ phoenix . example . com . > parse returns: $# relay $@ mailhost . phoenix . example . com $: sandy < @ phoenix . example . com . > |
The mconnect program opens a connection to a mail server on a host that you specify and enables you to test that connection. The program runs interactively, so you can issue various diagnostic commands. See the mconnect(1) man page for a complete description. The following example verifies that mail to the user name sandy is deliverable.
% mconnect phoenix connecting to host phoenix (172.31.255.255), port 25 connection open 220 phoenix.example.com ESMTP Sendmail 8.12.0+Sun/8.12.0;Sun, 4 Sep 2001 3:52:56 -0700(PDT) expn sandy 250 2.1.5 <sandy@phoenix.example.com> quit |
If you cannot use mconnect to connect to an SMTP port, check these conditions.
Is the system load too high?
Is the sendmail daemon running?
Does the system have the appropriate /etc/mail/sendmail.cf file?
Is port 25, the port that sendmail uses, active?
Your mail service logs most error messages by using the syslogd program. By default, the syslogd program sends these messages to a system that is called loghost, which is specified in the /etc/hosts file. You can define loghost to hold all logs for an entire NIS domain. If no loghost is specified, error messages from syslogd are not reported.
The /etc/syslog.conf file controls where the syslogd program forwards messages. You can change the default configuration by editing the /etc/syslog.conf file. You must restart the syslog daemon for any changes to become active. To gather information about mail, you can add the following selections to the file.
mail.alert – Messages about conditions that should be fixed now
mail.crit – Critical messages
mail.warning – Warning messages
mail.notice – Messages that are not errors, but might need attention
mail.info – Informational messages
mail.debug – Debugging messages
The following entry in the /etc/syslog.conf file sends a copy of all critical, informational, and debug messages to /var/log/syslog.
mail.crit;mail.info;mail.debug /var/log/syslog |
Each line in the system log contains a timestamp, the name of the system that generated the line, and a message. The syslog file can log a large amount of information.
The log is arranged in a succession of levels. At the lowest level, only unusual occurrences are logged. At the highest level, even the most mundane and uninteresting events are recorded. As a convention, log levels under 10 are considered “useful.” Log levels that are higher than 10 are usually used for debugging. See the “Customizing System Message Logging” in System Administration Guide: Advanced Administration for information about loghost and the syslogd program.
For other diagnostic information, check the following sources.
Look at the Received lines in the header of the message. These lines trace the route that the message took as the message was relayed. Remember to consider time–zone differences.
Look at the messages from MAILER-DAEMON. These messages typically report delivery problems.
Check the system log that records delivery problems for your group of systems. The sendmail program always records its activities in the system log. You might want to modify the crontab file to run a shell script nightly. The script searches the log for SYSERR messages and mails any messages that it finds to the postmaster.
Use the mailstats program to test mail types and determine the number of incoming messages and outgoing messages.
This section describes how you can resolve some sendmail–related error messages that are in the Solaris 9 operating environment. You can also refer to http://www.sendmail.org/faq/.
The following error messages contain two or more of the following types of information.
Cause: What might have happened to cause the message
Description: What the user was doing when the error message occurred
Action: What you can do to fix the problem or to continue with your work
Technical Notes: Background information that might be interesting or helpful to a technical audience, such as developers
See Also: Suggests further reading
451 timeout waiting for input during source
Cause: When sendmail reads from any source that might time out, such as an SMTP connection, the program sets a timer to the value of various Timeout options before reading begins. If the read is not completed before the timer expires, this message appears and reading stops. Usually, this situation occurs during RCPT. The mail message is then queued for later delivery.
Action: If you see this message often, increase the value of various Timeout options in the /etc/mail/sendmail.cf file. If the timer is already set to a large number, look for hardware problems, such as poor network cabling or connections.
See Also: For more information about the Timeout option, refer to Changes to the Timeout Option. If you are using online documentation, the term “timeouts” is a good search string.
550 hostname... Host unknown
Cause: This sendmail message indicates that the destination host machine, which is specified by the portion of the address after the at sign (@), was not found during domain name system (DNS) lookup.
Action: Use the nslookup command to verify that the destination host exists in that domain or other domains, perhaps with a slightly different spelling. Otherwise, contact the intended recipient and ask for a proper address.
550 username... User unknown
Cause: This sendmail message indicates that the intended recipient, who is specified by the portion of the address before the at sign (@), could not be located on the destination host machine.
Action: Check the email address and try again, perhaps with a slightly different spelling. If this remedy does not work, contact the intended recipient and ask for a proper address.
554 hostname... Local configuration error
Cause: This sendmail message usually indicates that the local host is trying to send mail to itself.
Action: Check the value of the $j macro in the /etc/mail/sendmail.cf file to ensure that this value is a fully qualified domain name.
Technical Notes: When the sending system provides its host name to the receiving system in the SMTP HELO command, the receiving system compares its name to the sender's name. If these names are the same, the receiving system issues this error message and closes the connection. The name that is provided in the HELO command is the value of the $j macro.
See Also: For additional information, refer to http://www.sendmail.org/faq/section4.html#4.5.
config error: mail loops back to myself.
Cause: This error message occurs if you set up an MX record and make host bar the mail exchanger for domain foo. However, you fail to configure host bar to know that it is the mail exchanger for domain foo.
Also, another possibility is that both the sending system and the receiving system are identifying as the same domain.
Action: For instructions, refer to http://www.sendmail.org/faq/section4.html#4.5.
host name configuration error
Action: Follow the instructions that were provided for resolving this error message, 554 hostname... Local configuration error.
Technical Notes: This is an old sendmail message, which replaced I refuse to talk to myself and is now replaced by the Local configuration error message.
user unknown
Description: When you try to send mail to a user, the error Username... user unknown is displayed. The user is on the same system.
Action: Check for a typographical error in the entered email address. Otherwise, the user could be aliased to a nonexistent email address in /etc/mail/aliases or in the user's .mailrc file. Also, check for uppercase characters in the user name. Preferably, email addresses should not be case sensitive.
See Also: For additional information, refer to http://www.sendmail.org/faq/section4.html#4.17.