A mail host resolves email addresses and reroutes mail within your domain. A good candidate for a mail host is a system that provides your network with a remote connection or connects your network to a parent domain. The following procedure shows you how to set up a mail host.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .
# svcadm disable -t network/smtp:sendmail
Run the check-hostname script to verify that sendmail can identify the fully qualified host name for this server.
% /usr/sbin/check-hostname hostname phoenix OK: fully qualified as phoenix.example.com
If this script is not successful in identifying the fully qualified host name, you need to add the fully qualified host name as the first alias for the host in /etc/hosts.
Choose the step that is appropriate for you.
Add the word mailhost and mailhost.domain after the IP address and system name of the mail host system.
IP-address mailhost mailhost mailhost.domain loghost
Use the assigned IP address.
Use the system name of the mail host system.
Use the expanded domain name.
The system is now designated as a mail host. The domain should be identical to the string that is given as the subdomain name in the output of the following command.
% /usr/lib/sendmail -bt -d0 </dev/null Version 8.13.1+Sun Compiled with: LDAPMAP MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS NISPLUS QUEUE SCANF SMTP USERDB XDEBUG ============ SYSTEM IDENTITY (after readcf) ============ (short domain name) $w = phoenix (canonical domain name) $j = phoenix.example.com (subdomain name) $m = example.com (node name) $k = phoenix ========================================================
See the following example of how the hosts file should look after these changes.
# cat /etc/hosts # # Internet host table # 172.31.255.255 localhost 192.168.255.255 phoenix mailhost mailhost.example.com loghost
Create the following entry.
IP-address mailhost mailhost mailhost.domain loghost
# svcadm enable network/smtp:sendmail
See How to Test the Mail Configuration for instructions.