nbsp; 0 0 0.0.0.0:710 0.0.0.0:*
udp 0 0 0.0.0.0:111 0.0.0.0:*
udp 0 0 0.0.0.0:631 0.0.0.0:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 2456 /dev/gpmctl
unix 2 [ ACC ] STREAM LISTENING 2634 /tmp/.gdm_socket
unix 2 [ ACC ] STREAM LISTENING 2496 /tmp/.font-unix/fs7100
unix 2 [ ACC ] STREAM LISTENING 2644 /tmp/.X11-unix/X0
但这个仅仅表示e-mail服务器只接收你本机的邮件.为了解决这个问题,你必须修改配置,告诉sendmail去监听你对外的网卡地址. >>2.解决对外smtp端口的监听 假设你的服务器上安装了一块网卡(eth0),并用ifconfig配置好你的ip地址.这个地址可以和DNS解析的地址不一样,但你要保证DNS可以正确 地解析邮件服务器的地址.这里我们使用的地址是一样的(推荐): [root@AS3 / ]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:65:C8:DC
inet addr:192.168.0.111 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:661 errors:0 dropped:0 overruns:0 frame:0
TX packets:399 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:68152 (66.5 Kb) TX bytes:50136 (48.9 Kb)
Interrupt:10 Base address:0x1400
可以看到这台主机的eth0的ip地址是192.168.0.111.现在修改/etc/mail/sendmail.cf文件来配置sendmail的监听端口: # SMTP daemon options O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA 更改为 O DaemonPortOptions=Port=smtp,Addr=192.168.0.111, Name=MTA 改完后保存退出,并且重新启动sendmail服务: [root@AS3 / ]# service sendmail restart Shutting down sendmail: [ OK ]
Shutting down sm-client: [ OK ]
Starting sendmail: [ OK ]
Starting sm-client: [ OK ] [root@mail /root]# 现在可以用netstat -nl来查看是不是已经更改了.如你所看到的,sendmail的监听端口现在是eth0的ip地址:192.168.0.111了. [root@AS3 / ]# netstat -nl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:32769 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:32770 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:931 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 &nbs 上一页 [1] [2] [3] [4] [5] [6] 下一页 没有相关教程
|