最近要迎来党的十九大,网络流量审查非常严格,以前能用的gmail服务器都显示连接失败,在网上找了找教程,便用自己的服务器搭了一个跳转服务器。
首先安装xinetd
sudo apt-get install xinetd -y
然后添加配置文件 /etc/xinetd.d/gmail
service imap { type = UNLISTED port = 993 bind = 0.0.0.0 socket_type = stream wait = no user = nobody redirect = imap.gmail.com 993 per_source = UNLIMITED cps = 100 2 } service smtp-465 { type = UNLISTED port = 465 bind = 0.0.0.0 socket_type = stream wait = no user = nobody redirect = smtp.gmail.com 465 per_source = UNLIMITED cps = 100 2 } service smtp-587 { type = UNLISTED port = 587 bind = 0.0.0.0 socket_type = stream wait = no user = nobody redirect = smtp.gmail.com 587 per_source = UNLIMITED cps = 100 2 }
配置说明就不解释了,主要是对应有端口号 port=993和对应的redirect=imap.gmail.con 993这类信息,填上对应的端口及地址。
如果要看详细说明,自行百度吧。
然后是重启xinetd服务
sudo service xinetd restart
然后就可以愉快的收发gmail了。
提示:如果你的服务器对端口作了限制,你开放对应端口。
设置说明:
imap的服务器设置为你服务器的ip,端口为993,选择接受所有SSL?TSL证书。
smtp同样,只不过端口为465
提供本服务器信息如下:
imap 104.223.1.36:993 smtp 104.223.1.36:465