yuio654
关于sendmail转发,请大家指点指点
最近写了个监控服务的脚本,运行正常。想让他在服务器当掉的时候发个邮件(测试的是先发到hotmail)通知我。一直没有搞过mail,怎么都发不出去。
操作系统是centos4.5
[root@buptnu mail]# rpm -qa|grep send
sendmail-8.13.1-3.2.el4
[root@buptnu mail]# pwd
/etc/mail
[root@buptnu mail]# ls
access domaintable.db mailertable sendmail.cf submit.mc vi
rtusertable
access.db helpfile mailertable.db sendmail.mc trusted-users virtus
ertable.db
domaintable local-host-names Makefile submit.cf typescript
[root@buptnu mail]# more access
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
[root@buptnu mail]# ls
access domaintable.db mailertable sendmail.cf submit.mc vi
rtusertable
access.db helpfile mailertable.db sendmail.mc trusted-users virtus
ertable.db
domaintable local-host-names Makefile submit.cf typescript
[root@buptnu mail]# sendmail -t -v
To:yuio654@hotmail.com
From:localhost
Subject:hello,test mail
.
[email]yuio654@hotmail.com[/email]... Connecting to [127.0.0.1] via relay...
220 buptnu.test ESMTP Sendmail 8.13.1/8.13.1; Tue, 3 Jun 2008 15:23:04 +0800
>>> EHLO buptnu.test
250-buptnu.test Hello nesdu.com [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<[email]root@buptnu.test[/email]> SIZE=62 AUTH=root@buptnu.test
250 2.1.0 <[email]root@buptnu.test[/email]>... Sender ok
>>> RCPT To:<[email]yuio654@hotmail.com[/email]>
>>> DATA
250 2.1.5 <[email]yuio654@hotmail.com[/email]>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 m537N4qD015536 Message accepted for delivery
[email]yuio654@hotmail.com[/email]... Sent (m537N4qD015536 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 buptnu.test closing connection
[root@buptnu mail]# exit
funny121
我也有同样的问题~
同时,我想问一下楼主,sendmail.mc 这个文件,请问需要修改吗?
还是仅仅需要修改access这个文件就可以了?
yuio654
[quote]原帖由 [i]funny121[/i] 于 2008-6-3 16:40 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=8508834&ptid=1135335][img]http://bbs.chinaunix.net/images/common/back.gif[/img][/url]
我也有同样的问题~
同时,我想问一下楼主,sendmail.mc 这个文件,请问需要修改吗?
还是仅仅需要修改access这个文件就可以了? [/quote]
不大清楚啊,这不是在等着答案嘛
yuio654
[quote]原帖由 [i]abel[/i] 于 2008-6-3 18:01 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=8509569&ptid=1135335][img]http://bbs.chinaunix.net/images/common/back.gif[/img][/url]
1. netstat -an 及 telnet port 25 以確認 sendmail 巳啟動
2. 不要寄 hotmail 這種, 找個朋友的寄看看或找限制少的
3. maillog 多檢查一下 [/quote]
问题已解决,往别的邮箱发没问题。gmail,m165等。偏偏测试找得hotmail,搞得头都大了。