|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Subject: Re: Is this possible with postfix?
From: Wietse Venema (wietse
porcupine.org)Date: Fri Mar 03 2000 - 18:28:53 CST
- Next message: Craig Sanders: "Re: Some questions on postfix, SUMMARY"
- Previous message: Marco d'Itri: "Re: Some questions on postfix, SUMMARY"
- In reply to: Parkhaev Vladimir: "Re: Is this possible with postfix?"
- Next in thread: Parkhaev Vladimir: "Re: Is this possible with postfix?"
- Reply: Wietse Venema: "Re: Is this possible with postfix?"
- Reply: Parkhaev Vladimir: "Re: Is this possible with postfix?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
1 Parkhaev Vladimir:
> On Fri, 3 Mar 2000, Wietse Venema wrote:
>
> > Parkhaev Vladimir:
> > > On Fri, 3 Mar 2000, Wietse Venema wrote:
> > >
> > > > Have the MX record point to the external host.
> > > >
> > > > my.domain IN MX 10 external.my.domain
> > > >
> > > > On the external host, use a transport map
> > > >
> > > > /etc/postfix/transport:
> > > > my.domain internal.my.domain
> >
> > Should be: my.domain smtp:internal.my.domain
> >
> > > > /etc/postfix/main.cf:
> > > > relay_domains = my.domain
> > > >
> > > > On the internal host,
> > > >
> > > > /etc/postfix/main.cf:
> > > > relayhost = external.my.domain
> > > > mydestination = my.domain, internal.my.domain localhost.my.domain ....
> > > >
> > > > People with firewalls do this all the time.
> > > >
> > > > Wietse
> > > >
> > >
> > > Hm, if I am not mistaken, with MX record pointing to external host,
> > > the flow of traffic will be as follows:
> > >
> > >
> > > +--------+ +----------+ +----------+
> > > Internet ---->| Public |---->| Internal |-------> | Internal |
> > > <----| SMTP |<----| SMTP | ------ | Client |
> > > +--------+ +----------+ | +----------+
> > > ^ |
> > > |_______________________|
> >
> > That depends on how internal clients are set up. If you have a
> > router between external and internal host, then you can prevent
> > internal hosts from going to the external machine.
> >
> > In order to make this work smoothly you use a split DNS setup.
> >
> > - The internal host runs the internal DNS with an MX record that
> > points to the internal host, and forwards other queries to the name
> > server on the external host which talks to the internet.
> >
> > - The external host runs the external DNS with an MX record that
> > points to the external host. The external host may have a resolv.conf
> > file that points to the internal machine, in which case you can
> > avoid the use of a transport table in the example above.
> >
> > This is a standard example in firewalls books.
>
> I have the following setup (just as you describe):
>[on the internal host]
> and aliases hash with user:user
server.my.domain entries.
There's your problem.
> Internal host bounces undelivered mail messages directly outside.
That's because you haven't configured Postfix to give the mail
to the external host.
> As soon as I add:
> relayhost = external.my.domain
> on internal host, all mail is sent back to external (loop).
Mail that is aliased user:user
server.my.domain will go to $relayhost.
The simplest fix for this is to ditch the relayhost entry and
to use a regexp-style transport map:
/etc/postfix/transport.regexp:
/([^
]*\.my\.domain)$/ smtp:$1
/./ smtp:relayhost
this delivers internal mail directly, and everything else via
the relayhost. If you have done the evil thing of setting up
a wild-card MX record for my.domain, then you must specify
the host in [] on the right-hand side of the transport map.
Wietse
- Next message: Craig Sanders: "Re: Some questions on postfix, SUMMARY"
- Previous message: Marco d'Itri: "Re: Some questions on postfix, SUMMARY"
- In reply to: Parkhaev Vladimir: "Re: Is this possible with postfix?"
- Next in thread: Parkhaev Vladimir: "Re: Is this possible with postfix?"
- Reply: Wietse Venema: "Re: Is this possible with postfix?"
- Reply: Parkhaev Vladimir: "Re: Is this possible with postfix?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]