Sending mail through an external relay

From Zimbra :: Wiki

Jump to: navigation, search
Admin Article

Article Information

This article applies to the following ZCS versions.
  ZCS 6.0 Article  ZCS 6.0
  ZCS 5.0 Article  ZCS 5.0
  ZCS 4.5 Article  ZCS 4.5


Contents

Overview

Zimbra server can route outgoing mail through an external relay MTA. This feature is useful when running a Split Domain during migration, when you need to route all outgoing mail through your ISP's MTA or just need to route all mail through another MTA for whatever reason. Relay MTA can be configured on "global" level and on per-server level. "Global" configuration is convenient in single- or multi-node environment if all your Zimbra MTA servers should use the same relay. Per-server configuration can be used in multi-node environment if each of your Zimbra MTA servers has to send email through a separate relay.

Note: that only non-local mail will be routed through a relay.

Other wiki articles

  • Outgoing SMTP Authentication - describes how to send mail through relay that requires authentication
  • Split Domain - describes split domain configuration
  • zmprov - explains how to use zmprov command line utility to change configuraiton attributes
  • zmsoap - explains how to use zmsoap command line utility to send SOAP requests to Zimbra server

configuring external relay MTA

zimbraMtaRelayHost

Host names for external relay MTAs are stored in Zimbra LDAP in zimbraMtaRelayHost attribute of global configuration and server objects. Values set for server objects take precedence over global configuration settings. If zimbraMtaRelayHost is set in global configuration and not set per server, all servers will use the value which is set in global configuration. The format of the zimbraMtaRelayHost value is hostname + port number. You can also use IP address instead of hostname for zimbraMtaRelayHost. zimbraMtaRelayHost gets translated into postfix relayhost configuration. Postfix will use the relay host if any hosts return connection refused or timeout .

Note: zimbraMtaDnsLookupEnabled should be set to false when configuring a zimbraMtaRelayHost. If hostname.domain.tld is provided and DNS lookups are enabled, postfix will attempt to locate an MX record for that provided hostname. zimbraMtaRelayHost can be specified as [hostname.domain.tld] in which case the MX lookups are disabled regardless of the value of zimbraMtaDnsLookupEnabled. Notice the difference is the brackets - [hostname.domain.tld] . See http://www.postfix.org/postconf.5.html#relayhost for more details.

setting zimbraMtaRelayHost via zmprov

  • per server:
zmprov ms server.domain.com zimbraMtaRelayHost external.relay.com:####
  • in global config:
zmprov mcf zimbraMtaRelayHost external.relay.com:####

setting zimbraMtaRelayHost via SOAP

  • Use ModifyServerRequest to change zimbraMtaRelayHost attribute of a server:
<ModifyServerRequest>
  <id>{value-of-zimbraId}</id>
  <a n="...">...</a>+
</ModifyServerRequest>

<ModifyServerResponse>
  <server name="{name}" id="{id}">
    <a n="...">...</a>+
  </server>
</ModifyServerResponse>
  • Example:
<ModifyServerRequest>
  <id>8753b9e2-d4d4-430c-8130-492a03240864</id>
  <a n="zimbraMtaRelayHost">external.relay.com:25</a>
</ModifyServerRequest>
  • via zmsoap
zmsoap -z ModifyServerRequest/id="b4b24501-119a-4cc7-8159-2c85db31aad3" ../a=external.relay.com:1234 @n="zimbraMtaRelayHost" -v
  • Use ModifyConfigRequest to change zimbraMtaRelayHost attribute in global configuration:
<ModifyConfigRequest>
  <a n="...">...</a>+
</ModifyConfigRequest>

<ModifyConfigResponse/>
  • Example:
<ModifyConfigRequest>
  <a n="zimbraMtaRelayHost">external.relay.com:25</a>
</ModifyConfigRequest>
  • via zmsoap
zmsoap -z ModifyConfigRequest/a=external.relay.com:1234 @n="zimbraMtaRelayHost" -v

setting zimbraMtaRelayHost in Zimbra Administration UI

Global Settings

Click on Global Settings in the navigation tree and open ""MTA"" tab:

GlobalConfigMTA.png

Type relay MTA host name and port number into the text fields next to ""Relat MTA for external delivery"" field. To add more external relays click ""Add"" button.

Server Settings

Select the server in the navigation tree or click on ""Servers"" in the navigation tree and select the server in the table

ServerMTATab.png

Type relay MTA host name and port number into the text fields next to ""Relat MTA for external delivery"" field. To add more external relays click ""Add"" button.


Verified Against: Date Created: 09/14/2010
Article ID: http://wiki.zimbra.com/index.php?title=Sending_mail_through_an_external_relay Date Modified: 10/17/2013
Personal tools