I have a Postfix + Dovecot server that is receiving public mail and allowing folks to view their mailboxes using IMAP just fine for a particular domain (let's call the domain mail.acme.com). But, I have a second use for this server where I need to act as a relay only for traffic on my company's private subnets for a different domain (let's call that domain internal.acme.com). The relay traffic would need to log into the server still in order to send the mail message over but, rather than store the email message, it will forward the mail to another SMTP server.
How do I tweak the Postfix config to perform this relay task without disrupting the mail that is already coming in on "mail.acme.com" for the IMAP server?
I can't seem to find information that blends these two situations together. I either get information on setting up a Postfix relay server or information on adding Dovecot to Postfix, but not both.