我在rhel5上测试邮件,telnet 192.168.0.243 25(ip是我设置的)。。。。如此一直输入,此次发送邮件成功,日志如下:
May 4 11:11:57 cbmstes sendmail[4367]: q443B6EO004367: from=root@cbmstes, size=22, class=0, nrcpts=1, msgid=<201205040311.q443B6EO004367@cbmstes.>, proto=ESMTP, daemon=Daemon0, relay=cbmstes [192.168.0.243]
May 4 11:12:00 cbmstes sendmail[4397]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-SHA, bits=128/128
May 4 11:12:03 cbmstes sendmail[4397]: q443B6EO004367: to=kimutaku001@gmail.com, ctladdr=root@cbmstes (0/0), delay=00:00:20, xdelay=00:00:06, mailer=esmtp, pri=120022, relay=gmail-smtp-in.l.google.com. [74.125.127.27], dsn=2.0.0, stat=Sent (OK 1336101127 p7si7425702pbk.104)
第二次我用mail命令测试,(mail -s "this is test sendmail message" kimutaku001@gmail.com)却不可以
May 4 11:16:39 cbmstes sendmail[4600]: q443Gd76004600: from=root, size=58, class=0, nrcpts=1, msgid=<201205040316.q443Gd76004600@cbmstes.>, relay=root@localhost
May 4 11:16:39 cbmstes sendmail[4600]: q443Gd76004600: to=kimutaku001@gmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30058, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
分析:第二次发送是由于发送地址和第一次不同:失败的发送人:root和成功的发送人:root@cbmstes
怎么样配置使得以mail发送时,是以root@cbmstes发送的呢??
谢谢!!