Routing

The SMTP Routing feature allows you to redirect messages based on the recipient address. Also, if your server's IP is blocked on a certain server, you can redirect emails to that destination using another SMTP server.

A list of routing rules is displayed:

Figure. General view: Routing tab.

Field

Description

Source

This column shows the original recipient.

Destination

This column shows where the message will be redirected.

Hostname

This column shows a name of the server that messages will be forwarded through.

Add

Click the button to add a new routing rule. The Route dialog opens.

Edit

Select a rule and click the button to edit this rule. The Route dialog opens.

Delete

Select a rule and click the button to remove this rule.

Arrows

Select a rule and use these buttons to move it in the list up or down.

Edit File

Click the button to edit rules in the redirect.dat file. To reveal examples, click the Comments button here.

Figure. Routing tab: Route dialog.

Field

Description

Source

The email address or domain which should be replaced and redirected.

You can use the '...' button to select accounts, domains or groups via the Select Item dialog.

Destination

The email address or domain by which the source one is replaced and redirected.

You can use the '...' button to select accounts, domains or groups via the Select Item dialog.

Syntax:

emailaddress | domain

You can use three variables in this field: %%alias%%, %%domain%% and %%current_recipient%%.

E.g. %%alias%%@%%domain%%.

%%current_recipient%% uses the current recipient as the destination.

Hostname

A hostname, with an optional port, that will be used for extended routing, using the following syntax:

[user":"password@]hostname [":" port]

Example:

relay.isp.com

This causes that corresponding messages will be sent through the relay.isp.com mail server.

user:pwd@relay.isp.com

This causes that corresponding messages will be sent through the relay.isp.com mail server with SMTP authentification (user:pwd).

username@domain.com:passwd@relay.isp.com:586

This causes that corresponding messages will be sent directly through the relay.isp.com server, port 586 instead of using standard DNS lookup with SMTP authentication against full email address.

Match sender instead of recipient (Sender is Source)

Check this box if you want to use routing for senders instead of recipients. In this case, fill in the sender's email address into the Source field.

Sender must be authenticated

Check this box and all senders of messages processed by this routing must be properly authenticated via SMTP (SMTP AUTH).

Local sender only

Check this box and routing will be performed only for local senders.

Local recipients only

Check this box and routing will be performed only for local recipients.

Skip rules

Check this box and rules will not be processed for routed messages.

Routing Scenario Example

This useful scenario helps you to relay all emails sent from some domain to another server.

Open the redirect.dat file (Mail > General > Routing > Edit File...) and use the following syntax:

[original_domain]=%%alias%%@%%domain%%;12;[another_server]

Example:

tests.icewarpdemo.com=%%alias%%@%%domain%%;12;mailbackup.server.com

Note: If you have MDA enabled (by default it is off), it might do relay for local emails too. In this case, try to add a rule such as this one, before the main rule:
Source : testes.icewarp.com.br
Destination : testes.icewarp.com.br
Server: blank
Options: do not mark any