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

# Email Server

> Full Postfix + Dovecot management — domains, accounts, aliases, DKIM/SPF/DMARC, SpamAssassin, Roundcube webmail, and mail queue.

<Warning>
  This feature is **not yet available**. Email server management is currently under development and will be integrated in a future release.
</Warning>

<Info>
  **Path:** Email Server (`/email`) — Admin only

  Manage a complete mail server stack (Postfix, Dovecot, OpenDKIM, SpamAssassin, Roundcube) directly from the panel.
</Info>

## Service Status Cards

The top of the page shows a card for each email service:

| Service          | Role                         |
| ---------------- | ---------------------------- |
| **Postfix**      | SMTP server (sending)        |
| **Dovecot**      | IMAP/POP3 server (receiving) |
| **OpenDKIM**     | DKIM signing                 |
| **SpamAssassin** | Spam filtering               |
| **Roundcube**    | Webmail interface            |

Each card shows the service version, running status badge, and **Start / Stop / Restart** buttons.

***

## Tabs

### Status

Overview grid of all five service cards — the quickest way to see what's running and control services.

### Domains

Domain cards showing name, active status, account count, alias count, and DNS record verification badges:

* **DKIM** — verified / not verified
* **SPF** — verified / not verified
* **DMARC** — verified / not verified

**Actions per domain:** Verify DNS, Deploy DNS, Delete.

**Add Domain** form at the top — enter a domain name to add it.

### Accounts

Create and manage email mailboxes per domain.

* **Domain Selector** — switch between configured domains
* **Create Account** — username, password, quota (in MB)
* **Account cards** — email address, quota, active status, actions

**Per-account actions:** Change Password, Delete.

### Aliases

Create email aliases (source → destination mappings) per domain.

* **Domain Selector**
* **Create Alias** — source address, destination address
* **Alias cards** — shows the mapping with delete button

### Forwarding

Forward emails from an account to another address.

* **Account Selector** — choose which mailbox to set up forwarding for
* **Create Rule** — destination email, "Keep local copy" checkbox
* **Rule cards** — shows `account@domain → destination`, active status, keep-copy status

### DNS Providers

Connect DNS providers to automatically deploy DNS records (DKIM, SPF, DMARC, MX):

| Provider     | Configuration            |
| ------------ | ------------------------ |
| Cloudflare   | Name, API Key            |
| Route53      | Name, Access Key, Secret |
| DigitalOcean | Name, API Token          |

**Per-provider actions:** Test connection, List Zones, Delete.

After testing, click **List Zones** to see available DNS zones from the provider. Use **Deploy DNS** on a domain card to push all required records automatically.

### Spam

SpamAssassin configuration:

| Setting             | Description                                        |
| ------------------- | -------------------------------------------------- |
| **Required Score**  | Minimum score to flag as spam (default 5.0)        |
| **Rewrite Subject** | Prefix added to spam emails (e.g. `[SPAM]`)        |
| **Bayes Filter**    | Enable Bayesian spam learning                      |
| **Auto-Learn**      | Automatically train the filter from confirmed spam |

Buttons: **Update Rules** (fetch latest SA rules), **Save**.

### Webmail

Roundcube webmail management:

* Install, Start, Stop, Restart Roundcube
* Configure the proxy domain (the URL Roundcube is served on)
* Direct link to open Roundcube once configured

### Queue & Logs

**Mail Queue** — messages waiting to be delivered:

* Queue ID, sender, recipient, size, arrival time
* **Delete** per item, **Flush Queue** to force delivery of all queued messages

**Mail Logs** — raw server log output with line count selector (50 / 100 / 500 lines).
