Solaris认为是UNIX操作系统的衍生版本之一。 现在用的人越来越多,那他怎么通过Sendmail发送邮件呢,我给大家讲解下。
一、问题
DNS正常,sendmail是自带安装的,现在要用sendmail发送邮件(只要发送就可以),应该需要调整那些配置?
二、测试:mailx -s "TestSubject" abc55431@163.com < aliases
1、tail -f /var/log/syslog
Jan 20 15:22:30 Suntest sendmail[28380]: [ID 702911 mail.alert] unable to qualify my own domain name (Suntest) -- using short name
Jan 20 15:22:30 Suntest sendmail[28380]: [ID 801593 mail.info] p0K7MU5R028380: from=nagios, size=1487, class=0, nrcpts=1, msgid=<201101200722.p0K7MU5R028380@Suntest>, relay=root@localhost
Jan 20 15:22:30 Suntest sendmail[28459]: [ID 801593 mail.info] p0K7MUH7028459: from=, size=1725, class=0, nrcpts=1, msgid=<201101200722.p0K7MU5R028380@Suntest>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jan 20 15:22:30 Suntest sendmail[28380]: [ID 801593 mail.info] p0K7MU5R028380: to=abc55431@163.com, ctladdr=nagios (102/102), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31487, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p0K7MUH7028459 Message accepted for delivery)
Jan 20 15:22:31 Suntest sendmail[28461]: [ID 801593 mail.info] p0K7MUH7028459: to=, ctladdr= (102/102), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=121725, relay=163mx03.mxmail.netease.com. [220.181.12.69], dsn=5.0.0, stat=Service unavailable
Jan 20 15:22:31 Suntest sendmail[28461]: [ID 801593 mail.info] p0K7MUH7028459: p0K7MVH7028461: DSN: Service unavailable
Jan 20 15:22:31 Suntest sendmail[28461]: [ID 801593 mail.info] p0K7MVH7028461: to=, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32933, relay=local, dsn=2.0.0, stat=Sent
Suntest是机器名
2、mail查询
From MAILER-DAEMON Thu Jan 20 12:00:30 2011
Date: Thu, 20 Jan 2011 12:00:30 +0800 (CST)
From: Mail Delivery Subsystem
Message-Id: <201101200400.p0K40U21012050@Suntest.dbinfo>
To:
Subject: Returned mail: see transcript for details
Content-Length: 1817
This is a MIME-encapsulated message
--p0K40U21012050.1295496030/Suntest.dbinfo
The original message was received at Thu, 20 Jan 2011 12:00:29 +0800 (CST)
from localhost [127.0.0.1]
----- The following addresses had permanent fatal errors -----
#p#
(reason: 550 MI:IMF mx19,RcCowJC7X+cptDdN+Su3AQ--.1101S2 1295496234 http://mail.163.com/help/help_sp ... amp;time=1295496234)
----- Transcript of session follows -----
... while talking to 163mx02.mxmail.netease.com.:
>>> MAIL From:
<<< 550 MI:IMF mx19,RcCowJC7X+cptDdN+Su3AQ--.1101S2 1295496234 http://mail.163.com/help/help_sp ... amp;time=1295496234
554 5.0.0 Service unavailable
--p0K40U21012050.1295496030/Suntest.dbinfo
Content-Type: message/delivery-status
Reporting-MTA: dns; Suntest.dbinfo
Received-From-MTA: DNS; localhost
Arrival-Date: Thu, 20 Jan 2011 12:00:29 +0800 (CST)
Final-Recipient: RFC822; abc55431@163.com
Action: failed
Status: 5.0.0
Diagnostic-Code: SMTP; 550 MI:IMF mx19,RcCowJC7X+cptDdN+Su3AQ--.1101S2 1295496234 http://mail.163.com/help/help_sp ... amp;time=1295496234
Last-Attempt-Date: Thu, 20 Jan 2011 12:00:30 +0800 (CST)
--p0K40U21012050.1295496030/Suntest.dbinfo
Content-Type: message/rfc822
Return-Path:
Received: from Suntest (localhost [127.0.0.1])
by Suntest.dbinfo (8.13.8+Sun/8.13.
with ESMTP id p0K40T21012048
for ; Thu, 20 Jan 2011 12:00:29 +0800 (CST)
Received: (from nagios@localhost)
by Suntest (8.13.8+Sun/8.13.8/Submit) id p0K40TDt012034
for abc55431@163.com; Thu, 20 Jan 2011 12:00:29 +0800 (CST)
Date: Thu, 20 Jan 2011 12:00:29 +0800 (CST)
From: nagios@Suntest
怎么样,看完这篇文章,有点难懂吧,多看几遍就会了,希望对大家有所帮助!
【编辑推荐】