Skip to content

Redirecting outgoing emails to the IP we want

The need to redirect to another IP all outgoing emails on the server may be because they are tucked main IP SMTP output some good fucking black list that take long to de-list the IP. Para solucionar este problema rápidamente hay que redireccionar todo el tráfico saliente del puerto 25 the 587 (o al puerto que tengamos configurado el SMTP) hacia otra IP que tengamos configurada en nuestro servidor. La regla de IPTables es la siguiente:

Regla para el puerto 25:

iptables -t nat -A POSTROUTING -p tcp --dport 25 -j SNAT --to-source AQUI-LA-NUEVA-IP