|
1、vi /etc/mail/sendmail.mc
dnl DAEMON_OPTIONS('Port=smtp,Addr=127.0.0.1,Name=MTA')dnl
2、m4 sendmail.mc > sendmail.cf
3、service sendmail restart
做完以上步后,用sendmail -d0 < /dev/null,显示如下:
Version 8.12.10
Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF STARTTLS TCPWRAPPERS
USERDB USE_LDAP_INIT
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = localhost
(canonical domain name) $j = localhost.localdomain
(subdomain name) $m = localdomain
(node name) $k = rhel3
========================================================
Recipient names must be specified
看书上的实验说,不应该显示localhost,而且我把/etc/hosts文件中去掉了除127.0.0.1以外的行。/etc/sysconfig/network中HOSTNAME=rhel3也没有问题。
不知道是为什么? |
|