在我们公司的一台服务器上,/usr/lib/sendmail 突然停止工作。
我们在几个脚本(由 oracle 用户拥有和运行)中调用它,但它们都无法发送电子邮件,即使手动也不起作用。
服务器是:SunOS 5.10 Generic_Virtual sun4v sparc sun4v
oracle:/home/oracle $ ls -ltr /usr/lib/sendmail
-r-xr-sr-x 1 root smmsp 1064920 Jan 16 2013 /usr/lib/sendmail
下面以暂定发送邮件为例:
cat /etc/hosts | /usr/lib/sendmail -f [email protected] -t [email protected]
这是详细模式下的输出:
oracle@myserver:/home/oracle $ cat /etc/hosts | /usr/lib/sendmail -v -f [email protected] -t [email protected]
[email protected]... Connecting to [127.0.0.1] via relay...
220 myserver.gov.uk ESMTP Sendmail 8.14.5+Sun/8.14.5; Tue, 11 Sep 2018 11:04:06 +0100 (BST)
>>> EHLO myserver.gov.uk
250-myserver.gov.uk Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<[email protected]> SIZE=126
250 2.1.0 <[email protected]>... Sender ok
>>> RCPT To:<[email protected]>
>>> DATA
250 2.1.5 <[email protected]>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <[email protected]>... Connecting to mailhost.gov.uk via relay...
050 MAILER-DAEMON... aliased to postmaster
050 postmaster... aliased to root
050 postmaster... aliased to root
050 root... Connecting to local...
050 220 myserver LMTP ready
050 >>> LHLO myserver.gov.uk
050 250-myserver
050 250-8BITMIME
050 250-ENHANCEDSTATUSCODES
050 250 PIPELINING
050 >>> MAIL From:<>
050 250 2.5.0 ok
050 >>> RCPT To:<root>
050 >>> DATA
050 250 2.1.5 ok
050 354 go ahead
050 >>> .
050 250 2.1.5 root OK
050 root... Sent
250 2.0.0 w8BA46xl008614 Message accepted for delivery
[email protected]... Sent (w8BA46xl008614 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 myserver.gov.uk closing connection
另外,我查看了 /var/log/syslog,找不到任何错误/警告消息,只有 mail.info,这就是我在 /var/mail/oracle 中找到的内容
--w6Q16rOA022071.1532567213/myserver
Content-Type: message/rfc822
Return-Path: <[email protected]>
Received: from myserver.gov.uk (localhost [127.0.0.1])
by myserver.gov.uk (8.14.5+Sun/8.14.5) with ESMTP id w6Q16qOA022069
for <[email protected]>; Thu, 26 Jul 2018 02:06:52 +0100 (BST)
Received: (from oracle@localhost)
by myserver.gov.uk (8.14.5+Sun/8.14.5/Submit) id w6Q16qer022062
for [email protected]; Thu, 26 Jul 2018 02:06:52 +0100 (BST)
Date: Thu, 26 Jul 2018 02:06:52 +0100 (BST)
From: [email protected]
Message-Id: <[email protected]>
subject: SUCCESS: Export Logfile from myserver on 00:00 26/07/18
;;;
Export: Release 11.2.0.4.0 - Production on Thu Jul 26 00:00:00 2018................
我不是操作系统管理方面的专家,但我愿意提高我的知识。