Centos Sendmail无法向internet发送信件(仅发送本地邮件)

Centos Sendmail无法向internet发送信件(仅发送本地邮件),centos,sendmail,Centos,Sendmail,我在内部网服务器上使用centos 5和sendmail。本地邮件的发送非常完美,但当我尝试向gmail发送电子邮件时,例如(或内部网以外的任何其他服务),我在日志中发现以下错误: Jan 16 16:50:32 testlink sendmail[27713]: r0GCoVi5027711: to=<example@gmail.com>, ctladdr=<webdev@testlink.ru.corp.domain.com> (502/502), delay=00:

我在内部网服务器上使用centos 5和sendmail。本地邮件的发送非常完美,但当我尝试向gmail发送电子邮件时,例如(或内部网以外的任何其他服务),我在日志中发现以下错误:

Jan 16 16:50:32 testlink sendmail[27713]: r0GCoVi5027711: to=<example@gmail.com>,
ctladdr=<webdev@testlink.ru.corp.domain.com> (502/502), delay=00:00:01,
xdelay=00:00:01, mailer=esmtp, pri=120332, relay=alt4.gmail-smtp-in.l.google.com.
[173.194.68.27], dsn=4.0.0, stat=Deferred: 
Connection refused by alt4.gmail-smtp-in.l.google.com.
Jan 16:50:32 testlink sendmail[27713]:r0GCoVi5027711:to=,
ctladdr=(502/502),延迟=00:00:01,
xdelay=00:00:01,mailer=esmtp,pri=120332,relay=alt4.gmail-smtp-in.l.google.com。
[173.194.68.27],dsn=4.0.0,stat=递延:
alt4.gmail-smtp-in.l.google.com拒绝连接。
还有一件事很重要——服务器不能从internet访问,但我可以从服务器访问internet


请告诉我应该在哪里查找问题。。我知道我应该以某种方式设置sendmail(目前我使用的是由yum设置的默认配置),但需要什么设置(或至少是方向)。。。提前谢谢

在命令行中运行
ifconfig
。也许你的IP有问题

同时查看
iptables-L

netstat-nap
应该有一个字符串

tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      5275/sendmail
检查提供程序是否阻止端口25:

telnet smtp.ukr.net 25

服务器具有正常的本地intranet 10.250.*.*ip,可从其他本地计算机访问Web服务器。当您尝试连接到internet中的另一台服务器时,需要告知您的外部ip地址。否则,外部服务器无法将任何信息作为答案发送给您。此外,ctladdr应该是有效的电子邮件。请找到通过公司官方邮件服务器转发电子邮件的解决方案。非常感谢你的帮助!很可能是您自己的防火墙或服务提供商阻止了端口25的传出连接。