I configured another postfix relay server today. For now I closed all incoming ports, so when I send E-Mails through a transport relay I talk to the local unix smtp client.
When I call this through postqueue -f
it says
[root@dev-core-mailhub1 postfix]# Apr 5 15:10:49 dev-core-mailhub1 postfix/smtp[5499]: 37812C81B03: to=<XXXXXXX>, relay=none, delay=4923, delays=4923/0.01/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=XXXXXX type=A: Host not found, try again)
But when I lookup the host on the system I get the address!
So I digged a bit deeper and did an strace -p 5499
before I forced the queue again.
connect(16, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
So the tool tries to resolve against localhost! But /etc/resolv.conf
sais something completely different!
Why is that so?
How can I configure postfix/smtp to either obey /etc/resolv.conf
or use another configurered resolver?