transport_maps

This is a discussion on transport_maps within the alt.comp.mail.postfix forums, part of the Mail Servers and Related category; I have setup a Mail gateway for spam and virus filtering using Postfix / Amavisd-new / Spamassassin. I've basically followed ...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.postfix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-08-2006
Matt Beechey
 
Posts: n/a
Default transport_maps

I have setup a Mail gateway for spam and virus filtering using Postfix /
Amavisd-new / Spamassassin.

I've basically followed a guide I found online, since then I've added in
LDAP lookups to our exchange server to validate recipients and I'm
developing a php front end for whitelisting and configuration so I can
easily implement this system else where from a ghost image. All is going
well but I'm getting lazy with the PHP configuration stuff.

My question is: if you have a list of accepted domains (relay_domains) and a
relayhost set do you need to do anything with transport_maps ? In testing it
would APPEAR that mail is forwarded to our relayhost so long as its to one
of the domains listed in relay_domains so I don't think I need to touch
transport_maps for any additional domains added?

Am I wrong in this assumption - is tranport_maps only required to specify
non smtp delivery???

I've looked at the online help and found it to be a little ambiguous as to
whether I require this setting?

Any help greatly appreciated as I'm near to finishing my PHP web front end
and I'm getting to the point of taking shortcuts wherever possible as I've
spent many a late night on this (considering I had never used Linux before
this project and never written in php!)


Matt


Reply With Quote
  #2 (permalink)  
Old 11-08-2006
Greg Hackney
 
Posts: n/a
Default Re: transport_maps

Matt Beechey wrote:

> My question is: if you have a list of accepted domains (relay_domains) and a
> relayhost set do you need to do anything with transport_maps ?


> Am I wrong in this assumption - is tranport_maps only required to specify
> non smtp delivery???


The transport_maps are used to manually specify the next-hop routing. It's
typically used to override DNS's notion of routing.

For example, assume your site is the relay host for "domain.com". In DNS,
the MX record will advertise your site to the public as the relay host.
When the public email reaches your system, your system needs to know where
to route it to. Your site can't use DNS MX records, since it points back to
itself. So, you manually enter the next-hop site in your transport file.
And in most cases, it _is_ SMTP, and SMTP is the default transport for the
transports file.

Yes, you can set "relayhost", and it will take care of your relay_domains
routing, without having to use a transport file entry.

However, there is a newer way of doing that, which is more flexible:

Leave "relayhost" unset.
Create a transport map, and at the top, enter any manual routes. On the
very last line, create a default relay host entry (The transport map is
parsed top to bottom).

For example:

internal.site1.mydomain.com smtp:[192.168.1.7]
internal.site2.mydomain.com smtp:site2.mydomain.com
myisp.com smtp:private-relay.myisp.com
* smtp:[relay.mydomain.com]

--
Greg

























Reply With Quote
  #3 (permalink)  
Old 11-08-2006
Matt Beechey
 
Posts: n/a
Default Re: transport_maps

Thanks Greg - this is definately a tidier way to do it - but for the
purposes of this system I've already done all the php for the Relayhost
entry etc in postfix main.cf and mapped the relayhost and mydomain into a
transport file so its nice to know I can ignore putting all the other
domains into the transport file!! Most of the sites we put these in at only
have one domain - the most I've had is 7 but this was someone who'd
registered every permutation of their name but only actually ACTIVELY used 2
of them!

Matt


"Greg Hackney" <hackney@swbell.net> wrote in message
news:Hqo4h.8566$B31.2589@newssvr27.news.prodigy.ne t...
> Matt Beechey wrote:
>
>> My question is: if you have a list of accepted domains (relay_domains)
>> and a relayhost set do you need to do anything with transport_maps ?

>
>> Am I wrong in this assumption - is tranport_maps only required to specify
>> non smtp delivery???

>
> The transport_maps are used to manually specify the next-hop routing. It's
> typically used to override DNS's notion of routing.
>
> For example, assume your site is the relay host for "domain.com". In DNS,
> the MX record will advertise your site to the public as the relay host.
> When the public email reaches your system, your system needs to know where
> to route it to. Your site can't use DNS MX records, since it points back
> to
> itself. So, you manually enter the next-hop site in your transport file.
> And in most cases, it _is_ SMTP, and SMTP is the default transport for the
> transports file.
>
> Yes, you can set "relayhost", and it will take care of your relay_domains
> routing, without having to use a transport file entry.
>
> However, there is a newer way of doing that, which is more flexible:
>
> Leave "relayhost" unset.
> Create a transport map, and at the top, enter any manual routes. On the
> very last line, create a default relay host entry (The transport map is
> parsed top to bottom).
>
> For example:
>
> internal.site1.mydomain.com smtp:[192.168.1.7]
> internal.site2.mydomain.com smtp:site2.mydomain.com
> myisp.com smtp:private-relay.myisp.com
> * smtp:[relay.mydomain.com]
>
> --
> Greg
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:33 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0