Sendmail is an SMTP compatible mail application that can be used to send electronic mail. In a Unix based environment, hosts running sendmail will be configured as one of three different types of systems. Sendmail comes with nearly all forms of Unix systems.
- Client
- Mail Hub
- Mail Gateway
MAIL CLIENT
The mail client is just that, a host that receives mail on behalf of the users and stores the mail in the appropriate directory for the user to access later (usually /var/mail/<username>).
MAIL HUB
This is the internal mail server. Mail is forwarded between hubs for e-mail systems that are totally internal to one organization. Mail hubs are frequently built so that they are sharing a directory with the users logged in on remote machines (typically /var/mail/<username>).
MAIL GATEWAY
Mail gateways communicate with other mail gateways across the Internet. They use SMTP to transfer mail from source to destination and listen on port 25 for connections from remote servers.
SENDMAIL COMPONENTS
Sendmail is the executable file usually located in /usr/lib/sendmail on Solaris systems. Sendmail relies on the following files:
- sendmail.cf - Configuration file
- .forward - forwarding information for the mail transfer agent (MTA).
- /etc/mail/aliases
- /etc/hosts (for location of the mail hub)
- /etc/resolv.conf (for nameserver information)
- /etc/nsswitch.conf (for the order of name resolution methods used)
SENDMAIL CONFIGURATION
MAIL ALIASES
Must be root to modify the /etc/mail/aliases file. Once modified, run the 'newalias' command.