OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Transport delivery with exceptions
From: Vladimir Parkhaev (vladimirarobas.net)
Date: Wed May 31 2000 - 17:39:25 CDT


I have the following dilema. I have a mailgateway (runing postfix, of course)
on DMZ that forwards all mail to a mailhub inside (via transport table).

On the mailhub, I set up a transport_maps=regexp:/dir/transport.regexp
( /./!/(.*)?mydomain.com$/ smtp:[IP address of mailgateway]) so it does
not do direct delivery for outgoing mail.

I also have aliases on the mailhub (user: box.domain.com). Now
NT guys are asking me to get rid of aliases and forward them all mail.
I do not mind doing that, but I'd like to have some exceptions.

So, I am trying to forward all mail for mydomain.com to Exchange with
exception of me and a few other people. I added the second transport map:
transport_maps=regexp:/dir/transport.regexp,hash:/dir/transport with
domain.com :[10.0.1.22]
.domain.com :[10.0.1.22]

I tried creating virtual table with "medomain.com memybox.domain.com" type
of entries. It almost work, that is virtual table is consulted
(box name was added), but transport map seems to take precendence
over entry in virtual table.

Here is log entries where I send mail to medomain.com.
(please, ignore the fact that Exchange 10.1.1.22 was down :)

May 31 17:54:00 mailhub postfix/qmgr[31892]: 605BE4674D: from=<testsomedomain.com>, size=364 (queue active)
May 31 17:54:00 mailhub postfix/smtp[31929]: connect to 10.1.1.22[10.1.1.22]: Connection refused (port 25)
May 31 17:54:00 mailhub postfix/smtp[31929]: 605BE4674D: to=<memybox.domain.com>, relay=none, delay=17, status=deferred (connect to 10.1.1.20[10.1.1.22.]: Connection refused)

Any ideas on how to implement this?
Thanks.