I can easily get postfix to relay to a list of domains using the 'relay_domains' parameter. The problem we have is that we have literally hundreds of domains that are in a constant state of flux.
Managing that list is a real pain. What we would like to do is tell postfix 'only relay if the DESTINATION DOMAIN NAME resolves into an IP address in this list'.
Then we would just have to put the external IP of the domain name into that list.
So for example
mailserver.example.com -> 128.242.110.163 (postfix)
example.com -> 128.242.110.162 (public)
user@example.com goes to mx ip of mailserver.example.com.
mailserver.example.com checks the domain(example.com), gets its ip (128.242.110.162), checks a list for that IP and if its present allows the relay.
This seems like it would allow proper inbound relaying and prevent unauthorized relaying without maintaining nightmare lists.
Anyone have any ideas?
Thanks!
Managing that list is a real pain. What we would like to do is tell postfix 'only relay if the DESTINATION DOMAIN NAME resolves into an IP address in this list'.
Then we would just have to put the external IP of the domain name into that list.
So for example
mailserver.example.com -> 128.242.110.163 (postfix)
example.com -> 128.242.110.162 (public)
user@example.com goes to mx ip of mailserver.example.com.
mailserver.example.com checks the domain(example.com), gets its ip (128.242.110.162), checks a list for that IP and if its present allows the relay.
This seems like it would allow proper inbound relaying and prevent unauthorized relaying without maintaining nightmare lists.
Anyone have any ideas?
Thanks!