---
title: Sites Stopped Sending Email After Enabling CSF? Setting SMTP_BLOCK and Allowing Outgoing SMTP
description: "**In short**The **SMTP_BLOCK** option in CSF stops programs from connecting directly to external mail servers, so SMTP plugins on sites fail. The better fix: make sites send through the local mail server with authentication. If you need external connections, add…"
url: "https://www.hyyat.com/en/knowledgebase/csf-smtp-block-allow-outgoing-smtp/"
updated: "2026-11-22"
category: Server management / WHM/cPanel
---

# Sites Stopped Sending Email After Enabling CSF? Setting SMTP_BLOCK and Allowing Outgoing SMTP

**In short**The **SMTP_BLOCK** option in CSF stops programs from connecting directly to external mail servers, so SMTP plugins on sites fail. The better fix: make sites send through the local mail server with authentication. If you need external connections, add the user to **SMTP_ALLOWUSER**, or set **SMTP_BLOCK = 0** in **WHM, Plugins, ConfigServer Security & Firewall, Firewall Configuration**.

![Sites Stopped Sending Email After Enabling CSF? Setting SMTP_BLOCK and Allowing Outgoing SMTP](https://www.hyyat.com/wp-content/uploads/2026/11/hkb-tr-13413-en.webp)

 **This guide is for server owners** if you have a VPS or dedicated server with WHM. If you would rather not manage the server yourself, our [server management](https://www.hyyat.com/en/server-management/) service can do it for you.

After enabling the CSF firewall, some sites may stop sending email, especially those using an SMTP plugin to send through Gmail or another external service. The cause is usually **SMTP_BLOCK**, which stops anything other than the mail server from connecting to external SMTP ports. The option is useful because it stops hacked scripts from sending spam.

## The better fix: keep the protection

Make sites send through the mail server on the same machine: host `localhost` or `mail.domain`, port 587 or 465, with a real mailbox and password. SMTP_BLOCK stays on, and mail is DKIM-signed for your domain.

## If you need to reach an external server

1. **Log in to WHM** in your browser at `https://server-IP:2087` or `https://server-hostname:2087` as root.
2. **Open Plugins,** then **ConfigServer Security & Firewall**.
3. **Click Firewall Configuration** to open the settings file.
4. **Find SMTP_ALLOWUSER** and add the cPanel username that needs external access. This is better than turning the protection off for everyone.
5. **Or set SMTP_BLOCK = 0** to turn the block off for all accounts, if you accept that.
6. **Save and restart CSF** with **Change**, then **Restart csf+lfd**.

![The Plugins section in WHM](https://www.hyyat.com/wp-content/uploads/2019/03/Configure-CSF1.png)

![Opening ConfigServer Security & Firewall](https://www.hyyat.com/wp-content/uploads/2019/03/Configure-CSF2.png)

![The Firewall Configuration button in CSF](https://www.hyyat.com/wp-content/uploads/2019/03/Configure-CSF3.png)

![The SMTP_BLOCK option in CSF settings](https://www.hyyat.com/wp-content/uploads/2019/03/Configure-CSF4-1024x432.png)

 **Careful:** WHM has a similar option, **SMTP Restrictions** in the Security Center. Do not enable it together with SMTP_BLOCK; use one or the other.

## Summary

- SMTP_BLOCK stops direct connections to external mail servers.
- Sending through the local mail server with authentication is better.
- For exceptions, use SMTP_ALLOWUSER instead of turning protection off.

Need a server with cPanel and WHM? See [VPS servers](https://www.hyyat.com/en/vps-hosting/) and [the cPanel and WHM on VPS guide](https://www.hyyat.com/en/knowledgebase/cpanel-whm-on-vps/).

## Frequently asked questions

   Why does my site not send email after enabling CSF?

Usually SMTP_BLOCK is stopping an SMTP plugin from connecting to an external mail server.

   Should I turn SMTP_BLOCK off?

Preferably not. Send through the local mail server, or exempt the specific user with SMTP_ALLOWUSER.

   **Related guides**

- [VPS Server Security: The Essential Steps After You Get Your Server](https://www.hyyat.com/en/knowledgebase/vps-server-security/)
- [How to Enable SPF and DKIM in cPanel](https://www.hyyat.com/en/knowledgebase/enable-spf-dkim-cpanel/)
- [cPanel and WHM on a VPS — The Complete 2026 Guide: What They Are, Licensing, and When to Choose Them](https://www.hyyat.com/en/knowledgebase/cpanel-whm-on-vps/)
- [How to Install cPanel and WHM on Your Server](https://www.hyyat.com/en/knowledgebase/install-cpanel-whm/)

[All guides in this section →](https://www.hyyat.com/en/kb/whm-cpanel-control-panels/)

  **Need this service from Hyyat Host?**Our team handles it for you, with support replying to tickets within 24 hours at most.[Email Hosting](https://www.hyyat.com/en/email-hosting/)[Business Hosting](https://www.hyyat.com/en/business-hosting/)
