当前位置: 技术问答>linux和unix
Linux mail发送邮件问题
来源: 互联网 发布时间:2016-10-15
本文导语: 我的系统是RHEL5.3,现在我要用mail来发送邮件到我自己建的windows邮件服务器上,windows邮件服务器的郁闷是netstor.com 建了两个邮件用户 分别是test1@netstor.com 和test2@netstor.com 现在要Linux用test1@netstor.com 发邮件到test2@net...
我的系统是RHEL5.3,现在我要用mail来发送邮件到我自己建的windows邮件服务器上,windows邮件服务器的郁闷是netstor.com 建了两个邮件用户 分别是test1@netstor.com 和test2@netstor.com 现在要Linux用test1@netstor.com 发邮件到test2@netstor.com 修改了/etc/hosts
127.0.0.1 RHEL5.3-IDE RHEL5 localhost.localdomain localhost
192.168.0.125 netstor.com
::1 localhost6.localdomain6 localhost6
/etc/mail.rc 修改为
set ask askcc append dot save crt
ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via Delivered-To
set from=test1@netstor.com smtp=192.168.0.125:25 smtp-auth-usr=test1@netstor.com smtp-auth-password=123456 smtp-auth=login
#echo "test mail 001" | mail -v -s "Testing mail" test2@netstor.com
test2@netstor.com... Connecting to [127.0.0.1] via relay...
220 RHEL5.3-IDE ESMTP Sendmail 8.13.8/8.13.8; Wed, 10 Nov 2010 23:18:23 +0800
>>> EHLO RHEL5.3-IDE
250-RHEL5.3-IDE Hello RHEL5.3-IDE [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 2000000
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP
>>> MAIL From: SIZE=58 AUTH=root@RHEL5.3-IDE
250 2.1.0 ... Sender ok
>>> RCPT To:
>>> DATA
550 5.1.1 ... User unknown
503 5.0.0 Need RCPT (recipient)
>>> RSET
250 2.0.0 Reset state
>>> RSET
250 2.0.0 Reset state
root... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> MAIL From: SIZE=1082
250 2.1.0 ... Sender ok
>>> RCPT To:
>>> DATA
250 2.1.5 ... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 oAAFINAM004523 Message accepted for delivery
root... Sent (oAAFINAM004523 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 RHEL5.3-IDE closing connection
请问这是什么错呀,已经指定了发件人,为什么还是从127.0.0.1发呢,而且... User unknown test2@netstor.com明明可以用,在windows下,用Foxmail这两个邮箱都可以互发邮件的,请高人指点,QQ286264265
127.0.0.1 RHEL5.3-IDE RHEL5 localhost.localdomain localhost
192.168.0.125 netstor.com
::1 localhost6.localdomain6 localhost6
/etc/mail.rc 修改为
set ask askcc append dot save crt
ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via Delivered-To
set from=test1@netstor.com smtp=192.168.0.125:25 smtp-auth-usr=test1@netstor.com smtp-auth-password=123456 smtp-auth=login
#echo "test mail 001" | mail -v -s "Testing mail" test2@netstor.com
test2@netstor.com... Connecting to [127.0.0.1] via relay...
220 RHEL5.3-IDE ESMTP Sendmail 8.13.8/8.13.8; Wed, 10 Nov 2010 23:18:23 +0800
>>> EHLO RHEL5.3-IDE
250-RHEL5.3-IDE Hello RHEL5.3-IDE [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 2000000
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP
>>> MAIL From: SIZE=58 AUTH=root@RHEL5.3-IDE
250 2.1.0 ... Sender ok
>>> RCPT To:
>>> DATA
550 5.1.1 ... User unknown
503 5.0.0 Need RCPT (recipient)
>>> RSET
250 2.0.0 Reset state
>>> RSET
250 2.0.0 Reset state
root... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> MAIL From: SIZE=1082
250 2.1.0 ... Sender ok
>>> RCPT To:
>>> DATA
250 2.1.5 ... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 oAAFINAM004523 Message accepted for delivery
root... Sent (oAAFINAM004523 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 RHEL5.3-IDE closing connection
请问这是什么错呀,已经指定了发件人,为什么还是从127.0.0.1发呢,而且... User unknown test2@netstor.com明明可以用,在windows下,用Foxmail这两个邮箱都可以互发邮件的,请高人指点,QQ286264265
|
我测试的时候 都自己建立了DNS服务器的
你虽然设置了
192.168.0.125 netstor.com
可是在向netstor.com的用户发邮件的时候 会去查找netstor.com这个域名的MX记录的
你虽然设置了
192.168.0.125 netstor.com
可是在向netstor.com的用户发邮件的时候 会去查找netstor.com这个域名的MX记录的