13
Dec
December 13, 2016, 6:00 pm

因工作常需要给海外客户发邮件,gmail被封很不方便,

这里整理了几种方法解决Gmail邮件无法收发的问题;俩个方法都需要有个墙外Linux的VPS或者服务器才行。

第一种:安装一个在线的email客户端,比如rainloop

第二种:使用s.s.等穿墙服务

第三种:用端口转发实现

  • a. xinetd
    yum install -y xinetd
    cat>/etc/xinetd.d/gmail<<EOF
    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
    }
    EOF
    service xinetd restart
  • b. rinetd
    cat>>/etc/rinetd.conf<<EOF
    0.0.0.0 993 imap.gmail.com 993
    0.0.0.0 465 smtp.gmail.com 465
    0.0.0.0 578 smtp.gmail.com 578
    EOF
  • c. socat
    socat TCP-LISTEN:993,fork TCP:imap.gmail.com:993
    socat TCP-LISTEN:465,fork TCP:smtp.gmail.com:465
    socat TCP-LISTEN:578,fork TCP:smtp.gmail.com:578
打赏

Next Post Previous Post