You're wrong. That will work. You should not set smtp_block to 0.
Because then the smtp_allowlocal=1 doesn't matter anyway anymore either. Maybe you didn't have the smtp_allowlocal to 1 but set to 0, then it won't work indeed.
We got forums on our servers and websites, which send mail via our smtp server and also via php mail and that all works fine with the settings I said.
If you can't send mail that way, then something else is wrong at your system.
These should also be default:
SMTP_ALLOWUSER = ""
SMTP_ALLOWGROUP = "mail,mailman"
However, if you want to keep things the way you have set it now, feel free to do that, but do not declare that they should be set that way because they shouldn't and it gives a wrong impression to others.
P.s. please don't quote full posts.
I can confirm that these settings work for internal SMTP using a plugin:
SMTP_BLOCK = "0"
SMTP_ALLOWLOCAL = "1"
and these settings wont work:
SMTP_BLOCK = "1"
SMTP_ALLOWLOCAL = "1"
on my website using internal SMTP.
And I have not touched these settings:
SMTP_ALLOWUSER = ""
SMTP_ALLOWGROUP = "mail,mailman"
advised by
Richard G
In summary for those who have similar issues after installing DirectAdmin. I follow these procedures advised by our great community:
1. Install and configure Firewall CSF on Centos 7 where DirectAdmin is installed. Here is a good guide:
I was recently asked if there is an easier way to manage your server’s Firewall on servers with web-based interfaces like cPanel, CentOS Web Panel and with s…
www.digitalocean.com
2. Make sure set this line in CSF config file:
$ cd /etc/csf/ && vi csf.conf
SMTP_BLOCK = "0"
SMTP_ALLOWLOCAL = "1"
3. Make sure ports 25, 465 and 587 are added to these line in CSF config file:
$ vi csf.conf
# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,2222,6827,35000:35999"
# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,53,80,110,113,443,465,587,993,995,2222"
4. Add your server's IP in CSF allow list with a line:
$ vi /etc/csf/csf.allow
xxx.xxx.xxx.xxx
5. Reload CSF and reboot your server:
$ csf -r
$ reboot
6. If mail.yourdomain.com is not working or open in the internal settings of, for example, a plugin, change it to your server's IP above which is in Firewall CSF's allow list.
It works very for Internal SMTP setting on my server. For external SMTP, you may follow
Richard G's advice.
Many thanks for great support.