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

# Setup hMailServer

> Configure hMailServer to relay outbound mail through MailChannels Outbound Filtering using SMTP authentication and X-AuthUser sender identification headers.

This guide walks you through configuring hMailServer to relay all outbound mail through MailChannels Outbound Filtering.

## Prerequisites

* Access to the hMailServer administration interface
* Your MailChannels SMTP username and password

## Configure the relay

<Steps>
  <Step title="Configure the SMTP relay">
    In the hMailServer administration interface, navigate to **Settings** > **Protocols** > **SMTP** > **Delivery of e-mail** > **SMTP Relayer**.

    Configure the relay with the following values:

    | Field                              | Value                           |
    | ---------------------------------- | ------------------------------- |
    | **Remote host name**               | `smtp.mailchannels.net`         |
    | **Remote TCP/IP port**             | `25`                            |
    | **Server requires authentication** | Checked                         |
    | **User name**                      | Your MailChannels SMTP username |
    | **Password**                       | Your MailChannels SMTP password |

    <img src="https://mintcdn.com/mailchannelscorporation/qgJx36-4nVXYStTm/images/setting-up-for-hmailserver/Selection_554.jpg?fit=max&auto=format&n=qgJx36-4nVXYStTm&q=85&s=7369bf6525151de8c6d2e6ac6a2e0aad" alt="hMailServer SMTP relay configuration" width="634" height="443" data-path="images/setting-up-for-hmailserver/Selection_554.jpg" />
  </Step>

  <Step title="Enable the X-AuthUser header">
    MailChannels uses the `X-AuthUser` header to identify the authenticated sender and track per-sender reputation. Messages without this header are treated as forwarded mail and subject to different policies.

    Locate `hmailserver.ini` in your hMailServer installation folder and add the following lines:

    ```ini theme={null}
    [Settings]
    AddXAuthUserHeader=1
    ```

    Restart hMailServer for the change to take effect.
  </Step>
</Steps>
