On Wed, Jul 04, 2012 at 05:49:22PM +0200, post...@netorbit.it wrote:

> I was wondering if is it possible via Postfix only to skip to
> connect to some remote MX, by its dns name.
> Let's say domain "example.com" has 3 MX records: mx1.example.com,
> mx2.example.com, mx3.example.com of equal priority (to make things
> easier).
> 
> I'd like Postfix to always skip mx3.example.com, and keeping valid
> any other MX (in this case mx1 and mx2) associated to example.com
> domain.
> Only solution I found so far is to put bogus entries in /etc/hosts
> of the Postfix machine for mx3.example.com
> 
> Am I wrong or there's a better solution?

Generally, Postfix finds the addresses of MX hosts via DNS and only
resorts to /etc/hosts if DNS fails and you've modified smtp_host_lookup.
So the override needs to be in the local caching nameserver, but yes,
that's the simplest way to do it. Map the hostname to an address on
your network (possibly a 127.0.0.x loopback address) that quickly
rejects connections to port 25.

Run a caching nameserver directly on the MTA host, and apply the
policy there.

-- 
        Viktor.

Reply via email to