Days ago when moving one of production web system to a new node, we accidentally faced a problem of sending email using Gmail SMTP server. After some debugging the problem, I found that there is a problem on port blocking with IP v6. So I post here an article to guide how to solve CSF Firewall issue with port blocking.
- First, if the application cannot sending email using Google SMTP server (smtp.gmail.com with port 465 – SSL or 587 – TLS), check if the configuration information is correct.
- Then, if you are using free google apps, check if you already exceeded 99 out-sending email per day for that day. Please be noted that this restriction is applied for free Goolge apps account and will be reset after 24 hours.
- In case the debugging information show that connection is timed out, check on the website that we can access gmail.com and smtp.gmail.com.
- Then, try connecting to the target address via telnet ([bash]telnet smtp.gmail.com 465[/bash]
or
[bash]telnet smtp.gmail.com 465[/bash]
).
- If telnet give connection timeout error, check if we already open port in CSF (check in/etc/csf/csf.conf). Major note is here 😉
- Be sure port is opened on TCP_OUT.
- However, some new server infrastructure utilizes IPv6, so, be sure to check TCP6_OUT also.
- Restart CSF firewall to see its affect:[bash]csf -r[/bash]
2 thoughts on “Solve CSF Firewall issue with port blocking”
i am facing this problem with no solution,
port 465 & 587 r open in TCP_OUT, TCP_IN, UDP_OUT, TCP6_IN, TCP6_OUT, UDP6_OUT. (hav check in/etc/csf/csf.conf)
Still SMTP not working in any application such as wordpress, joomla, etc.
Before few months ago it was working perfectly but after some update of CFS, this problem is started.
When i disable Firewall CFS, SMTP email start going without any error.
when i enable CFS it stop sending SMTP emails.
i able to connect “telnet smtp.gmail.com 465” with firewall ON.
is there any solution ?
Thanks.
@Anky: if you can telnet to 465 port, the most problem might be on the connecting script. Be sure to connect via SSL if using 465 port or TLS if using 587 port. I also would suggest to use Easy SMTP plugin http://wp-ecommerce.net/easy-wordpress-smtp-send-emails-from-your-wordpress-site-using-a-smtp-server-2197