Blocking all IPs & Using PHP mail()

Post Reply
carson
Junior Member
Posts: 2
Joined: 09 Jan 2023, 03:43

Blocking all IPs & Using PHP mail()

Post by carson »

I run a MyBB forum, and MyBB utilizes PHP mail() for account activation e-mail addresses. In my csf.deny, I have 0.0.0.0/0 denied. This is to prevent all incoming requests directly to the server. The website is only accessible by going to the domain. The issue with this, is that it makes PHP's mail() function a little finicky. Is there a way with CSF to block all incoming requests, but allow all out going requests? Or, what would be a better way to go about this?
carson
Junior Member
Posts: 2
Joined: 09 Jan 2023, 03:43

Re: Blocking all IPs & Using PHP mail()

Post by carson »

I was able to resolve this by adding the following to my csf.allow

Code: Select all

icmp|out|d=25,465,587|s=0.0.0.0/0 # Allow all outgoing connections on ports 25, 465, and 587
Post Reply