Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想通过将每个连接的时间限制为 10 分钟来防止与 SMTP 服务器的连接挂起。这意味着应该在 10 分钟后断开连接。
iptables可以吗?
如果您的 smtp 端口是默认 (25),请执行以下操作:
iptables -A OUTPUT -p tcp --dport 25 -m state --state RELATED,ESTABLISHED -m limit --limit 10/minute -j DROP