作/译者:叶金荣(Email: ),来源:http://imysql.cn,转载请注明作/译者和出处,并且不能用于商业用途,违者必究。
之前发送mail一直好好的,直到有一天修改了hostname之后,突然发现不能发送mail了,报错信息大概如下:
Jul 2 16:59:16 74 sendmail[6830]: My unqualified host name (yejr) unknown; sleeping for retry
Jul 2 17:00:16 74 sendmail[6830]: unable to qualify my own domain name (yejr) -- using short name
Jul 2 17:00:16 74 sendmail[6830]: m6290G1s006830: from=root, size=475, class=0, nrcpts=1, msgid=<200807020900.m6290G1s006830@yejr>, relay=root@localhost
Jul 2 17:00:26 74 sendmail[6830]: m6290G1s006830: to=hyman@sohu-inc.com, ctladdr=root (0/0), delay=00:00:10, xdelay=00:00:10, mailer=relay, pri=30475, relay=[192.168.0.1] [192.168.0.1], dsn=5.5.4, stat=Service unavailable
Jul 2 17:00:26 74 sendmail[6830]: m6290G1s006830: m6290G1t006830: DSN: Service unavailable
Jul 2 17:00:36 74 sendmail[6830]: m6290G1t006830: to=root, delay=00:00:10, xdelay=00:00:10, mailer=relay, pri=31499, relay=[192.168.0.1] [192.168.0.1], dsn=5.0.0, stat=Service unavailable
Jul 2 17:00:36 74 sendmail[6830]: m6290G1t006830: m6290G1u006830: return to sender: Service unavailable
Jul 2 17:00:46 74 sendmail[6830]: m6290G1u006830: to=postmaster, delay=00:00:10, xdelay=00:00:10, mailer=relay, pri=32523, relay=[192.168.0.1] [192.168.0.1], dsn=5.0.0, stat=Service unavailable
Jul 2 17:00:46 74 sendmail[6830]: m6290G1t006830: Losing ./qfm6290G1t006830: savemail panic
Jul 2 17:00:46 74 sendmail[6830]: m6290G1t006830: SYSERR(root): savemail: cannot save rejected email anywhere
google了一下, 大概知道怎么回事了,因为sendmail在解析hostname时出现问题,因此做了如下简单修改:
打开 /etc/hosts , 修改其中本机的 hostname 定义,格式如下
打开 /etc/hosts , 修改其中本机的 hostname 定义,格式如下
#ip_address host.domainname shortname
#192.168.0.84 yejr
192.168.0.84 yejr.yejr.com yejr
就可以正常使用了 :)
本文出自 “MySQL中文网”博客
http://www.imysql.cn/
本文出自 “老叶茶馆” 博客,转载请与作者联系!