Split Domain with a Sendmail Primary

Revision as of 17:16, 14 September 2009 by Matuscak (talk | contribs)

Split Domain with a Sendmail Primary

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.

Mail routing on the Sendmail server.

  • 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.

This technique uses a 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".

Sendmail Configuration Changes

Edit /etc/mail/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.

make service sendmail restart

Changes Made For Each Migrated User

In /etc/aliases file foo: foo@zimbra.int

newaliases

Jump to: navigation, search