修改/etc/mail/local-hosts-name文件
[iyunv@localhost named]# cat /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
xuwini.com
访问控制设置
更改/etc/mail/accesss文件,增加:
[iyunv@localhost named]# cat /etc/mail/access
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
xuwin.com RELAY
完成后makemap hash /etc/mail/access.db < /etc/mail/access进行数据库更新。
#service sendmail restart
已经成功进入。。。。
我们试着来写一份简单的信。。。
那么我在服务器上收信看看。。。。晕倒。。把密码打出啦。。。
[iyunv@localhost root]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 localhost.localdomain ESMTP Sendmail 8.12.8/8.12.8; Sun, 10 Aug 2008 20:47:0
6 +0800
mail from: root@xuwin.com
250 2.1.0 root@xuwin.com... Sender ok
rcpt to: xuwin@xuwin.com
250 2.1.5 xuwin@xuwin.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
test
hi.baidu.com/proxuwin
xuwin.com
.
250 2.0.0 m7ACl6B7004271 Message accepted for delivery
quit
221 2.0.0 localhost.localdomain closing connection
Connection closed by foreign host.
检查日志[iyunv@localhost root]# tail /var/log/maillog