Administering .forward Files (Task Map)
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. |
Administering .forward Files (Tasks)
This section contains several procedures that are related to .forward file administration. Because these files can be edited by users, they can cause problems. For more information, refer to ".forward Files" in Chapter 26, Mail Services (Reference).
How to Disable .forward Files
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 you just created.
define(`confFORWARD_PATH',`')dnl
If a value for confFORWARD_PATH already exists in the m4 file, replace it 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".
How to Change the .forward File Search Path
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 it 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".
How to Create and Populate /etc/shells
This file is not included in the standard release, so you must add it 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, it is easier to use the following procedure, which employs a script that can be downloaded.
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
Troubleshooting Procedures and Tips for Mail Services (Task Map)
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 |
Troubleshooting Procedures and Tips for Mail Services (Tasks)
This section provides some procedures and tips that you can use for troubleshooting problems with mail services.
How to Test the Mail Configuration
To test the changes you make to your configuration file, follow these instructions.
Restart sendmail on any system that has a revised configuration file.
# pkill -HUP sendmail
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 to another domain from the mail host 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 and 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 it passes the message to UUCP for delivery.
From different systems, send a message to postmaster and ensure that it is delivered to your postmaster's mailbox.