On 04/10/16 23:12, Anton Bruckner wrote:
> Hello,
> i have following scenario:
> 
> Many external mail domains resolve to one single ip address ex 1.2.3.4 after 
> dns lookup - is it now possible, to define a rule that says -
> relay any mail with destination host "1.2.3.4" to relay host "5.6.7.8" ?
> 
> I know that i can do it with a transport rule - but only with names, not ip 
> addresses.
> 
> Any ideas ?

You can do it by recipient MX hostname, which should be close enough:

smtpd_recipient_restrictions = ... check_recipient_mx_access
hash:/etc/postfix/mx_transports


/etc/postfix/mx_transports:

mail.example.com FILTER :[myrelay.example.net]
...


Peter

Reply via email to