T0PIT
V2EX  ›  问与答

内网主机上的 gitlab 怎么发邮件到外网?

  •  
  •   T0PIT · Nov 12, 2018 · 1856 views
    This topic created in 2834 days ago, the information mentioned may be changed or developed.

    尝试用 gitlab,为了安全,要求只能安装在内网主机 A ( linux )上,验证邮件还有后续通知邮件等都需要发到公网 smtps 服务器(465 端口),这就没法直接发。

    现在还有台主机 B ( linux )有公网 IP,可以通过账号密码访问公网 smtps 服务器(465 端口),和 A 也在同一个网段,能相互访问。现在就想怎么能让 A 上发邮件到 B 再发到公网 smtps 服务器上收邮件。

    看了些资料,了解了些方案:

    1.在 B 上自建一个配置相同 smtp+ssl 协议的 postfix 服务器,用于中转;
    2.在 B 上用 nginx 做 mail proxy ;
    3.在 B 上用 nginx 做 tcp 的反向代理。
    

    这两个工具里 nginx 配过简单的 http 代理,postfix 没有实际用过,想说大家帮忙看看什么方法更简单易行,或者有其他更好的方法? 感谢感谢!

    gamexg
        1
    gamexg  
       Nov 12, 2018
    B iptable dnat 一个端口到 smtps。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2562 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 15:37 · PVG 23:37 · LAX 08:37 · JFK 11:37
    ♥ Do have faith in what you're doing.