A transport maps dilema

2014-12-21 Thread Istvan Prosinger

Hello,

Is it possibble to make Postfix relay to some specific domain using a 
specific relay, and relay all the other domains by default rules (put 
the mail to an inbox if local or relay outbound by the given 
restrictions etc)?


I guess it'd involve a transport_maps pointer in the main.cf to a 
specific (let's say) hash table which will contain something like:


myspecialdomain.tld.com relay:[myspecialrelay:port]
* relay:[what_do_i_put_here?]

If I'd relay * to my own smtp, I guess it would create an endless loop, 
and this is where my dilema starts.







Re: A transport maps dilema

2014-12-21 Thread li...@rhsoft.net


Am 21.12.2014 um 13:53 schrieb Istvan Prosinger:

Is it possibble to make Postfix relay to some specific domain using a
specific relay, and relay all the other domains by default rules (put
the mail to an inbox if local or relay outbound by the given
restrictions etc)?

I guess it'd involve a transport_maps pointer in the main.cf to a
specific (let's say) hash table which will contain something like:

myspecialdomain.tld.com relay:[myspecialrelay:port]
* relay:[what_do_i_put_here?]


in doubt *nothing*, your LMTP but in any case don't use * here, a table 
is a table and should list anything clear


we have a transport_map for every single domain to 127.0.0.1:24 and for 
special routings instead the destination smtp server, all in 
mysql-tables and so created on-demand based on database views



If I'd relay * to my own smtp, I guess it would create an endless loop,
and this is where my dilema starts


http://www.postfix.org/postconf.5.html#relayhost
http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps
http://www.postfix.org/postconf.5.html#transport_maps


Re: A transport maps dilema

2014-12-21 Thread Jose Borges Ferreira
You allmost got it.
Transport_map is used to override the default transport and the ones you
don't want to override just left out.
Just take the * and that should work as you intended.

José Borges Ferreira
On Dec 21, 2014 12:55 PM, Istvan Prosinger ist...@prosinger.net wrote:

 Hello,

 Is it possibble to make Postfix relay to some specific domain using a
 specific relay, and relay all the other domains by default rules (put the
 mail to an inbox if local or relay outbound by the given restrictions etc)?

 I guess it'd involve a transport_maps pointer in the main.cf to a
 specific (let's say) hash table which will contain something like:

 myspecialdomain.tld.com relay:[myspecialrelay:port]
 * relay:[what_do_i_put_here?]

 If I'd relay * to my own smtp, I guess it would create an endless loop,
 and this is where my dilema starts.







Re: A transport maps dilema

2014-12-21 Thread Wietse Venema
Istvan Prosinger:
 Hello,
 
 Is it possibble to make Postfix relay to some specific domain using a 
 specific relay, and relay all the other domains by default rules (put 
 the mail to an inbox if local or relay outbound by the given 
 restrictions etc)?
 
 I guess it'd involve a transport_maps pointer in the main.cf to a 
 specific (let's say) hash table which will contain something like:
 
 myspecialdomain.tld.com relay:[myspecialrelay:port]

And use main.cf:relayhost for the rest.

Wietse


Re: A transport maps dilema

2014-12-21 Thread Viktor Dukhovni
On Sun, Dec 21, 2014 at 08:57:52AM -0500, Wietse Venema wrote:
 Istvan Prosinger:
  Hello,
  
  Is it possibble to make Postfix relay to some specific domain using a 
  specific relay, and relay all the other domains by default rules (put 
  the mail to an inbox if local or relay outbound by the given 
  restrictions etc)?
  
  I guess it'd involve a transport_maps pointer in the main.cf to a 
  specific (let's say) hash table which will contain something like:
  
  myspecialdomain.tld.com relay:[myspecialrelay:port]
 
 And use main.cf:relayhost for the rest.

And use the documented syntax:

relay:[smtp.example.net]:25
relay:[smtp.example.net]:smtp

-- 
Viktor.


Re: A transport maps dilema

2014-12-21 Thread Istvan Prosinger

Works like a charm, thank you all!!

On 21.12.2014 14:42, Jose Borges Ferreira wrote:

You allmost got it.
Transport_map is used to override the default transport and the ones you
don't want to override just left out.
Just take the * and that should work as you intended.

José Borges Ferreira

On Dec 21, 2014 12:55 PM, Istvan Prosinger ist...@prosinger.net
mailto:ist...@prosinger.net wrote:

Hello,

Is it possibble to make Postfix relay to some specific domain using
a specific relay, and relay all the other domains by default rules
(put the mail to an inbox if local or relay outbound by the given
restrictions etc)?

I guess it'd involve a transport_maps pointer in the main.cf
http://main.cf to a specific (let's say) hash table which will
contain something like:

myspecialdomain.tld.com http://myspecialdomain.tld.com
relay:[myspecialrelay:port]
* relay:[what_do_i_put_here?]

If I'd relay * to my own smtp, I guess it would create an endless
loop, and this is where my dilema starts.






Re: A transport maps dilema

2014-12-21 Thread Istvan Prosinger



On 21.12.2014 18:21, Viktor Dukhovni wrote:

On Sun, Dec 21, 2014 at 08:57:52AM -0500, Wietse Venema wrote:

Istvan Prosinger:

Hello,

Is it possibble to make Postfix relay to some specific domain using a
specific relay, and relay all the other domains by default rules (put
the mail to an inbox if local or relay outbound by the given
restrictions etc)?

I guess it'd involve a transport_maps pointer in the main.cf to a
specific (let's say) hash table which will contain something like:

myspecialdomain.tld.com relay:[myspecialrelay:port]


And use main.cf:relayhost for the rest.


And use the documented syntax:

relay:[smtp.example.net]:25
relay:[smtp.example.net]:smtp



Indeed! It was a typo, thanks!