The commands listed below are some that we use often, but many more exist. Check the man page and documentation for more details and information.
newaliases.
The purpose of the newaliases
program utility of Sendmail is to rebuild and update the random access database for the mail aliases file /etc/mail/aliases
. It must be
run each time you change the contents of this file in order for the changes to take effect.
To update the aliases file with the newaliases
utility, use the following command:
[root@deep] /# /usr/bin/newaliases
makemap.
The purpose of the makemap program utility is to create the database maps in Sendmail. The makemap command must be used only when you need to create a new database for file like
aliases, access
, or domaintable, mailertable
, and virtusertable
.
To run makemap to create a new database for access, use the following command:
[root@deep] /# makemap hash /etc/mail/access.db < /etc/mail/access
Where <hash> is the database format, makemap can handles up to three different database formats; they may be hash
, btree
or dbm
.
The /etc/mail/access.db
is the location and the name of the new database that will be created.
The /etc/mail/access
is the location of the file from where makemap will read from the standard input file.
In our example, we have created a new access.db
file with the makemap command above. To create a database for other files like aliases, domaintable, mailertable
, and virtusertable
,
you must indicate the location and name of the corresponding file in the makemap command.
mailq. The purpose of the mailq program utility is to print a summary of the mail messages queued for future delivery. To print a summary of the mail messages queued, use the following command:
[root@deep] /# mailq
Mail queue is empty
The commands listed below are some that we use often, but many more exist. Check the man page and documentation for more details and information.
mailstats. The purpose of the mailstats program utility is to displays contents of the current mail statistics. To displays the current mail statistics, use the following command:
[root@deep] /# mailstats
Statistics from Tue Dec 14 20:31:48 1999
M msgsfr bytes_from msgsto bytes_to msgsrej msgsdis Mailer
5 0 0K 1 3K 0 0 esmtp
8 1259 19618K 1259 19278K 0 0 local
=============================================================
T 1259 19618K 1260 19281K 0 0
praliases. The purpose of the praliases program utility is to display one per line, in no particular order the contents of the current system mail aliases. To displays the current system aliases, use the following command:
[root@deep] /# praliases
postmaster:root
daemon:root
root:admin
@:@
mailer-daemon:postmaster
bin:root
nobody:root
webadmin:admin
www:root