> ## Documentation Index
> Fetch the complete documentation index at: https://jetemail.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# cPanel Plugin

> Install and set up the JetEmail plugin for cPanel servers

> **Warning:** This plugin only supports AlmaLinux, Rocky Linux, and CloudLinux operating systems. Ubuntu is not yet supported.

## Installing the cPanel Plugin

To install our cPanel plugin, follow these steps:

1. Ensure you have root access to your cPanel server.

2. Generate a smarthost (or use an existing one) in your JetEmail [dashboard.](/outbound/getting-started)

3. Open a terminal or SSH into your server.

4. Download the installation script and set the correct permissions:

```bash theme={null}
curl -O https://cdn.jetemail.com/plugins/cpanel/install-cpanel.sh
chmod 755 install-cpanel.sh
```

5. Run the installation script (no inputs required):

```bash theme={null}
./install-cpanel.sh
```

6. The script will install the JetEmail repository on your server.

7. After the repository is installed, you have two options to complete the configuration:

   **Option A: Command Line Installation**

   Run the `jetemail-cpanel install` command with your JetEmail credentials:

   ```bash theme={null}
   jetemail-cpanel install --smtp-user USERNAME --smtp-pass PASSWORD
   ```

   Available options:

   * `-u, --smtp-user <SMTP_USER>`: Your JetEmail smarthost username (required, must not contain @ symbol)
   * `-p, --smtp-pass <SMTP_PASS>`: Your JetEmail smarthost password (required)
   * `-d, --domain-lockdown`: Add DNS TXT records for all domains ([Domain Lockdown](/outbound/domain-lockdown))
   * `-s, --add-spf`: Add SPF include for JetEmail ([email authentication](/outbound/email-authentication))
   * `-v, --verbose`: Verbose output (use multiple times for more verbosity)
   * `--port <PORT>`: SMTP port — `25`, `587`, or `2525` (default: `587`)
   * `--skip-smtp-test`: Skip SMTP connection test (use if network restrictions prevent connection testing)
   * `--test-only`: Test mode: only test SMTP connection, don't install anything
   * `-h, --help`: Print help

   Examples:

   ```bash theme={null}
   # Basic installation
   jetemail-cpanel install -u smarthostusername -p password

   # With domain lockdown
   jetemail-cpanel install -u smarthostusername -p password -d

   # With SPF modification
   jetemail-cpanel install -u smarthostusername -p password -s

   # With both domain lockdown and SPF
   jetemail-cpanel install -u smarthostusername -p password -d -s

   # Use port 2525 instead of the default 587
   jetemail-cpanel install -u smarthostusername -p password --port 2525

   # Test SMTP connection only
   jetemail-cpanel install -u smarthostusername -p password --test-only
   ```

   **Option B: WHM Plugin**

   Use the JetEmail plugin in WHM to complete the configuration through the web interface.

## What the Plugin Does

The plugin automatically configures several email authentication and security settings:

1. Adds `spf.jetsmtp.net` to the additional hosts section of Exim configuration
2. Configures JetEmail's inbound IP addresses in:
   * `senderverifybypass` list
   * `trustedips` list
3. If Domain Lockdown is enabled (`-d` flag), adds a `_jm` TXT record to all domains for verification
4. If SPF modification is enabled (`-s` flag), enables and configures SPF records for all domains
5. Enables and configures DMARC records for all domains
6. Makes additional Exim configuration changes:
   * Enables SRS (Sender Rewriting Scheme)
   * Disables remote HELO checks

## Uninstalling the cPanel Plugin

To uninstall the JetEmail cPanel plugin:

1. Ensure you have root access to your cPanel server.

2. Open a terminal or SSH into your server.

3. Remove the plugin using yum:

```bash theme={null}
yum remove jetemail-cpanel
```

4. Remove the JetEmail repository file:

```bash theme={null}
rm /etc/yum.repos.d/jetemail.repo
```

5. The plugin and all JetEmail configurations will be removed from your server.
