OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: [postfix-users] Re: Transport question

From: Noel Jones (njonesmegan.vbhcs.org)
Date: Wed Jul 11 2007 - 15:54:15 CDT


The regexp table must be first in your list of transport_maps.

/mailing\./ relay:[mx2.example.com]

--
Noel Jones

At 03:49 PM 7/11/2007, John wrote:
>Thx - it's an incoming-only relay. I also tried to no avail:
>
>/.*mailing.*/ smtp:[mx2.example.com]
>
>(I know that I have to tweak the regex a bit more regarding the dots to
>disallow anyoneanothermailing.com)
>
>I must add that we actually have two lines for each domain:
>
>example.com smtp:[mx.example.com]
>.example.com smtp:[mx.example.com]
>
>So if later lines supersede earlier ones, the .example.com might
>supersede mailing.example.com
>
>
>
>John
>
>Noel Jones wrote:
> > At 03:31 PM 7/11/2007, John wrote:
> >> Could someone shed a light on this one:
> >>
> >> All our domains have an MX record of mx.example.com
> >>
> >> We have setup /etc/postfix/transport and relay_domains as follows:
> >>
> >> example.com smtp:[mx.example.com]
> >> example.net smtp:[mx.example.com]
> >> example.org smtp:[mx.example.com]
> >> :
> >> :
> >> We are trying to route all mail to *mailing.example.com to
> >> smtp:[mx2.example.com] with a wildcard. However, this does not work as
> >> first line of transport:
> >>
> >> mailing.* smtp:[mx2.example.com]
> >>
> >> However, mails is still sent to mx.example.com if sent to
> >> anyonemailing.example.net for instance.
> >
> > If this is an incoming-only gateway you can use a regexp transport map.
> > But don't do that if this server also sends mail out. In that case,
> > you are best off listing each domain.
> >