Redirect Mail for specific Domain.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Redirect Mail for specific Domain.

Linux Addict
Hi, I have virtual zone on a postfix mail relay.
 
Virtual Zone                                          Virtual Alias
zone1.example.com                      [hidden email]   goes to [hidden email]
 
zone1.example.com is managed by us which is postfix
example.net is Exchange server managed by another Team.
 
The problem I am  facing is, the postfix server is resolving example.net to external address, but I really want to send those mails to internal SMTP address of example.net(Exchange Server).
 
Is there a tweak in postfix to do this.?
 
Cheers, LA
 
 
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Redirect Mail for specific Domain.

Barney Desmond
2008/8/9 Linux Addict <[hidden email]>:
> [hidden email] goes to [hidden email]
>
> The problem I am  facing is, the postfix server is resolving example.net to
> external address, but I really want to send those mails to internal SMTP
> address of example.net(Exchange Server).

It sounds like you want a transport map, probably something like
"zone1.example com smtp:[internal.IP.address]"
http://www.postfix.org/transport.5.html

An alternative is to fix the DNS, which is arguably the more correct
solution, either by editing /etc/hosts or using a split-horizon DNS
setup.


-Barney Desmond
Reply | Threaded
Open this post in threaded view
|

Re: Redirect Mail for specific Domain.

Sahil Tandon
In reply to this post by Linux Addict
Linux Addict <[hidden email]> wrote:

> Hi, I have virtual zone on a postfix mail relay.
>
> Virtual Zone                                          Virtual Alias
> zone1.example.com                      [hidden email]   goes to
> [hidden email]
>
> zone1.example.com is managed by us which is postfix
> example.net is Exchange server managed by another Team.
>
> The problem I am  facing is, the postfix server is resolving
example.net to
> external address, but I really want to send those mails to internal SMTP
> address of example.net(Exchange Server).
>
> Is there a tweak in postfix to do this.?
                                       
If you want to direct all mail destined for zone1.example.com to
example.net, then instead of virtual aliases, you might consider
transport maps:

http://www.postfix.org/transport.5.html

--
Sahil Tandon <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Redirect Mail for specific Domain.

Linux Addict

On Fri, Aug 8, 2008 at 9:45 PM, Sahil Tandon <[hidden email]> wrote:
Linux Addict <[hidden email]> wrote:

> Hi, I have virtual zone on a postfix mail relay.
>
> Virtual Zone                                          Virtual Alias
> zone1.example.com                      [hidden email]   goes to
> [hidden email]
>
> zone1.example.com is managed by us which is postfix
> example.net is Exchange server managed by another Team.
>
> The problem I am  facing is, the postfix server is resolving
example.net to
> external address, but I really want to send those mails to internal SMTP
> address of example.net(Exchange Server).
>
> Is there a tweak in postfix to do this.?

If you want to direct all mail destined for zone1.example.com to
example.net, then instead of virtual aliases, you might consider
transport maps:
--
Sahil Tandon <[hidden email]>
 
 
 
 
I can fix DNS, but it may break other prod. services. I will give it a shot with Transport Maps.
 
Cheers.. Grt Weekend!!
Reply | Threaded
Open this post in threaded view
|

Re: Redirect Mail for specific Domain.

Linux Addict
Linux Addict wrote:

>
> On Fri, Aug 8, 2008 at 9:45 PM, Sahil Tandon <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Linux Addict <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>     > Hi, I have virtual zone on a postfix mail relay.
>     >
>     > Virtual Zone                                          Virtual Alias
>     > zone1.example.com <http://zone1.example.com/>                  
>        [hidden email] <mailto:[hidden email]>   goes to
>     > [hidden email] <mailto:[hidden email]>
>     >
>     > zone1.example.com <http://zone1.example.com/> is managed by us
>     which is postfix
>     > example.net <http://example.net/> is Exchange server managed by
>     another Team.
>     >
>     > The problem I am  facing is, the postfix server is resolving
>     example.net <http://example.net/> to
>     > external address, but I really want to send those mails to
>     internal SMTP
>     > address of example.net <http://example.net/>(Exchange Server).
>     >
>     > Is there a tweak in postfix to do this.?
>
>     If you want to direct all mail destined for zone1.example.com
>     <http://zone1.example.com/> to
>     example.net <http://example.net/>, then instead of virtual
>     aliases, you might consider
>     transport maps:
>
>     http://www.postfix.org/transport.5.html
>
>     --
>     Sahil Tandon <[hidden email] <mailto:[hidden email]>>
>
>  
>  
>  
>  
> I can fix DNS, but it may break other prod. services. I will give it a
> shot with Transport Maps.
>  
> Cheers.. Grt Weekend!!
Hit a bump..

On the transport file, I cant seem to enter multiple MX server for the
same domain.

example.net     smtp:[mx01]

Works great, but  How do I configure the MX02 for the same example.net?
When I add new line it complains duplicate.

~LA





Reply | Threaded
Open this post in threaded view
|

Re: Redirect Mail for specific Domain.

Noel Jones-2
Linux Addict wrote:

> Linux Addict wrote:
>>
>> On Fri, Aug 8, 2008 at 9:45 PM, Sahil Tandon <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     Linux Addict <[hidden email]
>>     <mailto:[hidden email]>> wrote:
>>
>>     > Hi, I have virtual zone on a postfix mail relay.
>>     >
>>     > Virtual Zone                                          Virtual Alias
>>     > zone1.example.com <http://zone1.example.com/>                  
>>        [hidden email] <mailto:[hidden email]>   goes to
>>     > [hidden email] <mailto:[hidden email]>
>>     >
>>     > zone1.example.com <http://zone1.example.com/> is managed by us
>>     which is postfix
>>     > example.net <http://example.net/> is Exchange server managed by
>>     another Team.
>>     >
>>     > The problem I am  facing is, the postfix server is resolving
>>     example.net <http://example.net/> to
>>     > external address, but I really want to send those mails to
>>     internal SMTP
>>     > address of example.net <http://example.net/>(Exchange Server).
>>     >
>>     > Is there a tweak in postfix to do this.?
>>
>>     If you want to direct all mail destined for zone1.example.com
>>     <http://zone1.example.com/> to
>>     example.net <http://example.net/>, then instead of virtual
>>     aliases, you might consider
>>     transport maps:
>>
>>     http://www.postfix.org/transport.5.html
>>
>>     --
>>     Sahil Tandon <[hidden email] <mailto:[hidden email]>>
>>
>>  
>>  
>>  
>>  
>> I can fix DNS, but it may break other prod. services. I will give it a
>> shot with Transport Maps.
>>  
>> Cheers.. Grt Weekend!!
> Hit a bump..
>
> On the transport file, I cant seem to enter multiple MX server for the
> same domain.
>
> example.net     smtp:[mx01]
>
> Works great, but  How do I configure the MX02 for the same example.net?
> When I add new line it complains duplicate.
>
> ~LA
>
>

You may only specify one transport:nexthop for a particular
domain.

If you want to send to example.com's MX records, just use
example.net   smtp:example.com

If you need a custom destination or MX order, create a "dummy"
domain in your local DNS listing the MX hosts you want to use:
example.net  smtp:example.local
with suitable MX records in your local DNS for "example.local"


--
Noel Jones