On Jul 7, 2011, at 1:42 PM, IT Guy wrote: > Hi all, > > I'm in the process of migrating our company from a certain proprietary mail system to a new OpenBSD mailserver (IMAP + Postfix). > > I'd like to be able to migrate our users one at a time rather than do the whole company in one fell swoop. > > Does anyone know of a good/easy way to conditionally route incoming mail based on the envelope recipient address? > (Basically I want migrated users to start getting their mail from the new box, while the other users continue to connect to the old server)
Dre, One way to do this would be to use the Postfix re-write rules to divert certain addresses to the full hostname. All mail needs to go to the new mail server first, then be relayed on to the old server using the relay_domains parameter. Make sure that this relay works and that the new server is not accepting mail for the @example.com domain first. Then, put something like this in /etc/postfix/aliases for each user that you want to have moved over to the new server: john....@example.com: john....@newmailserver.example.com This should transparently get Postfix to deliver the mail locally. As you migrate people, add their addresses to the aliases file. The Postfix docs might help. <http://www.postfix.org/aliases.5.html> <http://www.postfix.org/ADDRESS_REWRITING_README.html#aliases> <http://www.postfix.org/postconf.5.html#relay_domains> You might also want to try asking on a Postfix-oriented mailing list. Hope this helps. --Paul Paul Suh http://www.ps-enable.com/ paul....@ps-enable.com (240) 672-4212 [demime 1.01d removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]