How to Forward Messages to Another Mail Server If the Account Is Not Local

If Axigen hosts one or more domains that are shared with another mail server, deliveries to accounts hosted on the other server will fail with the error message "User not found".

Solution

In this situation, the problem is caused by the fact that Axigen will attempt to deliver the message for the recipient hosted on the other server locally since the domain is defined as being local.

The Advanced Acceptance / Routing rules wizard can be used to construct a rule that will instruct Axigen to route messages to another mail server if the domain is local but the recipient address is not.

Please take the following steps to create the rule:

- Login to the Webadmin interface.
- Click the "Security & Filtering button.
- Click the "Acceptance & Routing" link.
- Click the "Advanced Settings" tab.
- Click the "Add acceptance / routing rule" button.
- Type a name for the new rule. (ex.:route)
- In the "Conditions" section use the selection box to select the "Domain" item from the "Recipient" category and click the "Add condition" button. Type the name of the local domain (xxx.com) in the condition's text field.
- "For incoming messages that match" must be set to "ALL of the conditions below".
- In the "Conditions" section use the selection box to select the "Email is local" item from the "Recipient" category and click the "Add condition" button. Leave the default setting as is.
- In the "Actions" section use the selection box to select the "Recipient relay host" item from the "Recipients" category and click the "Add action" button. In the action's text field type either the hostname of the remote mail server or the ip address enclosed between brackets.
- Click the "Save configuration" button to save and apply the new rule.

Please note that this configuration is applicable in small configurations (Axigen and another mail server). For more complex configurations there are more flexible ways to route messages like using a usermap or a LDAP server.
OS: LinuxWindowsFreeBSDNetBSDOpenBSDSolaris
Distros: WindowsDEB based distros amd64FreeBSD 7.x