Contents

Introduction

Prerequisites

Requirements

Components Used

Background Information

Configuration

Create Domain Mapping via CLI

Test and Check Results in Mail Logs

Export Current Domain Map Addresses To Add More

Download Domain Map Configuration via FTP

Import Domain Map Configuration with New Entries

Download Domain Map Configuration via GUI

Related Information

Introduction

This document describes the steps to configure the Domain Mapping feature.

Prerequisites

Requirements

Cisco recommends knowledge of these topics:

- Cisco Secure Email Gateway (SEG / ESA)

- Command Line Interface (CLI) Access.

Components Used

The information in this document is based on these software and hardware versions:

- Email Security Appliance

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

Background Information

AsyncOS provides various methods to rewrite Sender and Recipient addresses within the email pipeline.

You can set up a domain map for listeners. For each listener, you can create a domain map table that rewrites the Envelope Recipient for any recipient whose domain matches an entry in the table. This function is comparable to sendmail's Domain Table or Postfix's Virtual Table.

Note: Only the Envelope Recipient is altered; the To: headers remain unchanged.

Configuration

Create Domain Mapping via CLI

Once you log in via CLI to your appliance:

1. Type listenerconfig.

2. Edit and select the listener you use for this setup.

3. From the menu, select domainmap option.

4. The Domain Map Table is displayed.

5. Select New to create a new entry.

6. Add the first address and hit Enter. In here you can enter a domain, partial hostnames, or email addresses.

7. Add the second address and hit Enter. This is the address to which the first address is mapped.

8. Once both addresses have been added, the Domain Map Table is displayed with the amount of current Domain Maps in it.

9. Select the print option to display the current domain maps.

10. Hit Enter until you go to the default CLI screen with the appliance hostname.

11. Submit and Commit changes.

Example:

Listener Configuration

Adding Actions

Configuring Domain Map

Test and Check Results in Mail Logs

Once you create the Domain Map configuration, send an email to the first added address to see the results.

The message comes from an external sender to the domain map address.

Incoming Email

In Mail Logs, the redirection is displayed in the To header.

In your mailbox, you receive the message in the redirected address.

Mapped Account Mailbox

Export Current Domain Map Addresses To Add More

You can export the current configuration of your Domain Map and add more entries directly to it.

1. Log in via CLI and type listenerconfig > edit. Select the listener to be edited by typing domainmap.

2. In the domainmap options, type export.

3. After this, you see that a new file has been created in /configuration/<exported-name>.

4. Once the configuration is exported, you can retrieve it via FTP or via GUI.

Exporting File

Download Domain Map Configuration via FTP

To download the configuration, use an FTP client to connect to your device and download the current exported file. Once connected to your device, the /configuration folder is displayed and inside you see the name of the file generated in the export step.

Example:

Domain Map Configuration File

Domain Map file contents.

Import Domain Map Configuration with New Entries

With the current configuration file, you can add more entries to it directly, and then upload it back to your device.

Add new entries.

Once the changes are made, you need to import the new file.

1. Log in via CLI to your device, type listenerconfig. Select the listener to be edited > domainmap.

2. Once in domainmap, type import.

3. Type the name you have for the file. In this case is  it is domain-map.

4. Once you type the name, hit Enter and you see that the entries have been imported.

5. To verify the entries, type print to display them.

Example:

Import New Entries

Download Domain Map Configuration via GUI

To do this, you must have already exported the Domain Map file as described above in the Export Current Domain Map Addresses and Add More section.

1. Navigate to System Administration > Configuration File.

2. In the Load Configuration section, you see the name of the exported file.

3. Click Preview Selected File.

4. A new window is opened with the current Domain Map configuration.

5. Once the information is displayed, you can copy the information, add it to a text file to edit it, and then upload it via FTP to the device.

Example:

Configuration File GUI

Preview File

Note: The use of FTP to download and upload files only applies for on-prem and virtual devices. For CES hosted devices, it is necessary to open a ticket with TAC to provide the new Domain Map configuration file.

Related Information

- Configuring Routing and Delivery Features