with postfix you could use virtual _maps, so mail is relayed as it is received to the proper server for final delivery..
so if your mail servers were
you would setup the /etc/postfix/virtual map as follows
so postfix on your pimary MX server mailhub, would know that the message needs to be forwarded to the other server (branch1) for delivery..
but as arckane points out, without knowing what MTA (postfix, exim, qmail, sendmail, MS Exchange, other) you are running, and knowing how it's setup (is it using a SQL backend ? is it using LDAP ? , etc.. ) it's difficult to offer a proper solution.