On 5/20/2021 12:38 PM, basini...@gmail.com wrote:
Hi List!
I want to use native SMTP host lookup instead of DNS, but only for *some*
domains.
From `man 5 transport`:
and disable MX (mail ex‐changer) DNS lookups with [host] or [host]:port.
I tried it, but according to postfix logs, it's still resolving it using DNS.
If I replace the name within square brackets with a numeric ip address, then
the mail is delivered.
`/etc/postfix/transport`
.lan smtp:[somehost]
`/etc/postfix/main.cf`
transport_maps = hash:/etc/postfix/transport
_
[root@dexp postfix]# getent hosts somehost
1.2.3.4 somehost
[root@dexp postfix]# mailx -s testsubject r...@other.lan </dev/null
[root@dexp postfix]#
_
May 20 20:27:25 dexp.lan postfix/smtp[226399]: 4E537CEFD1:
to=<r...@other.lan>, relay=none, delay=0.4, delays=0.14/0.02/0.23/0, dsn=5.4.4,
status=bounced (Host or domain name not found. Name service error for name=somehost
type=A: Host not found)
My postfix has version 3.5.6.
Thank you.
As the docs say, the brackets disable MX lookups, not DNS lookups.
Sounds like you should read
http://www.postfix.org/postconf.5.html#smtp_host_lookup
and probably use "dns, native"
-- Noel Jones