Hi Josh,

I knew I did not write this up in vain. ;^) This is part of a mail I sent
to the list a while ago, you can get it from the archive if you want to
see the orig.

AFAIK you have two instances of qmail to do this. If anyone knows how to
do this with one instance please post the solution....

-Tony

quepasa.com Email system:

NOTE: The reference to "foo.fake" below is a literal reference, I use
"foo.fake" for a strictly internal virtualhost/smtproute setup.

Principle problems (background only):

] we have outsourced our web customer email system, so
[EMAIL PROTECTED] is a customer, and has to be delivered to
criticalpath.net (cp.net).

] we have also propagated [EMAIL PROTECTED] as employees email
addresses, which should be delivered locally.

] when you out-source with cp.net they want you to point your domain MX
record at them:
        quepasa.com.     IN      MX 10 inbound.quepasa.com.criticalpath.net.

I was not willing to do that for several reasons:
        ] if cp is down, external email does not come through.
        ] I did not want to have to configure filters and forwards at
        cp.net so all employee mail did the right thing.
        ] as a business continuity measure, I wanted to control the
        mail flow. If we needed/wanted to change email providers, I
        can make the routing change in one qmail file.

] when delivering to cp.net the mail *MUST* be to [EMAIL PROTECTED]
(cp's restriction not mine). I learned the hard way that:
         [EMAIL PROTECTED]
will not work.

The solution is obvious, accept mail at a central box
(mailx.quepasa.com) for [EMAIL PROTECTED], if:

  a.] the mail user is an employee, send it along to a bastion host
  for delivery inside quepasa.com.

  b.] if not send it off to [EMAIL PROTECTED] at cp.net. (i.e. SMTP
  connect is to inbound.quepasa.com.criticalpath.net, RCPT
To:<[EMAIL PROTECTED]>)

The problem comes up at b. the mail has already been delivered to
quepasa.com, if you attempt a forward like.
        |forward $[EMAIL PROTECTED]
with a smtproute entry like:
        quepasa.com:inbound.quepasa.com.criticalpath.net
The smtproute never seems (???) to be consulted, and it fails as a looping
mail.

I tried fooling around with virtual domains and header rewriting, but
it came down to this, (AFAIK) a qmail machine that receives mail
addressed to [EMAIL PROTECTED], will never again deliver it to
[EMAIL PROTECTED]

That left me with one solution another instance of qmail. I did not
want to run it on the same machine, different port. I loaded another box.


Brief description of mail flow:

] mail for [EMAIL PROTECTED] comes in to mailx.quepasa.com,

if
  jane is an employee, deliver mail according to fastforward based
/etc/aliases rule.
else
  forward mail to "[EMAIL PROTECTED]"
done

There is a smtproute for foo.fake to pair.quepasa.com.

pair.quepasa.com accepts the mail for virtual domain foo.fake, then
forwards it [EMAIL PROTECTED] pair.quepasa.com had a smtproute that
sends all quepasa.com mail to inbound.quepasa.com.criticalpath.net.

Pair's entire function is to change mail that comes in as
[EMAIL PROTECTED], back to a clean quepasa.com address.

On Wed, 23 Aug 2000 [EMAIL PROTECTED] wrote:

> 
> I'm working on a similar situation. I had tried what Dave suggested and it
> worked as documented. However, I need to be able to actually relay messages
> that don't match an alias (ie. don't rewrite the recipient address).
> 
> My normal config:
> 
> I have my qmail box acting as my primary MX and behind that sits my Domino
> server running SMTP. My rcpthosts has:
> kendle.com
> 
> My smtproutes has:
> kendle.com:mail.kendle.com
> 
> locals has only the machine itself.
> 
> So any message for kendle.com is relayed to mail.kendle.com (the Domino
> server), which accepts messages for recipients @kendle.com.
> 
> Here's what I tried:
> 
> I put kendle.com in locals and used a .qmail-default like this:
> 
> | fastforward -p /etc/aliases.cdb
> | forward "$LOCAL"@mail.kendle.com
> 
> messages are forwarded to [EMAIL PROTECTED] instead of [EMAIL PROTECTED]
> 
>  If I use:
> 
> | fastforward -p /etc/aliases.cdb
> | forward "$LOCAL"@kendle.com
> 
> the message just loops because qmail-send thinks that kendle.com is local.
> I know it's sort of nitpicky, but I need messages to be processed through
> fastforward and be relayed to the next server with the recipient address of
> [EMAIL PROTECTED] if no match is found.
> 
> Any ideas?
> 
> Thanks,
> Josh
> 

-- 
Tony Hansmann ([EMAIL PROTECTED])
Director of Technical Services
Quepasa.com, INC.
602-716-0100


Reply via email to