如何用Apache James把E-mail从内网(内部局域网)发到外网(如263.net,hotmail.com)

如何用Apache James把E-mail从内网(内部局域网)发到外网


第一步. 得到DNS, 在windows上可通过ipconfig /all得到, 如下

D:\>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : holen
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter 本地连接:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Myson MTD80X Based Fast Ethernet Car
d #3
Physical Address. . . . . . . . . : 00-40-95-00-2E-B3
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Autoconfiguration IP Address. . . : 169.254.224.137
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :

PPP adapter adsl:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
Physical Address. . . . . . . . . : 00-53-45-00-00-00
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 221.216.144.61
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 221.216.144.61
DNS Servers . . . . . . . . . . . : 202.106.0.20
202.106.46.151
NetBIOS over Tcpip. . . . . . . . : Disabled

如上,DNS即202.106.0.20或202.106.46.151

第二步 打开D:\james-2.1.3\apps\james\SAR-INF\config.xml

默认是第344行, 原为<server>127.0.0.1</server>, 改为<server>202.106.0.20</server>即可.

这时, 假如你在James上建立了一个帐号holen@localhost,则可从该帐号发信到holen@263.net.
,

分享到