怎麼透過mailx向內部郵件伺服器傳送郵件?(疑問板)

tonykorn97發表於2006-12-20

在Linux上用mailx傳送郵件,目前存在2個問題:

1,在Linux上只能透過ip訪問郵件伺服器,不能透過域名訪問,如果傳送郵件的時候用mailx 的形式的話,會出現<>: bad address syntax: ""的錯誤?透過域名的形式的話又會出現:Name service
error for name= type=MX: Host not found, try again
2,郵件伺服器有smtp認證,怎麼用mailx透過認證

具體報錯資訊在下面


[root@test ~]#mail
Subject: test
test
EOT
[root@test ~]#mail
mailx version nail 11.25 7/29/05. Type ? for help.
"/var/mail/root": 1 message 1 new
>N 1 Thu Dec 21 01:03 69/2078 Undelivered Mail Returned to Sender
? 1
Message 1:
From MAILER-DAEMON Thu Dec 21 01:03:08 2006
X-Original-To:
Delivered-To:
Date: Thu, 21 Dec 2006 01:03:07 +0800 (CST)
From: (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To:
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="D3D7F18B37.1166634187/test.rrl.com"

Part 1:
Content-Description: Notification
Content-Type: text/plain

This is the Postfix program at host test.rrl.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The Postfix program

<>: bad address syntax: ""

Part 2:
Content-Description: Delivery report
Content-Type: message/delivery-status


Part 3:
Content-Description: Undelivered Message
Content-Type: message/rfc822

From Thu Dec 21 01:03:07 2006
Date: Thu, 21 Dec 2006 01:03:07 +0800
To:
Subject: test
User-Agent: nail 11.25 7/29/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: (root)

test
? q
Saved 1 message in mbox
[root@test ~]#mail -v
Subject: test2
test2
EOT
Mail Delivery Status Report will be mailed to .
[root@test ~]#mail
mailx version nail 11.25 7/29/05. Type ? for help.
"/var/mail/root": 1 message 1 new
>N 1 Thu Dec 21 01:03 65/1986 Mail Delivery Status Report
? 1
Message 1:
From MAILER-DAEMON Thu Dec 21 01:03:34 2006
X-Original-To:
Delivered-To:
Date: Thu, 21 Dec 2006 01:03:34 +0800 (CST)
From: (Mail Delivery System)
Subject: Mail Delivery Status Report
To:
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="E542C18B38.1166634214/test.rrl.com"

Part 1:
Content-Description: Notification
Content-Type: text/plain

This is the Postfix program at host test.rrl.com.

Enclosed is the mail delivery report that you requested.

The Postfix program

<>: delivery via none: Host or domain name not found. Name service
error for name= type=MX: Host not found, try again

Part 2:
Content-Description: Delivery report
Content-Type: message/delivery-status


Part 3:
Content-Description: Message
Content-Type: message/rfc822

From Thu Dec 21 01:03:33 2006
Date: Thu, 21 Dec 2006 01:03:33 +0800
To:
Subject: test2
User-Agent: nail 11.25 7/29/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: (root)

test2
? q
Saved 1 message in mbox
[root@test ~]#

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-245570/,如需轉載,請註明出處,否則將追究法律責任。

相關文章