小编tom*_*tom的帖子

即使允许使用 smtp 和 dns,Sendmail 也不能与 iptables 一起使用

我在 Ubuntu 10.04 上安装了 sendmail,仅用于 phpmail()功能。这工作正常,除非 iptables 正在运行(我一直在sendmail myemailaddress@domain.com用来测试这个)。

我认为我已经允许 SMTP 和 DNS(我用来测试 iptables 规则的脚本如下,在我的版本中是我的主机名称服务器的实际 IP),但无济于事!

iptables --flush

iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT

# Postgres
iptables -A INPUT -p tcp --dport 5432 -j ACCEPT

# Webmin
iptables -A INPUT -p tcp --dport 10000 -j ACCEPT

# Ping
iptables -A INPUT -p icmp --icmp-type echo-request …
Run Code Online (Sandbox Code Playgroud)

linux iptables sendmail

4
推荐指数
1
解决办法
8570
查看次数

标签 统计

iptables ×1

linux ×1

sendmail ×1