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 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, for example) and 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
Administering the Queue Directories (Task Map)
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 or 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. |
Administering the Queue Directories (Tasks)
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".
How to Display the Contents of the Mail Queue, /var/spool/mqueue
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 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).
How to Force Mail Queue Processing in the Mail Queue, /var/spool/mqueue
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
How to Run a Subset of the Mail Queue, /var/spool/mqueue
Use this procedure, for example, to force a substring of an address, such as a host name, to be processed or 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 (like a host name) of user@host.domain.
Alternately, you can run a subset of the mail queue with -qInnnnn.
# /usr/lib/sendmail -qInnnnn
nnnnn
Use a queue ID.
How to Move the Mail Queue, /var/spool/mqueue
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
How to Run the Old Mail Queue, /var/spool/omqueue
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 and 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