I just finished this kind of installation. Here's what I've setup:
qmail running as gateway out on internet as mail.aaa.com .
Exchange 4.0 internal running pullmail known as aaa.com.
Setup qmail as a virtual domain for @aaa.com per Ch 11 of Running qmail
Setup qmail-pop3 per LWQ and various docs.
Put mail.aaa.com & localhost in control/locals - DO NOT PUT aaa.com in
locals!!
In .qmail-default put | echo "X-Envelope-To: $DEFAULT@$HOST"; cat) |
forward user-finaldelivery
In .qmail-finaldelivery - ./Maildir/
Setup pullmail to /r:X-Envelope-To into Exchange system. This fixes some
nasty problems with pullmail/exchange handling mailing lists, etc.
How this setup works for me is every 10 minutes pullmail is run on my
Exchange server to pop all mail for the virtual domain and shove it into
SMTP. The X-Envelope-To: field will contain the [EMAIL PROTECTED] and
pullmail will use that as the RCPT-TO and To: fields so Exchange can
handle the email properly. After this, read then reread all man pages,
and other docos available! Buy pizza/beer for the list!
HTH
.mark
>----------
>From: Benjamin Collar[SMTP:[EMAIL PROTECTED]]
>Sent: Wednesday, March 07, 2001 9:36 AM
>To: [EMAIL PROTECTED]
>Subject: Re: domain rewrites
>
>On Wed, 7 Mar 2001, Dave Sill wrote:
>
>Hi Dave,
>
>Thank you for your answer. According to the mail people here, if mail
>that's to [EMAIL PROTECTED] gets forwarded to the internal Exchange servers,
>they'll explode (or at least return the mail).
>
>Putting mail.aaa.com in rcpthosts and local would just tell qmail that
>it's okay to move the mail along, right? That, then, wouldn't solve the
>explosion problem.
>
>If it's impossible then the client won't use qmail. They are using
>sendmail now and it's causing LOTS of problems, and they hired me to find
>another solution.
>
>So please, what's the expensive, error prone way of handling it? Of
>course, I'll let them know that it may be better to fiddle with the
>Exchange servers so they'll accept mail.aaa.com, but they won't be happy
>with that.
>
>Thank you
>Ben
>
> > Benjamin Collar <[EMAIL PROTECTED]> wrote:
>>
>> >How do I rewrite a domain name on some incoming mail before passing it on?
>>
>> Better question is why would you want to?
>>
>> >For instance, the company I'm working for used to receive its mail at
>> >mail.aaa.com. Now it only wants aaa.com. This is not a virtual
>> >domain. Currently, they use a special sendmail rule to rewrite
>> >mail.aaa.com to aaa.com before forwarding the mail to the exchange
>> >server. How would I accomplish this with qmail?
>>
>> Just add mail.aaa.com to control/locals and control/rcpthosts.
>> Rewriting headers is expensive, error prone, and just plain silly.
>>
>> -Dave
>>
>
>
>