Difference between revisions of "Split Domain with a Sendmail Primary"

(No difference)

Revision as of 18:05, 14 September 2009

The Split Domain article http://wiki.zimbra.com/index.php?title=Split_Domain discusses the details of configuring a Zimbra system to function as either a primary or secondary server in a split domain. This article will discuss a way to configure a Sendmail system to operate as the primary server with Zimbra acting as the secondary. As mentioned in the Split Domain article, it is necessary to perform configuration steps on both the primary and secondary systems for each mail account moved to the secondary.

The technique described here uses an entry for the migrated user in the /etc/aliases file on the Sendmail master that tells Sendmail to address the mail to a fake domain name (zimbra.int). An address rule (in Sendmail's rule 0) tells Sendmail to deliver mail addressed to "zimbra.int" to the "zimbra.example.com" host, using SMTP and change the recipient address domain back to "example.com".

The following conventions are used in the sample configuration:

  • The domain is "example.com".
  • The existing Sendmail server is "mail.example.com".
  • The Zimbra server is "zimbra.example.com" and has "example.com" configured on it.
  • The Zimbra server has been configured as the secondary system as documented in the Split Domain article.
  • The user "foo@example.com" has been migrated to the Zimbra server.

Sendmail Configuration Changes

Set your default directory to /etc/mail and edit the Sendmail configuration file, "sendmail.mc".

Near the end of the file, above the MAILER() definitions, add:

dnl
dnl Rewrite addresses of mail to the Zimbra server and deliver it via smtp
dnl
dnl Note that rule 0 returns a triple: mailer, host, user
dnl
LOCAL_RULE_0
R$+ < @ zimbra.int >     $# esmtp $@ mail.example.com $: $1 < @ example.com >

Note that the Sendmail configuration file syntax requires that there must be one or more <tab> characters between "@ zimbra.int >" and "$# esmtp ". All of the other white space in the rule must be <space> characters.

In order to have Sendmail use the configuration changes it is necessary to compile the sendmail.mc file into the sendmail.cf file and then restart the Sendmail daemon.

# make
# service sendmail restart

Changes Made For Each Migrated User

For each user migrated to Zimbra, create an entry in the /etc/aliases file that will cause our new rule 0 to route the message to the Zimbra server.

Insert the following for migrated user "foo"

foo:  foo@zimbra.int

Then rebuild the aliases.db file:

# newaliases
Verified Against: Sendmail 8.13, 8.14 Date Created: 9/14/2009
Article ID: https://wiki.zimbra.com/index.php?title=Split_Domain_with_a_Sendmail_Primary Date Modified: 2009-09-14



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search