Document Information
Preface
Part I Network Services Topics
1. Network Service (Overview)
2. Managing Web Cache Servers
3. Time-Related Services
Part II Accessing Network File Systems Topics
4. Managing Network File Systems (Overview)
5. Network File System Administration (Tasks)
6. Accessing Network File Systems (Reference)
Part III SLP Topics
7. SLP (Overview)
8. Planning and Enabling SLP (Tasks)
9. Administering SLP (Tasks)
10. Incorporating Legacy Services
11. SLP (Reference)
Part IV Mail Services Topics
12. Mail Services (Overview)
13. Mail Services (Tasks)
Task Map for Mail Services
Planning Your Mail System
Setting Up Mail Services (Task Map)
Setting Up Mail Services
How to Set Up a Mail Server
How to Set Up a Mail Client
How to Set Up a Mail Host
How to Set Up a Mail Gateway
How to Use DNS With sendmail
Building the sendmail.cf Configuration File
How to Build a New sendmail.cf File
Setting SMTP to Use TLS
How to Set SMTP to Use TLS
Managing Mail Delivery by Using an Alternate Configuration
How to Manage Mail Delivery by Using an Alternate Configuration of sendmail.cf
Administering Mail Alias Files (Task Map)
Administering the Queue Directories (Task Map)
Administering the Queue Directories
How to Display the Contents of the Mail Queue, /var/spool/mqueue
How to Force Mail Queue Processing in the Mail Queue, /var/spool/mqueue
How to Run a Subset of the Mail Queue, /var/spool/mqueue
How to Move the Mail Queue, /var/spool/mqueue
How to Run the Old Mail Queue, /var/spool/omqueue
Administering .forward Files (Task Map)
Administering .forward Files
How to Disable .forward Files
How to Change the .forward-File Search Path
How to Create and Populate /etc/shells
Troubleshooting Procedures and Tips for Mail Services (Task Map)
Troubleshooting Procedures and Tips for Mail Services
How to Test the Mail Configuration
How to Test the sendmail Rule Sets
Resolving Error Messages
14. Mail Services (Reference)
Part V Serial Networking Topics
15. Solaris PPP 4.0 (Overview)
16. Planning for the PPP Link (Tasks)
17. Setting Up a Dial-up PPP Link (Tasks)
18. Setting Up a Leased-Line PPP Link (Tasks)
19. Setting Up PPP Authentication (Tasks)
20. Setting Up a PPPoE Tunnel (Tasks)
21. Fixing Common PPP Problems (Tasks)
22. Solaris PPP 4.0 (Reference)
23. Migrating From Asynchronous Solaris PPP to Solaris PPP 4.0 (Tasks)
24. UUCP (Overview)
25. Administering UUCP (Tasks)
26. UUCP (Reference)
Part VI Working With Remote Systems Topics
27. Working With Remote Systems (Overview)
28. Administering the FTP Server (Tasks)
29. Accessing Remote Systems (Tasks)
Part VII Monitoring Network Services Topics
30. Monitoring Network Performance (Tasks)
Glossary
Index
|
Administering Mail Alias Files
Mail aliases must be unique within the domain. This section provides the procedures for
administering mail alias files. Alternately, you can use the Mailing List feature in the Solaris
Management Console 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 14, Mail Services (Reference). Choose from the following procedures:
How to Initiate an NIS+ mail_aliases TableYou can use the aliasadm command to manage entries in an NIS+ table.
To create a table, follow these instructions. For more information, refer to the aliasadm(1M)
man page.
- Either be a member of the NIS+ group that owns the table, or become
root on the mail server, or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure
a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- Initiate an NIS+ table.
# aliasadm -I
- Add entries to the table.
How to List the Contents of the NIS+ mail_aliases TableTo 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.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure
a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- List all of the entries in alphabetical order by alias.
# aliasadm -1 For more information, refer to the aliasadm(1M) man page. Example 13-2 Listing an Individual Entry From the NIS+ mail_aliases Table Alternately, you can use the aliasadm command to list individual entries. After you complete the
first step in this procedure, type the following: # 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. Example 13-3 Listing Partial Matches From the NIS+ mail_aliases Table Also, you can use the aliasadm command to list partial matches. After you
complete the first step in this procedure, type the following: # aliasadm -l | grep partial-string Replace partial-string with the desired string for your search.
How to Add Aliases to the NIS+ mail_aliases Table From the Command LineTo add two or three aliases to the table, follow the following instructions. If
you are adding more than two or three aliases, see How to Add Entries by Editing an NIS+ mail_aliases Table.
- 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.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure
a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- (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 How to Initiate 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.
How to Add Entries by Editing an NIS+ mail_aliases TableYou can use the aliasadm command to manage entries in an NIS+ table.
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.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure
a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- 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.
How to Edit Entries in an NIS+ mail_aliases TableTo 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.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure
a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- Display the alias entry.
# aliasadm -m alias Replace alias with 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. Example 13-4 Deleting Entries From an NIS+ mail_aliases Table To delete entries from the table, use the following syntax after you complete the
first step in this procedure: # aliasadm -d alias Replace alias with the alias name for the entry that you are deleting.
How to Set Up an NIS mail.aliases MapUse 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.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure
a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- 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.
How to Set Up a Local Mail Alias FileUse 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.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure
a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- 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 and the /etc/mail/aliases.db files to each of the other systems.
You can copy these 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.
How to Create a Keyed Map FileTo create a keyed map file, follow these instructions.
- Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- 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.
Managing the postmaster Alias
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
If you are creating the postmaster alias in each local /etc/mail/aliases file, follow
these instructions.
- Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- 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.
How to Create a Separate Mailbox for postmaster
If you are creating a separate mailbox for postmaster, follow these instructions.
- Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- 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 Chapter 5, 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.
How to Add the postmaster Mailbox to the Aliases in the /etc/mail/aliases File
If you are adding a postmaster mailbox to the aliases in the /etc/mail/aliases
file, follow these instructions.
- Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
- 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
|