# Handle mail for unknown users

To decide what happens to mail for a user who does not exist, open Manage Domain(s), expand your domain and click Policy. In the USER DOES NOT EXIST box pick one option, either forward the mail, send it to another mail host, bounce it, or add the user automatically from your old server. Then click Save.

## How to handle mail for unknown users

1. Open **Manage Domain(s)**, expand your domain and click **Policy**.
2. In the **USER DOES NOT EXIST** box, select one option.
3. Fill the box next to that option (for example the **Email** to forward to).
4. For **Auto Add User**, fill the old server's SMTP details and its POP or IMAP details, and choose the **Authentication Scheme**.
5. Click **Save** at the bottom of the page.

## Options

| Option | What it does |
|---|---|
| **Forward Email to** | Sends the mail to the address you type in the **Email** box (up to 100 characters). |
| **Mail Host IP** | Passes the mail to another mail server. Type its IP in the **HOST IP** box. It cannot be the XgenPlus server itself or 127.0.0.1, and it cannot contain spaces. |
| **Bounce with "No such user" Response** | Rejects the mail and the sender sees a "No such user" message. |
| **Auto Add User** | Checks the address on your old server and, if it exists there, creates it in XgenPlus automatically. |

## Auto Add User details

| Field | What it does |
|---|---|
| **Existing SMTP Server IP** and **PORT** | The old server XgenPlus asks whether the address exists. Both are required. The port must be a number. |
| **Existing POP Server IP** and **PORT** | The old server's POP details. Fill these or the IMAP pair. |
| **Existing IMAP Server IP** and **PORT** | The old server's IMAP details, used instead of POP. |
| **Authentication Scheme** | **UserName@DomainName** or **UserName**: how users sign in to the old server. |

When a user is added this way and signs in for the first time, XgenPlus checks the password with the old server and then keeps the same password in XgenPlus. After that it checks the password itself.

## Migration box

| Field | What it does |
|---|---|
| **Source IMAP Server IP** and **PORT** | The server to migrate from. Active only when **Auto Add User** is selected. |
| **SSL** | **Yes** if the source server uses SSL. |
| **Enable Auto Migrate** | **Yes** switches automatic migration on. |

## Example

> Meera moves `acme.in` from an old mail server. She picks **Auto Add User**, enters the old server's SMTP and IMAP details, and sets **UserName@DomainName**. Staff who have not been created yet are added the first time mail reaches them.

## Good to know

- Only one option in **USER DOES NOT EXIST** is active at a time. Choosing another clears the boxes of the previous one.
- If you pick **Forward Email to** and the address is in a domain on this server, the mailbox must already exist or the page refuses to save.

## Common questions

**Can I forward all unknown addresses to one mailbox?**

Yes. Choose **Forward Email to** and enter that mailbox address. The address must belong to a real mailbox if it is in a domain on this server.

**Why am I told I cannot use my own domain name?**

You cannot forward unknown mail to a catch-all address in the same domain, such as `*@acme.in`, because it would loop. Use a real mailbox or another domain.


Source: https://docs.xgenplus.com/admin/unknown-user-mail/
