---
title: How to Configure CWP server for Email use
description: "Configuring your **CWP (CentOS Web Panel)** server for email use involves setting up the necessary services like **Postfix**, **Dovecot**, and ensuring that proper DNS records are configured (such as **MX**, **SPF**, **DKIM**, and **rDNS**). This guide will help you set…"
url: "https://truehost.com/support/knowledge-base/how-to-configure-cwp-server-for-email-use/"
updated: "2024-10-04"
category: Business Email
---

# How to Configure CWP server for Email use

Configuring your **CWP (CentOS Web Panel)** server for email use involves setting up the necessary services like **Postfix**, **Dovecot**, and ensuring that proper DNS records are configured (such as **MX**, **SPF**, **DKIM**, and **rDNS**). This guide will help you set up email services on your CWP server, allowing you to send and receive emails via your domain.

### Prerequisites:

- A server with **CWP installed** properly. See **[this](https://truehost.com/support/knowledge-base/complete-guide-on-how-to-properly-install-control-web-panelcwp/)** on how to properly do it.
- **Root access** to the server.
- A valid **domain name** pointing to your server.
- **rDNS** (reverse DNS) configured for your server's IP address (if not, contact our **[support team](https://wa.me/19726743814)** to set it up to point to the server's hostname then give it 3 hours to propagate. before proceeding). This is important.

**Step 1: Log in to CWP Admin Panel** using [these](https://truehost.com/support/knowledge-base/how-to-access-cwp-main-whm-panel/) steps

**Step 2: Configure hostname SSL for your server**.

This SSL Certificate will allow your webmail to be accessible via https and will also be used for TLS/SSL encryption for your emails

- If you did not, during CWP Installation, please configure your hostname using **[these steps.](https://truehost.com/support/knowledge-base/set-up-hostname-ssl-on-cwp/)**

**Step 3: Configure SPF** **Record**

- Login as root to CWP and check the Navigation pane on the left side.
- Scroll down to **Email -> SPF Manager**.

![](https://truehost.com/support/wp-content/uploads/2024/10/image-90.png)

- Once you click on **SPF Manager**, you will see a form with the heading of **Add SPF record**
- Fill the form with the recommended settings as shown by red highlights in the image below. Each section has a drop-down, which you will use to select the right value. Leave the other ones blank, unless if they are applicable to you.
- Once done, click on the blue button labeled **Add SPF Record**

![](https://truehost.com/support/wp-content/uploads/2024/10/image-91-1024x407.png)

**Step 4: Configure DKIM** **Record**

- While logged in to CWP Admin, on the Navigation pane, click **DKIM Manager**.
- Select your domain name and click **Add DKIM** button. Once added, you should see the domain having 5 green ticks as shown below.

![](https://truehost.com/support/wp-content/uploads/2024/10/image-92-1024x786.png)

**Step 5 Configure Antispam and Antivirus**

- CWP provides three free antispam fighting tools in SpamAssassin, ClamAV and Amavis
- To enable these services go to the Navigation Pane and click **MailServer Manager**
- Under **Rebuild Postfix Configuration** section, **select AntiSpam/AntiVirus (recommended)** and click **Rebuild Mailserver**. Once done, **Restart All Mail Server services**.

![](https://truehost.com/support/wp-content/uploads/2024/10/image-93-1024x587.png)

- Additionally, enable **SpamHaus** by clicking **AntiSpam** on the Navigation Pane. Then **Install SpamHaus**. Note that this needs you to activate **[CSF Firewall](https://truehost.com/support/knowledge-base/how-to-enable-csf-firewall-on-cwp/)**.

![](https://truehost.com/support/wp-content/uploads/2024/10/image-94.png)

- You can now **[create your emails](https://truehost.com/support/knowledge-base/how-to-create-email-accounts-on-cwp/)** then access your them from web using the following URLs

```
https://yourhostanme/webmail E.g. https://percona.truehost.cloud/webmail

OR

http://your_server_ip/webmail, E.g  or http://91.134.244.66/webmail
```

![](https://truehost.com/support/wp-content/uploads/2024/10/image-96-1024x538.png)
