个人问题集结
===========================================================
怎么通过mailx向内部邮件服务器发送邮件?(疑问板)
===========================================================

在Linux上用mailx发送邮件,目前存在2个问题:

1,在Linux上只能通过ip访问邮件服务器,不能通过域名访问,如果发送邮件的时候用mailx xxx@172.25.1.18的形式的话,会出现<xxx@172.25.1.18>: bad address syntax: "xxx@172.25.1.18"的错误?通过域名的形式的话又会出现:Name service
error for name=www.com type=MX: Host not found, try again
2,邮件服务器有smtp认证,怎么用mailx通过认证

具体报错信息在下面


[root@test ~]#mail xxx@172.25.1.18
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 MAILER-DAEMON@test 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: root@test.rrl.com
Delivered-To: root@test.rrl.com
Date: Thu, 21 Dec 2006 01:03:07 +0800 (CST)
From: MAILER-DAEMON@test.rrl.com (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: root@test.rrl.com
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 <postmaster>

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

The Postfix program

<xxx@172.25.1.18>: bad address syntax: "xxx@172.25.1.18"

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


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

From root@test.rrl.com Thu Dec 21 01:03:07 2006
Date: Thu, 21 Dec 2006 01:03:07 +0800
To: xxx@172.25.1.18
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.rrl.com (root)

test
? q
Saved 1 message in mbox
[root@test ~]#mail -v xxx@www.com
Subject: test2
test2
EOT
Mail Delivery Status Report will be mailed to <root>.
[root@test ~]#mail
mailx version nail 11.25 7/29/05. Type ? for help.
"/var/mail/root": 1 message 1 new
>N 1 MAILER-DAEMON@test 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: root@test.rrl.com
Delivered-To: root@test.rrl.com
Date: Thu, 21 Dec 2006 01:03:34 +0800 (CST)
From: MAILER-DAEMON@test.rrl.com (Mail Delivery System)
Subject: Mail Delivery Status Report
To: root@test.rrl.com
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

<xxx@www.com>: delivery via none: Host or domain name not found. Name service
error for name=www.com 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 root@test.rrl.com Thu Dec 21 01:03:33 2006
Date: Thu, 21 Dec 2006 01:03:33 +0800
To: xxx@www.com
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@test.rrl.com (root)

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

tonykorn97 发表于:2006.12.20 17:02 ::分类: ( linux ) ::阅读:(1126次) :: 评论 (0)

发表评论
标题

在此添加评论
表情符号: smile laughing tongue angry crying sad wassat wink

称呼

邮箱地址(可选)

个人主页(可选)

 authimage


自我介绍
切换风格
新闻聚合
博客日历
文章归档...
最新发表...
最新评论...
最多阅读文章...
最多评论文章...
博客统计...
Blog信息
网站链接...